Commit 85ec0376 authored by Leigh B Stoller's avatar Leigh B Stoller

Another change for using the Portal on other clusters (not the

MotherShip); need to run the aptevent daemon on all clusters, with the
difference that on the MotherShip it listens for events from the SSL
pubsubd, while on other clusters it listens to the local pubsubd for
those same events (slice/slivee status, image, frisbee status events).
parent 8a774905
......@@ -75,9 +75,6 @@ $| = 1;
if ($UID != 0) {
fatal("Must be root to run this script\n");
if (! $MAINSITE) {
# Check args early so we get the right DB.
......@@ -129,9 +126,19 @@ if (!$impotent) {
# Capture all events from the local pubsubd.
# At the Mothership (Cloudlab Portal) we get events from the SSL
# enabled version of pubsubd, which is getting events from all of the
# clusters including the local cluster.
# Otherwise, we listen on the regular event server since that is where
# the events first go anyway. It is only clusters that are part of
# Cloudlab that are forwarding to to the Mothership.
my $localhandle = event_register("elvin://localhost:$PSDPORT", 0);
my $url = "elvin://localhost";
if ($MAINSITE) {
$url .= ":$PSDPORT";
my $localhandle = event_register($url, 0);
if (!$localhandle) {
fatal("Unable to register with event system");
......@@ -164,6 +171,11 @@ sub callback($$$)
my $type = event_notification_get_string($handle, $note, "type");
my $details = event_notification_get_string($handle, $note, "details");
# Ignore extraneous events. They happen when listening to the local
# cluster pubsubd.
if (! (defined($site) && defined($slice)));
# Not sure why this is happening, but sometime the slice urn has
# extra double quotes around it. Kill them so the instance lookup
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment