-Chase down master storage prereqs

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7321 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-08-31 15:01:24 +00:00
parent b76b8f87a5
commit 149e7eeae6
2 changed files with 27 additions and 3 deletions

View File

@ -26,7 +26,7 @@ sub grab_table_data{ #grab table data relevent to VM guest nodes
if ($vpdtab) {
$cfghash->{vpd} = $vpdtab->getNodesAttribs($noderange,['uuid']);
}
$cfghash->{vm} = $vmtab->getNodesAttribs($noderange,['node','host','migrationdest','cfgstore','storage','storagemodel','memory','cpus','nics','nicmodel','bootorder','virtflags']);
$cfghash->{vm} = $vmtab->getNodesAttribs($noderange,['node','host','migrationdest','cfgstore','storage','storagemodel','memory','cpus','nics','nicmodel','bootorder','virtflags','master']);
my $mactab = xCAT::Table->new("mac",-create=>1);
my $nrtab= xCAT::Table->new("noderes",-create=>1);
$cfghash->{mac} = $mactab->getAllNodeAttribs(['mac'],1);

View File

@ -750,7 +750,19 @@ sub migrate {
s/=.*//;
get_storage_pool_by_url($_,$desthypconn,$targ);
}
#TODO: VMCLONE if vm.master is set, got to vmmaster.storage for that master and add it to prereq resolution here
if ($confdata->{vm}->{$node}->[0]->{master}) {
my $vmmastertab=xCAT::Table->new('vmmaster',-create=>0);
my $masterent;
if ($vmmastertab) {
$masterent=$vmmastertab->getAttribs({name=>$confdata->{vm}->{$node}->[0]->{master}},['storage']);
}
if ($masterent and $masterent->{storage}) {
foreach (split /,/,$masterent->{storage}) {
s/=.*//;
get_storage_pool_by_url($_,$desthypconn,$targ);
}
}
}
}
my $sock = IO::Socket::INET->new(Proto=>'udp');
my $ipa=inet_aton($node);
@ -845,7 +857,19 @@ sub makedom {
s/=.*//;
get_storage_pool_by_url($_);
}
#TODO: VMCLONE if vm.master is set, got to vmmaster.storage for that master and add it to prereq resolution here
if ($confdata->{vm}->{$node}->[0]->{master}) {
my $vmmastertab=xCAT::Table->new('vmmaster',-create=>0);
my $masterent;
if ($vmmastertab) {
$masterent=$vmmastertab->getAttribs({name=>$confdata->{vm}->{$node}->[0]->{master}},['storage']);
}
if ($masterent and $masterent->{storage}) {
foreach (split /,/,$masterent->{storage}) {
s/=.*//;
get_storage_pool_by_url($_);
}
}
}
}
$xml = $confdata->{kvmnodedata}->{$node}->[0]->{xml};
my $newxml = fixbootorder($node,$xml);