Commit b45ad18a authored by Leigh Stoller's avatar Leigh Stoller

Knock down another shared vlan bug; this one was caused by the cached

DB objects we use in the libraries. We hang onto those objects forever
in the expire daemon, but they are stale in the case of shared vlans
which are being messed with elsewhere.

Rather then track down all the caching bugs, I changed the expire
daemon to call the existing cleanupslice script, avoiding all cache
problems.
parent 9fe3d7e7
#!/usr/bin/perl -w
#
# Copyright (c) 2008-2010 University of Utah and the Flux Group.
# Copyright (c) 2008-2010, 2012 University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
......@@ -106,12 +106,6 @@ usage()
($dosa + $doch + $docm) == 0 || ($dosa + $doch + $docm) > 1);
my $uuid = $ARGV[0];
# Map invoking user to object.
my $this_user = User->ThisUser();
if (! defined($this_user)) {
fatal("You ($UID) do not exist!");
}
# Connect to the proper DB.
DBConnect(($doch ? GENICH_DBNAME() :
($docm ? GENICM_DBNAME() : GENISA_DBNAME())));
......
......@@ -65,6 +65,7 @@ my $LOGFILE = "$TB/log/expire_daemon.log";
my $IDLETIMES = "$TB/sbin/idletimes";
my $EMULAB_PEMFILE = "$TB/etc/genicm.pem";
my $REGISTER = "$TB/sbin/protogeni/register_sliver";
my $CLEANUPSLICE = "$TB/sbin/cleanupslice";
my $SLEEP_INTERVAL= 60;
# un-taint path
......@@ -412,7 +413,9 @@ sub ExpireSlices()
}
}
cleanup:
if (GeniCM::CleanupDeadSlice($slice) != 0) {
my $slice_uuid = $slice->uuid();
system("$CLEANUPSLICE -f -m $slice_uuid");
if ($?) {
print STDERR "Could not release $slice\n";
SENDMAIL($TBOPS, "Could not release slice $slice",
"Could not release slice $slice");
......
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