add error msg for bad monserver attr
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8598 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
9b26e72eaa
commit
76bb8c0836
@ -386,13 +386,21 @@ sub process_request
|
||||
}
|
||||
|
||||
#set monserver ( = "servicenode,xcatmaster" )
|
||||
if ($nhash{$node}{'monserver'})
|
||||
if ($nhash{$node}{'monserver'}) # if it is currently set
|
||||
{
|
||||
my @tmp_a = split(',', $nhash{$node}{'monserver'});
|
||||
if ((@tmp_a > 1) && ($tmp_a[1] eq $sn1n))
|
||||
if (scalar(@tmp_a) < 2) # it must have two values
|
||||
{
|
||||
$sn_hash{$node}{'monserver'} = "$newsn{$node},$newxcatmaster{$node}";
|
||||
}
|
||||
my $rsp;
|
||||
push @{$rsp->{data}}, "The current value of the monserver attribute is not valid. It will not be reset.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
} else {
|
||||
# if the first value is the current service node then change it
|
||||
if ($tmp_a[0] eq $sn1)
|
||||
{
|
||||
$sn_hash{$node}{'monserver'} = "$newsn{$node},$newxcatmaster{$node}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user