linuxserver / docker-smokeping

GNU General Public License v3.0
347 stars 95 forks source link

Reload configuration w/o restart container? #109

Closed pklausner closed 2 years ago

pklausner commented 3 years ago

Expected Behavior

In the docs it claims a change to the config file on the host will be detected and automatically applied. I assume it is supposed to poll for changes then run smokeping --reload within the container.

Current Behavior

Everything works fine, except changes get never detected; I have to manually restart the container - which creates a gap in the data.

Steps to Reproduce

  1. change any config file
  2. wait ... forever

Environment

OS: Ubuntu 18.04 server CPU architecture: x86_64 How docker service was installed: standard docker.io 19.03.6-0ubuntu1~18.04.3

Command used to create docker container (run/create/compose/screenshot)

docker-compose up -d

Docker logs

[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Smokeping version 2.007003 successfully launched.
Entering multiprocess mode.
### assuming you are using an tcpping copy reporting in milliseconds
Child process 332 started for probe TCPPing.
TCPPing: probing 2 targets with step 300 s and offset 150 s.
Child process 333 started for probe FPing.
No targets defined for probe TraceroutePing, skipping.
All probe processes started successfully.
FPing: probing 27 targets with step 300 s and offset 78 s.

no messages related to loading/reading the changed config

github-actions[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

pklausner commented 3 years ago

I tried to understand this s6 business. It doesn't play with the --reload mechanism. This command made the collecting demon reload without dropping data: s6-svc -h /var/run/s6/services/smokeping/ The web ui process smokeping_cgi gets started from apache, but s6-svc -h /var/run/s6/services/apache/ seems to take no effect. Instead I see httpd (pid 283) already running repeated endlessly. A direct kill -SIGHUP of the process makes the UI reload as expected.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hatvik commented 2 years ago

You can do kill -1 pid on the smokeping process, that will reload the config