-Fix mistake in storage migration table save

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6518 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-06-17 19:42:22 +00:00
parent 687683721b
commit 5fdc99f45e

View File

@ -910,14 +910,14 @@ sub relocate_callback {
my $state = $task->info->state->val;
if ($state eq 'success') {
my $vmtab = xCAT::Table->new('vm'); #TODO: update vm.storage?
my $prevloc = $tablecfg{vm}->{$node}->[0]->{storage};
my $prevloc = $tablecfg{vm}->{$parms->{node}}->[0]->{storage};
my $model;
($prevloc,$model) = split /=/,$prevloc;
my $target = $parms->{target};
if ($prevloc) {
$target.="=$prevloc";
if ($model) {
$target.="=$model";
}
$vmtab->setNodeAttribs($parms->{node},{storage=>$target);
$vmtab->setNodeAttribs($parms->{node},{storage=>$target});
sendmsg(":relocated to to ".$parms->{target},$parms->{node});
} else {
relay_vmware_err($task,"Relocating to ".$parms->{target}." ",$parms->{node});