Commit a39be31e authored by Leigh Stoller's avatar Leigh Stoller

Add a configure variable so I can turn off profile versions in

snapshot, since until we are running image versions on the AM
we use to instantiate, there is reason to create a new version of
a profile when we do a disk snapshot.
parent cd4a12ff
......@@ -661,6 +661,7 @@ IPV6_ENABLED
NFSMAPTOUSER
IMAGEPROVENANCE
IMAGEDELTAS
PROFILEVERSIONS
BROWSER_CONSOLE_ENABLE
EC2META_ENABLE
NOSITECHECKIN
......@@ -5095,6 +5096,7 @@ MANAGEMENT_ROUTER="10.249.249.253"
NFSMAPTOUSER="root"
IMAGEPROVENANCE=0
IMAGEDELTAS=0
PROFILEVERSIONS=0
#
# XXX You really don't want to change these!
......
......@@ -293,6 +293,7 @@ AC_SUBST(IPV6_SUBNET_PREFIX)
AC_SUBST(NFSMAPTOUSER)
AC_SUBST(IMAGEPROVENANCE)
AC_SUBST(IMAGEDELTAS)
AC_SUBST(PROFILEVERSIONS)
#
# Offer both versions of the email addresses that have the @ escaped
......@@ -437,6 +438,7 @@ MANAGEMENT_ROUTER="10.249.249.253"
NFSMAPTOUSER="root"
IMAGEPROVENANCE=0
IMAGEDELTAS=0
PROFILEVERSIONS=0
#
# XXX You really don't want to change these!
......
......@@ -82,6 +82,7 @@ my $SACERT = "$TB/etc/genisa.pem";
my $CMCERT = "$TB/etc/genicm.pem";
my $SSHKEYGEN = "/usr/bin/ssh-keygen";
my $SSHSETUP = "$TB/sbin/aptssh-setup";
my $VERSIONING = @PROFILEVERSIONS@;
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin';
......@@ -1142,12 +1143,14 @@ sub SnapShot($$$)
# that we expect the CM is doing image versioning, so do not
# bother to check if the image version is actually new.
#
$profile = $profile->NewVersion($this_user);
if (!defined($profile)) {
print STDERR "Could not create new profile version\n";
$webtask->Exited(70)
if (defined($webtask));
exit(1);
if ($VERSIONING) {
$profile = $profile->NewVersion($this_user);
if (!defined($profile)) {
print STDERR "Could not create new profile version\n";
$webtask->Exited(70)
if (defined($webtask));
exit(1);
}
}
$profile->UpdateDiskImage($image_urn);
$slice->UnLock();
......
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