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

Add another check for deleting the last node at an aggregate. Kobus'

students trying to delete their one node, and I am not even sure how
they can since the option is supposed to be disabled (and in my checks,
it is), but clearly I am missing something. For now, head this off
earlier and return an error message that perhaps gets them to ask a
parent 29d65b8f
......@@ -2482,6 +2482,13 @@ sub DoDeleteNodes()
fatal("Could not parse manifest");
my @nodes = GeniXML::FindNodes("n:node", $manifest)->get_nodelist();
# Not allowed to delete last node.
if (@nodes == 1) {
$errmsg = "Only one node left, not allowed to delete any more.";
$errcode = 1;
$exitcode = 1;
goto bad;
foreach my $node (@nodes) {
my $client_id = GeniXML::GetVirtualId($node);
if (grep {$_ eq $client_id} @ARGV) {
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