diff --git a/xCAT-UI/lib/cmd.php b/xCAT-UI/lib/cmd.php index d272b9d79..37a9bec6a 100644 --- a/xCAT-UI/lib/cmd.php +++ b/xCAT-UI/lib/cmd.php @@ -67,6 +67,11 @@ if (isset($_GET["cmd"])) { $opts_array = array($opts); } } + + // Time needed to update /etc/hosts + if (strncasecmp($cmd, "makehosts", 9) == 0) { + sleep(5); + } // Submit request and get response $xml = docmd($cmd, $tgt, $args_array, $opts_array); @@ -78,21 +83,21 @@ if (isset($_GET["cmd"])) { $rsp = array(); // webrun pping and gangliastatus output needs special handling - if(strncasecmp($cmd, "webrun", 6) == 0 && (stristr($args, "pping") || stristr($args, "gangliastatus") || stristr($args, "chtab"))) { + if (strncasecmp($cmd, "webrun", 6) == 0 && (stristr($args, "pping") || stristr($args, "gangliastatus") || stristr($args, "chtab"))) { $rsp = extractWebrun($xml); } // nodels output needs special handling - else if(strncasecmp($cmd, "nodels", 6) == 0) { + else if (strncasecmp($cmd, "nodels", 6) == 0) { // Handle the output the same way as webrun $rsp = extractNodels($xml); } // extnoderange output needs special handling // This command gets the nodes and groups - else if(strncasecmp($cmd, "extnoderange", 12) == 0) { + else if (strncasecmp($cmd, "extnoderange", 12) == 0) { $rsp = extractExtnoderange($xml); } // Write contents to file - else if(strncasecmp($cmd, "write", 4) == 0) { + else if (strncasecmp($cmd, "write", 4) == 0) { // Directory should be /var/opt/xcat/profiles // You can write anything to that directory $file = "$tgt"; diff --git a/xCAT-UI/xcat/plugins/webportal.pm b/xCAT-UI/xcat/plugins/webportal.pm index 6bac4b854..1e56775ff 100644 --- a/xCAT-UI/xcat/plugins/webportal.pm +++ b/xCAT-UI/xcat/plugins/webportal.pm @@ -19,6 +19,7 @@ use Getopt::Long; use Data::Dumper; use xCAT::Table; use xCAT::NodeRange; +use xCAT::zvmUtils; use XML::Simple; require XML::Parser; @@ -674,6 +675,7 @@ sub clonezlinux { $out = `chtab node=$node noderes.netboot=zvm nodetype.nodetype=osi nodetype.provmethod=install nodetype.os=$os nodetype.arch=$arch nodetype.profile=$profile nodetype.comments="owner:$owner"`; # Update hosts table and DNS + sleep(5); # Time needed to update /etc/hosts `makehosts`; `makedns`;