mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-24 15:05:36 +00:00
modify depending on ertao's comment
This commit is contained in:
@ -676,17 +676,6 @@ sub do_pre_check {
|
||||
my $rst = 0;
|
||||
my $msg;
|
||||
|
||||
if (defined($noderange) && defined($discovery_type)) {
|
||||
$msg = "All pre_defined nodes '$noderange' are valid";
|
||||
my $rc = check_pre_defined_node($discovery_type, $noderange);
|
||||
if ($rc) {
|
||||
probe_utils->send_msg("$output", "f", $msg);
|
||||
$rst = 1;
|
||||
} else {
|
||||
probe_utils->send_msg("$output", "o", $msg);
|
||||
}
|
||||
}
|
||||
|
||||
#The block of $nics is ture is a reservation part, this part don't show up in usage
|
||||
if ($nics) {
|
||||
if ($nics =~ /[^\w|]/) {
|
||||
@ -815,21 +804,6 @@ sub do_monitor {
|
||||
$terminal = 1;
|
||||
};
|
||||
|
||||
#check pre_defined node should be done during "do_pre_check" part.
|
||||
#if we use '--noprecheck' to skip pre_check(include pre_defined node checking)
|
||||
#then go to monitor directly, we should do pre_defined node checking
|
||||
#here if noderange and discovery_type are specified.
|
||||
if ($no_pre_check && defined($noderange) && defined($discovery_type)) {
|
||||
$msg = "All pre_defined nodes are valid";
|
||||
my $rc = check_pre_defined_node($discovery_type, $noderange);
|
||||
if ($rc) {
|
||||
probe_utils->send_msg("$output", "f", $msg);
|
||||
return 1;
|
||||
} else {
|
||||
probe_utils->send_msg("$output", "o", $msg);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$nics) {
|
||||
my $masteripinsite = `tabdump site | awk -F',' '/master/ { gsub(/"/, "", \$2) ; print \$2 }'`;
|
||||
chomp($masteripinsite);
|
||||
@ -1012,6 +986,17 @@ if (defined($discovery_type)) {
|
||||
}
|
||||
}
|
||||
|
||||
if (defined($noderange) && defined($discovery_type)) {
|
||||
$msg = "All pre_defined nodes are valid";
|
||||
my $rc = check_pre_defined_node($discovery_type, $noderange);
|
||||
if ($rc) {
|
||||
probe_utils->send_msg("$output", "f", $msg);
|
||||
return 1;
|
||||
} else {
|
||||
probe_utils->send_msg("$output", "o", $msg);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$no_pre_check) {
|
||||
$rst = do_pre_check();
|
||||
exit 1 if ($rst);
|
||||
|
Reference in New Issue
Block a user