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

Redo the code to test for nonlocal (Geni) projects to disable Deltas.

parent fca70c43
......@@ -185,14 +185,21 @@ if (! (defined($base_osinfo) && defined($base_image))) {
print "$node_id is running $base_osinfo,$base_image\n"
if ($debug);
# Temporary override for all geni projects until we can export deltas.
$doprovenance = 0
if ($project->IsNonLocal());
# But allow feature override.
# See if enabled.
$doprovenance =
EmulabFeatures->FeatureEnabled("ImageProvenance", $this_user, $project);
# Temporary override for all geni projects until we can export deltas.
if ($project->IsNonLocal()) {
my $feature = EmulabFeatures->Lookup("ImageProvenance");
if ($feature && $feature->enabled()) {
# If globally enabled, disable. If not globally enabled but
# doprovenance is on, then it was a per-project enable which
# we want to respect.
$doprovenance = 0;
}
}
#
# The simple case is that the descriptor already exists. So it is just
# a simple snapshot to the image file.
......
......@@ -393,13 +393,21 @@ if ($WITHPROVENANCE) {
die("*** $0:\n".
" Could not lookup project for $image\n");
}
# Temporary override for all geni projects until we can export deltas.
$doprovenance = 0
if ($project->IsNonLocal());
# But allow feature override.
$doprovenance = EmulabFeatures->FeatureEnabled("ImageProvenance",
$this_user, $project);
# Temporary override for all geni projects until we can export deltas.
if ($project->IsNonLocal()) {
my $feature = EmulabFeatures->Lookup("ImageProvenance");
if ($feature && $feature->enabled()) {
# If globally enabled, disable. If not globally enabled but
# doprovenance is on, then it was a per-project enable which
# we wanr to respect.
$doprovenance = 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