Skip to content

Fix HUP kill not reloading config#630

Merged
acalcutt merged 9 commits intomaptiler:masterfrom
WifiDB:fix_hup
Oct 28, 2022
Merged

Fix HUP kill not reloading config#630
acalcutt merged 9 commits intomaptiler:masterfrom
WifiDB:fix_hup

Conversation

@acalcutt
Copy link
Copy Markdown
Collaborator

This is a fix for #629, which was broken in the syntax change of #606

After looking at the code changes, it seems like the sections of code that handles SIGINT/SIGHUP and restarting was not being used anymore. This change renames the functions a bit so the SIGINT/SIGHUP code is actually used.

@acalcutt acalcutt changed the title Fix hup Fix HUP kill not reloading config Oct 27, 2022
@zstadler
Copy link
Copy Markdown
Contributor

zstadler commented Oct 27, 2022

I have tested this PR under Docker and it fixes #629: reloading of an updated config file works in both ways:

  • The documented preferred way: docker kill -s HUP tileserver-gl
  • The older way: docker exec tileserver-gl bash -c 'kill -HUP $(ls -l /proc/*/exe | sed -n "/\/node$/s/.*proc\/\([0-9]\+\)\/exe .*/\1/p")

@acalcutt acalcutt requested a review from mnutt October 27, 2022 22:01
Copy link
Copy Markdown
Contributor

@mnutt mnutt left a comment

Choose a reason for hiding this comment

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

I suspect that clearing the require cache might have been to give the ability to reload options.dataDecorator which is loaded via require(). IMO that seems like it's approaching ad-hoc hot-reloading territory and I think it's fine to not support.

@acalcutt acalcutt merged commit b6e2d10 into maptiler:master Oct 28, 2022
@zstadler
Copy link
Copy Markdown
Contributor

Please consider resolving #629

@acalcutt
Copy link
Copy Markdown
Collaborator Author

I'm planning to resolve it after the docker is updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants