mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	if there are two roles for one chef-client, the script couldn't assign the
roles to the node. fixed it.
This commit is contained in:
		| @@ -206,11 +206,18 @@ then | ||||
|             exit 1 | ||||
|         fi | ||||
|  | ||||
|         roles=`echo $roles | sed -e 's/ /,/g'`  | ||||
|         r="";         | ||||
|         for onerole in $roles | ||||
|         do | ||||
|             r+="role[$onerole]," | ||||
|         done | ||||
|   | ||||
|         # assign the role for the chef node | ||||
|         knife node run_list add $c_fullname "role[$roles]" | ||||
|         knife node run_list add $c_fullname "$r" | ||||
|         if [ $? != 0 ] | ||||
|         then   | ||||
|             errmsg="Failed to run knife node run_list add $client 'role[$roles]' on the chef-server $NODE." | ||||
|             errmsg="Failed to run knife node run_list add $client '$r' on the chef-server $NODE." | ||||
|             logger -t xcat -p local4.err $errmsg | ||||
|             echo $errmsg | ||||
|             exit 1 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user