diff --git a/tbsetup/libvtop.pm.in b/tbsetup/libvtop.pm.in index a5495024e7eee94f725c23a616470ffd8d7bf53b..96d0393bf601f2005e214f8bb237fc3736b649a3 100644 --- a/tbsetup/libvtop.pm.in +++ b/tbsetup/libvtop.pm.in @@ -3146,6 +3146,10 @@ sub AddLinkToSolution($$$$$$$$) $member0->_lannode($nodeB); $member0->_lanport($portB); } + else { + $member0->_lannode("null"); + $member0->_lanport("null"); + } } } elsif (($lan,$virtA) = @@ -3656,7 +3660,7 @@ sub AllocNodes($) if (exists($self->solution()->{'TORESERVE'}->{$nodeid})) { $self->newreserved()->{$nodeid} = $nodeid; $pnode->SetAllocState(TBDB_ALLOCSTATE_RES_INIT_DIRTY()) - if (!($self->impotent() || $self->alloconly())); + if ($self->impotent()); # # Fix all of the nodes assigned to the pnode. @@ -3769,7 +3773,7 @@ sub AllocNodes($) # Mark it for teardown by the caller (tbswap currently). # $pnode->SetAllocState(TBDB_ALLOCSTATE_RES_TEARDOWN()) - if (!($self->impotent() || $self->alloconly())); + if (! $self->impotent()); } elsif ($pnode->_reuse() eq "reboot") { # @@ -3777,7 +3781,7 @@ sub AllocNodes($) # it should be rebooted. # $pnode->SetAllocState(TBDB_ALLOCSTATE_RES_INIT_DIRTY()) - if (!($self->impotent() || $self->alloconly())); + if (! $self->impotent()); } } skip: @@ -4134,8 +4138,7 @@ sub AllocVirtNodes($) "nodeid" => $physical, "debug" => 0, "verbose" => $self->verbose(), - "impotent" => $self->impotent() || - $self->alloconly(), + "impotent" => $self->impotent(), "sharedokay" => $sharedokay, "regression" => $self->regression()}) < 0) { @@ -4225,7 +4228,7 @@ sub AllocVirtNodes($) # state they were in so that os_setup/vnode_setup know they # need to reboot them. # - if (!($self->impotent() || $self->alloconly())) { + if (! $self->impotent()) { if (!exists($self->current_v2v()->{$virtual})) { $pnode->SetAllocState(TBDB_ALLOCSTATE_RES_INIT_CLEAN()); } @@ -4234,6 +4237,12 @@ sub AllocVirtNodes($) $pnode->SetAllocState(TBDB_ALLOCSTATE_RES_INIT_DIRTY()); } } + # + # When doing alloconly, we have to set the vname for the + # physical nodes so that update works. + # + $pnode->ModifyReservation({"vname" => $virtual}) == 0 + or return -1 if (!$self->impotent() && $self->alloconly()); } # Since we have some extra physical vnodes reserved on this pnode, @@ -4246,7 +4255,9 @@ sub AllocVirtNodes($) my $pnode = $self->pnodes()->{$pname}; $pnode->SetAllocState(TBDB_ALLOCSTATE_RES_TEARDOWN()) - if (!($self->impotent() || $self->alloconly())); + if (!$self->impotent() && + $pnode->allocstate() ne + TBDB_ALLOCSTATE_RES_INIT_CLEAN()); } } }