2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-17 16:50:22 +00:00

issues for install license file on accton switches (#4460)

This commit is contained in:
cxhong
2017-12-07 01:53:32 -05:00
committed by yangsong
parent ab3dc751d7
commit e501b26fd0
2 changed files with 9 additions and 4 deletions

View File

@@ -153,6 +153,7 @@ sub config_ssh {
print "$switch is not reachable\n";
next;
}
my ($exp, $errstr) = cumulus_connect($ssh_ip, $userid, $password, $timeout);
if (!defined $exp) {
@@ -290,6 +291,9 @@ sub install_license {
xCAT::MsgUtils->message("E","Failed to $cmd to $switch");
next;
}
#restart switchd and reload interface
$cmd = "xdsh $switch 'systemctl enable switchd;systemctl restart switchd;ifreload -a' ";
xCAT::Utils->runcmd($cmd, 0);
push (@config_switches, $switch);
}
if (@config_switches) {
@@ -397,8 +401,8 @@ sub config_ntp {
xCAT::MsgUtils->message("E","xdsh command to $switch failed");
next;
}
my $cmd_line = "echo $timezone >/etc/timezone;dpkg-reconfigure --frontend noninteractive tzdata";
$cmd = "xdsh $switch $cmd_line";
$cmd = "xdsh $switch 'echo $timezone >/etc/timezone;dpkg-reconfigure --frontend noninteractive tzdata' ";
$rc= xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0) {
print "Failed to update ntp timezone\n";
xCAT::MsgUtils->message("E","Failed to update ntp timezone for $switch");

View File

@@ -61,8 +61,9 @@ if [ ! -f $xcat_intf ]; then
fi
# license needs to set before start switchd
if [ ! -e /etc/cumulus/.license* ]; then
echo "ERROR: cumulus license file does not exist";
/usr/cumulus/bin/cl-license 2>/dev/null
if [ $? -ne 0 ]; then
echo "ERROR: cumulus license does not exist";
exit 1;
fi