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