The "rndc reconfig" in /etc/network/if-down.d/bind9 should be in /etc/network/if-post-down.d/bind9

Bug #1087228 reported by Thomas Hood
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bind9 (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

The bind9 package includes /etc/network/if-down.d/bind9 which does "rndc reconfig". But this should only be done *after* the interface has been deconfigured not before.

NetworkManager's /etc/NetworkManager/dispatcher.d/01ifupdown run-partses only /etc/network/if-up.d and /etc/network/if-post-down.d, so when an interface is deconfigured using NetworkManager the bind9 hook script doesn't get run at all; named does not notice that the interface has been deconfigured until its next poll (which happens every 60 minutes by default).

It looks to me as if the "rndc reconfig" in /etc/network/if-down.d/bind9 should be moved into /etc/network/if-post-down.d/bind9.

bind 9 1:9.8.1.dfsg.P1-4.2ubuntu3

Changed in bind9 (Ubuntu):
status: New → Opinion
importance: Undecided → Wishlist
Revision history for this message
Thomas Hood (jdthood) wrote :

This report has been downgraded to "wishlist opinion". Very well, Yolanda, but please accompany that change with some sort of explanation.

Bind9's ifdown hook script does "rndc reconfig" which causes named to notice changes that have been made. If the script is run *before* taking down the interface then it is run when no changes have yet been made, so it has no effect. Immediately after this, ifdown takes down the interface, but nothing causes named to notice this change. This behavior was noticed in the real world and can easily be reproduced.

Thus in my opinion this is an obvious bug and I wish it to be fixed ASAP.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Opinion is a closing state for things that won't get fixed, please avoid using it unless you actually mean it :)

This is clearly a bug, describing a race condition causing problems with essential part of Ubuntu (resolvconf), so I'm changing this to Triaged and Medium (as it doesn't seem to be causing horrible breakage).

Changed in bind9 (Ubuntu):
status: Opinion → Triaged
importance: Wishlist → Medium
Revision history for this message
Thomas Hood (jdthood) wrote :

Thanks, Stéphane.

It doesn't actually affect resolvconf — sorry if I gave that impression. Because it is only the "down" script that is run at the wrong time (it is currently run at pre-down time instead of post-down time), the effect of the bug is minor: it only means that named is listening on the address of an interface that has since been deconfigured. Of course, if the admin customizes the script, misled into thinking that it gets run at post-down time (as it apparently should be) then it could become a bit more serious.

summary: - /etc/network/if-down.d/bind9 doesn't work; should be /etc/network/if-
- post-down.d/bind9
+ The "rndc reconfig" in /etc/network/if-down.d/bind9 should be in
+ /etc/network/if-post-down.d/bind9
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.