mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	-Fix problem where failed migration caused xCAT to lose track of Xen hypervisor
-Fix problem where the gPXE dhcp configuration would not work git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2472 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -233,7 +233,7 @@ sub addnode | ||||
|                     if ($chainent and $chainent->{currstate} and $chainent->{currstate} eq 'iscsiboot') { | ||||
|                         $lstatements = 'if exists gpxe.bus-id { filename = \"\"; } else { filename = \"undionly.kpxe\"; } '.$lstatements; | ||||
|                     } else { | ||||
|                         $lstatements = 'if exists gpxe.bus-id { filename = \"pxelinux.0\"; } else { filename = \"undionly.kpxe\"; } '.$lstatements; | ||||
|                         $lstatements = 'if exists gpxe.bus-id { filename = \"pxelinux.0\"; } else if exists client-architecture { filename = \"undionly.kpxe\"; } '.$lstatements; #Only PXE compliant clients should ever receive gPXE | ||||
|                     }  | ||||
|                 } #TODO: warn when windows | ||||
|             } | ||||
| @@ -768,6 +768,9 @@ sub newconfig | ||||
|     push @dhcpconf, "#xCAT generated dhcp configuration\n"; | ||||
|     push @dhcpconf, "\n"; | ||||
|     push @dhcpconf, "authoritative;\n"; | ||||
|     push @dhcpconf, "option space gpxe;\n"; | ||||
|     push @dhcpconf, "option gpxe-encap-opts code 175 = encapsulate gpxe;\n"; | ||||
|     push @dhcpconf, "option gpxe.bus-id code 177 = string;\n"; | ||||
|     push @dhcpconf, "ddns-update-style none;\n"; | ||||
|     push @dhcpconf, | ||||
|       "option client-architecture code 93 = unsigned integer 16;\n"; | ||||
|   | ||||
| @@ -275,13 +275,13 @@ sub migrate { | ||||
|     eval { | ||||
|      $dom = $newhypconn->get_domain_by_name($node); | ||||
|     }; | ||||
|     $vmtab->setNodeAttribs($node,{host=>$targ}); | ||||
|     if ($dom) { | ||||
|         refresh_vm($dom); | ||||
|     } | ||||
|     if ($rc) { | ||||
|         return (1,"Failed migration from $prevhyp to $targ"); | ||||
|     } else { | ||||
|         $vmtab->setNodeAttribs($node,{host=>$targ}); | ||||
|         return (0,"migrated to $targ"); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user