mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	fix issue 5548, if ip source is dhcp will remind that could not set ntpservers
This commit is contained in:
		| @@ -334,6 +334,9 @@ rmdir \"/tmp/$userid\" \n") | ||||
|         if not nic: | ||||
|             return self.callback.error('Can not get facing NIC for %s' % bmcip, node) | ||||
|  | ||||
|         if (netinfo[nic]['ipsrc'] == 'DHCP'): | ||||
|             return self.callback.error('BMC IP source is DHCP, could not set NTPServers', node) | ||||
|  | ||||
|         try: | ||||
|             obmc.set_ntp_servers(nic, servers) | ||||
|             self.callback.info('%s: BMC Setting NTPServers...' % node) | ||||
|   | ||||
| @@ -3532,6 +3532,11 @@ sub rspconfig_response { | ||||
|                 if (defined($content{Address}) and $content{Address}) { | ||||
|                     if ($content{Address} eq $node_info{$node}{bmcip} and $node_info{$node}{cur_status} eq "RSPCONFIG_GET_NIC_RESPONSE") { | ||||
|                         $status_info{RSPCONFIG_SET_NTPSERVERS_REQUEST}{init_url} =~ s/#NIC#/$nic/g; | ||||
|                         if (defined($content{Origin}) and $content{Origin} =~ /DHCP$/) { | ||||
|                             xCAT::SvrUtils::sendmsg([1, "BMC IP source is DHCP, could not set NTPServers"], $callback, $node); | ||||
|                             $wait_node_num--; | ||||
|                             return; | ||||
|                         } | ||||
|                         if ($next_status{"RSPCONFIG_GET_NIC_RESPONSE"}) { | ||||
|                             $node_info{$node}{cur_status} = $next_status{"RSPCONFIG_GET_NIC_RESPONSE"}; | ||||
|                             gen_send_request($node); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user