-Allow a site entry to enable service pruning where noderm actively removes data from related services rather than just xCAT configuration itself
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4139 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
79f816a417
commit
540bf7da21
@ -556,6 +556,7 @@ site => {
|
||||
" ppcmaxp:\tThe max # of processes for PPC hw ctrl.\n\n".
|
||||
" ppcretry:\tThe max # of PPC hw connection attempts before failing.\n\n".
|
||||
" ppctimeout:\tThe timeout, in milliseconds, to use when communicating with PPC hw.\n\n".
|
||||
" pruneservices:\tWhether to enable service pruning when noderm is run (i.e. removing DHCP entries when noderm is executed)\n\n".
|
||||
" sharedtftp:\tSet to no/0 if xCAT should not assume /tftpboot is mounted on all service nodes. Default is 1.\n\n".
|
||||
" timezone:\t(e.g. America/New_York)\n\n".
|
||||
" useSSHonAIX:\t(yes/1 or no/0). If yes, ssh/scp will be setup and used. If no, rsh/rcp will be setup and used on AIX.\n\n".
|
||||
|
@ -15,6 +15,7 @@ use xCAT::NodeRange qw/noderange abbreviate_noderange/;
|
||||
use xCAT::Schema;
|
||||
use xCAT::Utils;
|
||||
use Getopt::Long;
|
||||
my $requestcommand;
|
||||
|
||||
1;
|
||||
|
||||
@ -74,6 +75,7 @@ sub process_request
|
||||
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
$requestcommand = shift;
|
||||
my $nodes = $request->{node};
|
||||
my $command = $request->{command}->[0];
|
||||
my $args = $request->{arg};
|
||||
@ -243,6 +245,13 @@ sub noderm
|
||||
}
|
||||
|
||||
if (!$nodes) { $noderm_usage->(1); return; }
|
||||
my $sitetab = xCAT::Table->new('site');
|
||||
my $pdhcp = $sitetab->getAttribs({key=>'pruneservices'},['value']);
|
||||
if ($pdhcp and $pdhcp->{value} and $pdhcp->{value} !~ /n(\z|o)/i) {
|
||||
$executecommand->({command=>['makedhcp'],node=>$nodes,arg=>['-d']});
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Build the argument list for using the -d option of nodech to do our work for us
|
||||
my @tablist = ("-d");
|
||||
|
Loading…
x
Reference in New Issue
Block a user