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

Skip to content

Conversation

@Lin-1997
Copy link
Contributor

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

try to fix #6703

2. Which issues (if any) are related?

#6703

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

none

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

no

After the changes

API server listening at: 127.0.0.1:38999
[INFO] plugin/auto: Inserting zone `example.com.' from: zonefile/db.example.com
example.com.:8853
[INFO] plugin/reload: Running configuration SHA512 = 5f6fe......
CoreDNS-1.11.2
linux/amd64, go1.21.8, 
2024-05-27 15:40:37.837486874 +0800 CST m=+60.029481310: reload called by 0xc0001908c0
2024-05-27 15:41:37.838566942 +0800 CST m=+120.030561380: reload called by 0xc0001908c0
2024-05-27 15:42:37.838851891 +0800 CST m=+180.030846329: reload called by 0xc0001908c0
[INFO] Reloading
[INFO] plugin/auto: Inserting zone `example.com.' from: zonefile/db.example.com
[INFO] plugin/reload: Running configuration SHA512 = a5f02......
[INFO] Reloading complete
2024-05-27 15:42:51.081971917 +0800 CST m=+193.273966351: reloadShutdown called by 0xc0001908c0
2024-05-27 15:43:51.083877975 +0800 CST m=+253.275872413: reload called by 0xc000190000
2024-05-27 15:44:51.083605362 +0800 CST m=+313.275599800: reload called by 0xc000190000
[INFO] Reloading
[INFO] plugin/auto: Inserting zone `example.com.' from: zonefile/db.example.com
[INFO] plugin/reload: Running configuration SHA512 = e459......
[INFO] Reloading complete
2024-05-27 15:45:13.540742543 +0800 CST m=+335.732736977: reloadShutdown called by 0xc000190000
2024-05-27 15:46:13.542792686 +0800 CST m=+395.734787124: reload called by 0xc000190700
2024-05-27 15:47:13.54286623 +0800 CST m=+455.734860668: reload called by 0xc000190700

@Lin-1997 Lin-1997 requested review from miekg and stp-ip as code owners May 27, 2024 07:56
@kosmas-valianos
Copy link

kosmas-valianos commented May 28, 2024

Probably this will fix #6714 as well

@Lin-1997
Copy link
Contributor Author

Probably this will fix #6714 as well

Probably not. If you use SIGUSR2 to reload coredns, it will only read the new Coredns executable file, not the new Corefile. To load the new Corefile, use SIGUSR1. (and this will not read the new Coredns executable file)

@kosmas-valianos
Copy link

kosmas-valianos commented May 30, 2024

I use systemctl reload which is SIGUSR1

May 30 07:56:04 envy-10-98-138-3.devops systemd[1]: Reloading CoreDNS DNS server...
May 30 07:56:04 envy-10-98-138-3.devops cz-coredns[8982]: [INFO] SIGUSR1: Reloading
May 30 07:56:04 envy-10-98-138-3.devops cz-coredns[8982]: [INFO] Reloading

It loads the new Corefile. Everything is loading/changing fine besides the secondary plugin which keeps going even if its conf has changed. Something is definitely up with its shutdown/reload logic of this plugin

@chrisohaver chrisohaver merged commit d4e351c into coredns:master Oct 1, 2024
@Lin-1997 Lin-1997 deleted the fix/plugin-auto branch October 18, 2024 09:03
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.

plugin/auto should call zone.OnShutdown() for each zone in its own OnShutdown()

3 participants