You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement PID File for go-dnscollector to Enable SIGHUP Configuration Reload
Description:
Now that SIGHUP is implemented on the go-dnscollector side (see), we (pDNSSOC) need to integrate this functionality for configuration reload without restarting the process. This will allow us to make changes on-the-fly, such as reading updated files, by sending a SIGHUP signal to the process without having to restart the process manually.
Background:
It became common practice for daemonized processes to use SIGHUP for configuration reload. This allows changes to be made without terminating the process.
Current Implementation Steps:
Find the process number of go-dnscollector.
Run the following command to reload the configuration:
kill -SIGHUP 21371 # Assuming 21371 is the PID of the running go-dnscollector
Challenge:
The PID changes every time the process restarts, which makes it difficult to automate this with a static command.
Proposed Solution:
Implement a PID file in go-dnscollector that stores the current PID of the running process. This PID file will be created on startup and can be referenced to send the SIGHUP signal.
Benefits:
Simplifies the process of sending SIGHUP signals.
Eliminates the need to restart the process for configuration changes.
Potentially allows us to remove the dependency on supervisord, as it is currently used only for restarting on config changes.
Follows a good and common industry practice.
Additional Notes:
Confirm if Denis has implemented the PID file functionality. If not, this issue should prioritize that implementation.
If we (pDNSSOC) can ditch supervisord, a Python script inside fetch-iocs can monitor file changes and send the SIGHUP signal accordingly.
Implement PID File for go-dnscollector to Enable SIGHUP Configuration Reload
Description:
Now that SIGHUP is implemented on the go-dnscollector side (see), we (pDNSSOC) need to integrate this functionality for configuration reload without restarting the process. This will allow us to make changes on-the-fly, such as reading updated files, by sending a SIGHUP signal to the process without having to restart the process manually.
Background:
It became common practice for daemonized processes to use SIGHUP for configuration reload. This allows changes to be made without terminating the process.
Current Implementation Steps:
Challenge:
The PID changes every time the process restarts, which makes it difficult to automate this with a static command.
Proposed Solution:
Implement a PID file in go-dnscollector that stores the current PID of the running process. This PID file will be created on startup and can be referenced to send the SIGHUP signal.
Benefits:
Additional Notes:
References:
Action Items:
The text was updated successfully, but these errors were encountered: