more fixes for RMC monitoring on AIX and Linux
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1802 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
5b1e52e40f
commit
2a567b9675
@ -28,16 +28,24 @@ fi
|
||||
|
||||
#ask RMC take the new nodeid
|
||||
if [[ $NODEID != "" ]]; then
|
||||
#stop all rmc daemons
|
||||
/usr/sbin/rsct/bin/rmcctrl -z
|
||||
|
||||
#get new nodeid into id files
|
||||
if [ -e /var/ct/cfg/ct_node_id ]; then
|
||||
sed -i s/^[^\#].*$/$NODEID/ /var/ct/cfg/ct_node_id
|
||||
sed s/^[^\#].*$/$NODEID/ /var/ct/cfg/ct_node_id > /tmp/id.tmp
|
||||
else
|
||||
echo $NODEID > /var/ct/cfg/ct_node_id
|
||||
fi
|
||||
if [ -e /etc/ct_node_id ]; then
|
||||
sed -i s/^[^\#].*$/$NODEID/ /etc/ct_node_id
|
||||
else
|
||||
echo $NODEID > /etc/ct_node_id
|
||||
if [ -e /etc/ct_node_id ]; then
|
||||
sed s/^[^\#].*$/$NODEID/ /etc/ct_node_id > /tmp/id.tmp
|
||||
else
|
||||
echo $NODEID > /tmp/id.tmp
|
||||
fi
|
||||
fi
|
||||
cp /tmp/id.tmp /var/ct/cfg/ct_node_id
|
||||
cp /tmp/id.tmp /etc/ct_node_id
|
||||
rm /tmp/id.tmp
|
||||
|
||||
#reconfig RMC
|
||||
result=`/usr/sbin/rsct/install/bin/recfgct -s 2>&1`
|
||||
if [ $? -ne 0 ]; then
|
||||
logger xCAT "RMC setup on node $NODE: Cannot reconfig RSCT with new node id"
|
||||
@ -69,7 +77,7 @@ if [ $ADD -eq 1 ]; then
|
||||
#ms_ip=${result:$index1+1:$index2-$index1-2}
|
||||
pos=`expr $index1 + 1`
|
||||
length=`expr $index2 - $index1`
|
||||
length=`expr $length - 2`
|
||||
length=`expr $length - 1`
|
||||
ms_ip=`expr substr "$result" $pos $length`
|
||||
else
|
||||
logger xCAT "RMC setup on node $NODE:$result"
|
||||
|
@ -255,14 +255,6 @@ sub nimnodeset
|
||||
return 1;
|
||||
}
|
||||
|
||||
###################
|
||||
#give monitoring code a chance to prepare the master for the node deployment
|
||||
my %new_request = (
|
||||
command => ['moncfgmaster'],
|
||||
node => \@nodelist
|
||||
);
|
||||
$sub_req->(\%new_request, \&pass_along);
|
||||
###################
|
||||
|
||||
#
|
||||
# Get a list of the defined NIM machines
|
||||
@ -529,6 +521,16 @@ ll~;
|
||||
my $rsp;
|
||||
push @{$rsp->{data}}, "AIX/NIM nodes were initialized.\n";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
###################
|
||||
#give monitoring code a chance to prepare the master for the node deployment
|
||||
#push @{$rsp->{data}}, "Initializing for the node monitoring.\n";
|
||||
#xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
my %new_request = (
|
||||
command => ['moncfgmaster'],
|
||||
node => \@nodelist
|
||||
);
|
||||
$sub_req->(\%new_request, \&pass_along);
|
||||
###################
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
@ -2675,15 +2677,7 @@ sub mkdsklsnode
|
||||
return 1;
|
||||
}
|
||||
|
||||
#################
|
||||
#give monitoring code a chance to prepare the master for the node deployment
|
||||
my %new_request = (
|
||||
command => ['moncfgmaster'],
|
||||
node => \@nodelist
|
||||
);
|
||||
$sub_req->(\%new_request, \&pass_along);
|
||||
#################
|
||||
|
||||
|
||||
#
|
||||
# Get a list of the defined NIM machines
|
||||
#
|
||||
@ -2991,7 +2985,17 @@ if (0) {
|
||||
my $rsp;
|
||||
push @{$rsp->{data}}, "AIX/NIM diskless nodes were initialized.\n";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
return 0;
|
||||
#################
|
||||
#give monitoring code a chance to prepare the master for the node deployment
|
||||
#push @{$rsp->{data}}, "Initializing for the node monitoring.\n";
|
||||
#xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
my %new_request = (
|
||||
command => ['moncfgmaster'],
|
||||
node => \@nodelist
|
||||
);
|
||||
$sub_req->(\%new_request, \&pass_along);
|
||||
#################
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -233,14 +233,6 @@ sub process_request {
|
||||
return;
|
||||
}
|
||||
|
||||
#give monitoring code a chance to prepare the master for the node deployment
|
||||
my %new_request = (
|
||||
command => ['moncfgmaster'],
|
||||
node => \@rnodes
|
||||
);
|
||||
$sub_req->(\%new_request, \&pass_along);
|
||||
|
||||
#back to normal business
|
||||
#if not shared, then help sync up
|
||||
if ($req->{_disparatetftp}) { #reading hint from preprocess_command
|
||||
@nodes = ();
|
||||
@ -290,6 +282,16 @@ sub process_request {
|
||||
setstate($_);
|
||||
}
|
||||
}
|
||||
|
||||
##################################
|
||||
#give monitoring code a chance to prepare the master for the node deployment
|
||||
my %new_request = (
|
||||
command => ['moncfgmaster'],
|
||||
node => \@rnodes
|
||||
);
|
||||
$sub_req->(\%new_request, \&pass_along);
|
||||
##################################
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -224,12 +224,6 @@ sub process_request {
|
||||
return;
|
||||
}
|
||||
|
||||
#give monitoring code a chance to prepare the master for the node deployment
|
||||
my %new_request = (
|
||||
command => ['moncfgmaster'],
|
||||
node => \@rnodes
|
||||
);
|
||||
$sub_req->(\%new_request, \&pass_along);
|
||||
|
||||
#back to normal business
|
||||
#if not shared tftpdir, then filter, otherwise, set up everything
|
||||
@ -267,6 +261,15 @@ sub process_request {
|
||||
setstate($_);
|
||||
}
|
||||
}
|
||||
|
||||
#####################################
|
||||
# give monitoring code a chance to prepare the master for the node deployment
|
||||
my %new_request = (
|
||||
command => ['moncfgmaster'],
|
||||
node => \@rnodes
|
||||
);
|
||||
$sub_req->(\%new_request, \&pass_along);
|
||||
#####################################
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user