2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 19:22:05 +00:00

More fixes due to review comments

This commit is contained in:
Mark Gurevich 2016-07-12 09:13:40 -04:00
parent 05f2832e7d
commit 97a159d47a
2 changed files with 4 additions and 6 deletions

View File

@ -724,16 +724,16 @@ sub process_request {
}
}
my @makedhcp_nodes;
if ($args[0] eq 'offline') {
my @rmdhcp_nodes;
# If nodeset directive was offline we need to remove the architecture file link and remove dhcp entries
foreach my $osimage (keys %osimagenodehash) {
foreach my $tmp_node (@{ $osimagenodehash{$osimage} }) {
unlink( "$tftpdir/boot/grub2/grub2-$tmp_node");
push(@makedhcp_nodes, $tmp_node);
push(@rmdhcp_nodes, $tmp_node);
}
}
$sub_req->({ command => ['makedhcp'],arg=>['-d'], node => \@makedhcp_nodes }, $callback);
$sub_req->({ command => ['makedhcp'],arg=>['-d'], node => \@rmdhcp_nodes }, $callback);
}
#now run the end part of the prescripts

View File

@ -532,7 +532,6 @@ sub process_request {
my $linuximgtab=xCAT::Table->new('linuximage',-create=>1);
my %machash = %{$mactab->getNodesAttribs(\@nodes,[qw(mac)])};
my @makedhcp_nodes;
foreach (@nodes) {
my $tftpdir;
if ($nrhash{$_}->[0] and $nrhash{$_}->[0]->{tftpdir}) {
@ -567,13 +566,12 @@ sub process_request {
unlink($tftpdir."/xcat/xnba/nodes/".$_.".pxelinux");
unlink($tftpdir."/xcat/xnba/nodes/".$_.".uefi");
unlink($tftpdir."/xcat/xnba/nodes/".$_.".elilo");
push(@makedhcp_nodes, $_);
}
}
}
# for offline operation, remove the dhcp entries
if ($args[0] eq 'offline') {
$sub_req->({ command => ['makedhcp'],arg=>['-d'],node => \@makedhcp_nodes }, $::XNBA_callback);
$sub_req->({ command => ['makedhcp'],arg=>['-d'],node => \@nodes }, $::XNBA_callback);
}