Skip to content

afsocket-source: Workaround of socket reopen failure on config reload#5552

Merged
HofiOne merged 3 commits intosyslog-ng:developfrom
HofiOne:fix-socket-reopen-on-config-reload
Nov 4, 2025
Merged

afsocket-source: Workaround of socket reopen failure on config reload#5552
HofiOne merged 3 commits intosyslog-ng:developfrom
HofiOne:fix-socket-reopen-on-config-reload

Conversation

@HofiOne
Copy link
Collaborator

@HofiOne HofiOne commented Oct 28, 2025

afsocket-source: Added a workaround for the issue where a reload switches from keep-alive(yes) to keep-alive(no) with so-reuseport(no), causing the newly loaded config’s socket instance to fail to open.

The current solution restores the existing connections during the first config reload if stored connections are present — effectively treating it as if keep-alive(yes) were selected.
This ensures that connections are properly maintained, but it also means that the new config’s keep-alive(no) setting is ignored during the first reload (subsequent reloads will correctly respect it).

This behavior is still more acceptable than the original issue, where no connection could be established, the config reload was interrupted, and the new configuration was not applied at all.

See the code comments for more.

@HofiOne HofiOne changed the title Fix socket reopen on config reload Workaround of socket reopen failure on config reload Oct 28, 2025
@HofiOne HofiOne changed the title Workaround of socket reopen failure on config reload afsocket-source: Workaround of socket reopen failure on config reload Oct 28, 2025
@HofiOne HofiOne force-pushed the fix-socket-reopen-on-config-reload branch from 5695282 to 1485de6 Compare October 29, 2025 07:42
@HofiOne HofiOne force-pushed the fix-socket-reopen-on-config-reload branch 7 times, most recently from e7b6356 to 50445d7 Compare October 29, 2025 15:08
@syslog-ng syslog-ng deleted a comment from github-actions bot Oct 29, 2025
@HofiOne HofiOne force-pushed the fix-socket-reopen-on-config-reload branch 3 times, most recently from 32168b1 to b993e56 Compare October 29, 2025 15:44
Copy link
Contributor

@kovgeri01 kovgeri01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check he name of the news file

@HofiOne HofiOne requested a review from kovgeri01 October 30, 2025 10:06
HofiOne added a commit to HofiOne/syslog-ng that referenced this pull request Oct 30, 2025
@HofiOne HofiOne force-pushed the fix-socket-reopen-on-config-reload branch from b993e56 to ad4760b Compare October 30, 2025 10:07
@syslog-ng syslog-ng deleted a comment from kira-syslogng Oct 30, 2025
@syslog-ng syslog-ng deleted a comment from kira-syslogng Oct 30, 2025
@syslog-ng syslog-ng deleted a comment from kira-syslogng Oct 30, 2025
@syslog-ng syslog-ng deleted a comment from kira-syslogng Oct 30, 2025
HofiOne added a commit to HofiOne/syslog-ng that referenced this pull request Oct 30, 2025
@HofiOne HofiOne force-pushed the fix-socket-reopen-on-config-reload branch from ad4760b to a805ead Compare October 30, 2025 15:58
@syslog-ng syslog-ng deleted a comment from kira-syslogng Nov 1, 2025
@syslog-ng syslog-ng deleted a comment from kira-syslogng Nov 1, 2025
@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne HofiOne marked this pull request as ready for review November 3, 2025 15:34
@kira-syslogng
Copy link
Contributor

Build FAILURE

2 similar comments
@kira-syslogng
Copy link
Contributor

Build FAILURE

@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne
Copy link
Collaborator Author

HofiOne commented Nov 4, 2025

@kira-syslogng test this please test test=functions/destination-drivers/http-destination-driver/024-http-reload-restore-init-error.zts; branch=fix-http-reopen-test;

…ive(no) from yes, and the newly loaded config socket instance cannot be opened (as the old one still keeps it open)

Signed-off-by: Hofi <[email protected]>
@HofiOne HofiOne force-pushed the fix-socket-reopen-on-config-reload branch from a805ead to c30db5f Compare November 4, 2025 11:55
@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne HofiOne merged commit a8b8aa2 into syslog-ng:develop Nov 4, 2025
118 of 119 checks passed
@HofiOne HofiOne deleted the fix-socket-reopen-on-config-reload branch November 4, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants