From 97a159d47a1aff120c40f984f274ac2bc67157c4 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 12 Jul 2016 09:13:40 -0400 Subject: [PATCH] More fixes due to review comments --- xCAT-server/lib/xcat/plugins/grub2.pm | 6 +++--- xCAT-server/lib/xcat/plugins/xnba.pm | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/grub2.pm b/xCAT-server/lib/xcat/plugins/grub2.pm index 8d0aecd57..993c8bbe7 100644 --- a/xCAT-server/lib/xcat/plugins/grub2.pm +++ b/xCAT-server/lib/xcat/plugins/grub2.pm @@ -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 diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index d3b4c4d51..9741a23d9 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -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); }