mainloop: fix config revert persistance #831
Conversation
For example, kept-alive connections were closed during config revert. Signed-off-by: László Várady <[email protected]>
Signed-off-by: László Várady <[email protected]>
|
This looks good to me. I am not sure the macOS job failed, I am rerunning that with the suspicion that it was a glitch. All green on my local box on Linux just like all the rest of the tests. |
|
@MrAnno, @bazsi Unfortunately, this one makes things worse. Now In the case of the Because of all the above, the original order self->old_config->persist = persist_config_new();
cfg_deinit(self->old_config);
cfg_persist_config_move(self->old_config, self->new_config);was correct here, I guess. Let’s just focus on the The long-standing issue is that setting It’s a bit of a catch-22, because either:
Because of this, I prefer a solution like I am testing here. It simply detects the above situation and processes the persist state in that case as if Why I think this is acceptable:
So, focusing on solving the original issue, I think it’s better to prioritize the reversibility of config reloads in case of an error, and accept this slightly “strange” behavior. Any other, better idea? |
|
I fixed the revert mechanism, not the apply. |
|
the revert might be fixed, but the original functionality of the |
|
This PR fixed a revert issue that made keep-alive(yes) misbehave during configuration revert. With this fix, keep-alive finally behaves during revert as it is documented and nothing else got worse, at least not in AxoSyslog. The issue you described is there for 10+ years, even in syslog-ng 3.6: If you need our help, open a separate issue. |
|
probably my bad, sorry |
For example, kept-alive connections were closed during config revert.