All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit fd9bd976 authored by Leigh B Stoller's avatar Leigh B Stoller

Fix two small problems with Addnode/Deletenode.

1. Do not start a second copy of the event scheduler. This is the cause
   of all the slurm error messages on the APT cluster. Clearly this was
   wrong for DeleteNode(). AddNode is still open for debate, but at
   least now the error mail will stop.

2. Do not reset the startstatus either, this was causing web interface
   to think startup services were running, when in fact they are not
   since the other nodes are not rebooted. In the classic interface,
   node reboot does not change the startstatus either, so lets mirror
   that in the Geni interface.
parent 394b3fd2
......@@ -34,7 +34,8 @@ package GeniAggregate;
#
use strict;
use Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK $ACTION_FLAGS_SYNCVLANS);
use vars qw(@ISA @EXPORT @EXPORT_OK
$ACTION_FLAGS_SYNCVLANS $ACTION_FLAGS_NOEVENTSTART);
@ISA = qw(Exporter);
@EXPORT = qw();
......@@ -98,9 +99,10 @@ my %aggregates = ();
BEGIN { use GeniUtil; GeniUtil::AddCache(\%aggregates); }
# Action() flags.
$ACTION_FLAGS_SYNCVLANS = 0x01;
$ACTION_FLAGS_SYNCVLANS = 0x01;
$ACTION_FLAGS_NOEVENTSTART = 0x02;
@EXPORT_OK = qw($ACTION_FLAGS_SYNCVLANS);
@EXPORT_OK = qw($ACTION_FLAGS_SYNCVLANS $ACTION_FLAGS_NOEVENTSTART);
#
# Lookup by URN, idx, or uuid.
......@@ -1656,7 +1658,8 @@ sub Action($$$;$)
return -1;
}
}
elsif ($action eq "start" || $action eq "restart") {
elsif (($action eq "start" || $action eq "restart") &&
($flags & $ACTION_FLAGS_NOEVENTSTART) == 0) {
$self->ComputeState();
if ($self->status() eq "ready") {
......
......@@ -2004,7 +2004,8 @@ sub AddNodes($)
$mypid = $PID;
if ($aggregate->Start($API_VERSION,
$GeniAggregate::ACTION_FLAGS_SYNCVLANS) != 0) {
$GeniAggregate::ACTION_FLAGS_SYNCVLANS|
$GeniAggregate::ACTION_FLAGS_NOEVENTSTART) != 0) {
if ($PID == $mypid) {
$slice->UnLock();
print STDERR "Could not start sliver.\n";
......@@ -2189,7 +2190,8 @@ sub DeleteNodes($)
$mypid = $PID;
if ($aggregate->Start($API_VERSION,
$GeniAggregate::ACTION_FLAGS_SYNCVLANS) != 0) {
$GeniAggregate::ACTION_FLAGS_SYNCVLANS|
$GeniAggregate::ACTION_FLAGS_NOEVENTSTART) != 0) {
if ($PID == $mypid) {
$slice->UnLock();
print STDERR "Could not start sliver.\n";
......
......@@ -1008,20 +1008,26 @@ sub Provision($;$)
print STDERR "Could not get pnode object for $node\n";
return -1;
}
# This would typically happen in libvtop, but we call the mapper
# in a way that causes it to not happen. Do not do this after
# initial provisioning.
$node->ResetStartStatus()
if (!$node->genisliver_idx());
# Mark
$node->ModifyReservation({"genisliver_idx" => $self->idx()});
# This would typically happen in libvtop, but we call the mapper
# in a way that causes it to not happen.
$node->ResetStartStatus();
my $subtype = GeniXML::GetVirtualizationSubtype($self->rspec());
if (defined($subtype)) {
if (!$pnode->sharing_mode()) {
$pnode->ModifyReservation({"genisliver_idx" => $self->idx()});
# This would typically happen in libvtop, but we call the mapper
# in a way that causes it to not happen.
$node->ResetStartStatus();
# in a way that causes it to not happen. Do not do this after
# initial provisioning.
$pnode->ResetStartStatus()
if (!$pnode->genisliver_idx());
# Mark
$pnode->ModifyReservation({"genisliver_idx" => $self->idx()});
}
}
}
......@@ -1030,12 +1036,17 @@ sub Provision($;$)
# For a "raw" node, there is no vnode, so this is the pnode
# we need to mark for tmcd.
#
# This would typically happen in libvtop, but we call the mapper
# in a way that causes it to not happen. Do not do this after
# initial provisioning.
#
$node->ResetStartStatus()
if (!$node->genisliver_idx());
# Mark
if ($node->ModifyReservation({"genisliver_idx" => $self->idx()})) {
return -1;
}
# This would typically happen in libvtop, but we call the mapper
# in a way that causes it to not happen.
$node->ResetStartStatus();
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment