Describe the bug
After 7cb09b2.When the main process is started without instance, and the instance is added later and reloaded, the child process will fail to start.
Wed Aug 21 21:35:58 2024: Starting Keepalived v2.2.4 (08/21,2021)
Wed Aug 21 21:35:58 2024: Running on Linux 5.10.0-60.18.0.50.h815.eulerosv2r11.x86_64 #1 SMP Tue Mar 28 09:30:42 UTC 2023 (built for Linux 5.10.0)
Wed Aug 21 21:35:58 2024: Command line: 'keepalived' '-D' '-l' '-n' '-p' '/var/run/keepalived.pid' '-r' '/var/run/vrrp_lvs.pid'
Wed Aug 21 21:35:58 2024: '-c' '/var/run/checkers_lvs.pid'
Wed Aug 21 21:35:58 2024: Opening file '/etc/keepalived/keepalived.conf'.
Wed Aug 21 21:35:58 2024: Configuration file /etc/keepalived/keepalived.conf
Wed Aug 21 21:35:58 2024: pidfile_write returned 8
Wed Aug 21 21:35:58 2024: NOTICE: setting config option max_auto_priority should result in better keepalived performance
Wed Aug 21 21:35:58 2024: Warning - keepalived has no configuration to run
Wed Aug 21 21:36:33 2024: Reloading ...
Wed Aug 21 21:36:33 2024: Opening file '/etc/keepalived/keepalived.conf'.
Wed Aug 21 21:36:33 2024: Configuration file /etc/keepalived/keepalived.conf
Wed Aug 21 21:36:33 2024: Starting VRRP child process, pid=2890863
Wed Aug 21 21:36:33 2024: VRRP child process: cannot write pidfile
Wed Aug 21 21:36:33 2024: Starting Healthcheck child process, pid=2890864
Wed Aug 21 21:36:33 2024: Healthcheck child process: cannot write pidfile
Wed Aug 21 21:36:33 2024: VRRP child process(2890863) died: Respawning
Wed Aug 21 21:36:33 2024: Please log an issue at https://github.com/acassen/keepalived/issues/
Wed Aug 21 21:36:33 2024: and include a full copy of your keepalived configuration files, and
Wed Aug 21 21:36:33 2024: copies of the keepalived system log entries around the time this happened
Wed Aug 21 21:36:33 2024: Restart of VRRP process delayed 0 seconds to limit respawn rate
Wed Aug 21 21:36:33 2024: Starting VRRP child process, pid=2890865
Wed Aug 21 21:36:33 2024: VRRP child process: cannot write pidfile
Wed Aug 21 21:36:33 2024: Keepalived_healthcheckers exited with permanent error FATAL. Terminating
Wed Aug 21 21:36:33 2024: Stopping
Wed Aug 21 21:36:33 2024: CPU usage (self/children) user: 0.006640/0.000759 system: 0.007562/0.001933
Wed Aug 21 21:36:33 2024: Stopped Keepalived v2.2.4 (08/21,2021)
Did keepalived coredump?
NA
Additional context
Before reload only have main process
Apologies, commit 3ea412d included other changes (work in progress). I have now reverted the 2 commits and commit 2103ba2 includes just the changes to pidfile.c from the previous two commits.
Describe the bug After 7cb09b2.When the main process is started without instance, and the instance is added later and reloaded, the child process will fail to start.
To Reproduce
Expected behavior
Child process can start.
Keepalived version
and 2c4cd3b, 7cb09b2
Distro (please complete the following information):
Details of any containerisation or hosted service (e.g. AWS) If keepalived is being run in a container or on a hosted service, provide full details
Configuration file: Config when start
Config before reload
Notify and track scripts NA
System Log entries
Did keepalived coredump? NA
Additional context Before reload only have main process