Commit 4fb4ab9c authored by Ryan Jackson's avatar Ryan Jackson

Restart dhcpd on all subbosses

When rebuilding the dhcpd.conf file, make sure to restart dhcpd on all
subbosses and not just the ones that are listed in the subbosses
table.  Otherwise if all nodes are moved from one subboss to another
the old subboss will continue to try serving dhcp leases when it
parent 2b839ca7
......@@ -174,11 +174,17 @@ if (! $query_result) {
while (my %row = $query_result->fetchhash()) {
my $node_id = $row{"node_id"};
# We need to try restarting dhcpd on *all* subbosses, just in case
# we've moved all dhcp nodes from one subboss to another.
# Otherwise the old server wouldn't get restarted and both the old
# and new servers would attempt to respond to dhcp requests.
$subboss_dhcp_servers{$row{"subboss_id"}} = 1;
if ($row{"service"} eq 'tftp') {
$tftp_subbosses{$node_id} = $row{"IP"};
} elsif ($row{"service"} eq 'dhcp') {
$dhcp_subbosses{$node_id} = $row{"IP"};
$subboss_dhcp_servers{$row{"subboss_id"}} = 1;
} elsif ($row{"service"} eq 'bootinfo') {
$bootinfo_subbosses{$node_id} = $row{"IP"};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment