use new noderangecontainsMN routine
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13448 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
84ab9da2cf
commit
35f3c53a4d
@ -3805,23 +3805,13 @@ sub parse_and_run_dsh
|
||||
# check if any node in the noderange is the Management Node and exit
|
||||
# with error, if the Management Node is in the Database and in the
|
||||
# noderange
|
||||
my $mname;
|
||||
my $tab = xCAT::Table->new('nodetype');
|
||||
my @nodelist2=$tab->getAllNodeAttribs(['node','nodetype']);
|
||||
foreach my $n (@nodelist2) {
|
||||
if ($n->{'nodetype'} eq "mn") { # this is the MN
|
||||
$mname=$n->{'node'};
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ($mname) { # MN in the database
|
||||
if (grep(/$mname/, @nodelist)) { # if MN in the noderange
|
||||
my $mname = xCAT::Utils->noderangecontainsMn(@nodelist);
|
||||
if ($mname) { # MN in the nodelist
|
||||
my $rsp = {};
|
||||
$rsp->{error}->[0] =
|
||||
"You must not run -K option against the Management Node:$mname.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
# if devicetype=Mellanox, xdsh does not setup ssh, rspconfig does
|
||||
if ($switchtype =~ /Mellanox/i) {
|
||||
|
Loading…
Reference in New Issue
Block a user