pfSense restarting all services on connection cycle.
-
So guys I made a patch for my local install which is working great.
Some background info, I have a unreliable L2TP tunnel service which goes down on average maybe half a dozen times a week, its always only brief, but it was triggering a full services restart when it happened, this was annoying as my UPS connection from winnut client to pfSense dropped every time the services were cycled. Consider in a power outage the internet may go down, then pfSense drops the LAN UPS connection because it starts cycling the UPS service and then PC doesnt auto hibernate. (there is old posts on this forum mentioning this problem)
I found in the rc.newwanip script (and v6 version) the code what triggers the behaviour, I noticed there is separate code to cycle VPNs and some other net services, I moved the all services restart function to the part of the script that only runs when the IP changes. As I dont see a need otherwise.
After some weeks of usage there is no side effects, so I am curious why this behaviour was implemented? I am prepared to submit my patches for both scripts, but I suspect if there is a known reason its done this way they will be rejected. So welcome any thoughts.
-
There could well be a situation that requires it. Might need something more nuanced there.
No harm in putting in a feature/pull request IMO. It will get more developer eyes that way.
This might be better in the Develpment sub also.
Steve
-
@stephenw10 Will submit this soon, it will need some testing though.
-
The behaviour has been patched in 2.7.0, details here, the details indicate it should be less aggressive now, so will run without my patch for a while on 2.7.0, and if the old behaviour comes back will submit my patch, I didnt submit before as been on 2.6.0 code would have been too far away from dev code, was planning to update to dev branch and then 2.7.0 got released. :)
https://redmine.pfsense.org/issues/12619