Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kokizzu
Copy link

@kokizzu kokizzu commented May 4, 2023

1. Why is this pull request needed and what does it do?

metrics (prometheus) and pprof plugin does not release listening port when doing coredns upgrade

kill -USR2 `cat /tmp/coredns.pid` 

so need to listen to SIGUSR2 signal, then shutdown the server so next fork (upgraded binary) will not have an error.

2. Which issues (if any) are related?

3. Which documentation changes (if any) need to be made?

4. Does this introduce a backward incompatible change or deprecation?

no

@chrisohaver
Copy link
Member

Can this be tested in CI?
Does this also need to be applied to other plugins that listen on ports? e.g. health, ready?

@kokizzu kokizzu requested a review from zouyee as a code owner May 4, 2023 12:50
@kokizzu kokizzu changed the title bugfix prometheus port not released on upgrade bugfix prometheus/pprof port not released on upgrade May 4, 2023
@kokizzu
Copy link
Author

kokizzu commented May 4, 2023

or maybe I should create PR on caddy, to add OnUpgrade -- to attach callback for plugins that have custom listen port that should be shutted down before upgrade?

@stickler-ci
Copy link

Could not review pull request. It may be too large, or contain no reviewable changes.

@yongtang yongtang merged commit c9ac2c9 into coredns:master May 8, 2023
@kokizzu
Copy link
Author

kokizzu commented May 9, 2023

rip the pull bot is resetting the changes

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.

4 participants