diff --git a/base/bootstrapinfo.py b/base/bootstrapinfo.py index 404acb5..8ccc75f 100644 --- a/base/bootstrapinfo.py +++ b/base/bootstrapinfo.py @@ -7,9 +7,8 @@ class BootstrapInformation(object): self.volume = load_volume(self.manifest.volume) self.debug = debug import random - self.run_id = random.randrange(16 ** 8) + self.run_id = '{id:08x}'.format(id=random.randrange(16 ** 8)) import os.path - workspace_dirname = '{id:x}'.format(id=self.run_id) - self.workspace = os.path.join(manifest.bootstrapper['workspace'], workspace_dirname) + self.workspace = os.path.join(manifest.bootstrapper['workspace'], self.run_id) self.initd = {'install': {}, 'disable': []} diff --git a/plugins/prebootstrapped/tasks.py b/plugins/prebootstrapped/tasks.py index 71548b2..49da82a 100644 --- a/plugins/prebootstrapped/tasks.py +++ b/plugins/prebootstrapped/tasks.py @@ -49,7 +49,7 @@ class CopyImage(Task): predecessors = [bootstrap.Bootstrap] def run(self, info): - loopback_backup_name = 'volume-{id:x}.{ext}.backup'.format(id=info.run_id, ext=info.volume.extension) + loopback_backup_name = 'volume-{id}.{ext}.backup'.format(id=info.run_id, ext=info.volume.extension) destination = os.path.join(info.manifest.bootstrapper['workspace'], loopback_backup_name) def mk_snapshot(): diff --git a/providers/ec2/tasks/ami.py b/providers/ec2/tasks/ami.py index de7d22d..e975684 100644 --- a/providers/ec2/tasks/ami.py +++ b/providers/ec2/tasks/ami.py @@ -45,7 +45,7 @@ class BundleImage(Task): phase = phases.image_registration def run(self, info): - bundle_name = 'bundle-{id:x}'.format(id=info.run_id) + bundle_name = 'bundle-{id}'.format(id=info.run_id) info.bundle_path = os.path.join(info.workspace, bundle_name) log_check_call(['/usr/bin/euca-bundle-image', '--image', info.volume.image_path,