From 51cc63091feda6eefd520182986abf6fc947ce2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jake=20Buchholz=20G=C3=B6kt=C3=BCrk?= Date: Tue, 28 Dec 2021 13:11:16 -0800 Subject: [PATCH] Make AWS Images Work with CloudFormation root device / block device needs full '/dev/...' for CloudFormation to work (individual instance launches worked just fine though). Also... * HOCON += introduces unwanted spaces in motd * minor log.debug fixes * update gen_releases.py --help note --- build | 4 ++-- clouds/aws.py | 4 ++-- configs/alpine.conf | 12 ++++++------ gen_releases.py | 12 +++++++----- image_configs.py | 7 ++++--- 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/build b/build index 00c5b91..ba5b84b 100755 --- a/build +++ b/build @@ -128,10 +128,10 @@ def install_overlay(overlay): if is_images_conf(overlay, src_x): rel_x = os.readlink(src_x) if os.path.islink(dest_x): - print(f"\toverriding {dest_x}") + log.debug('overriding %s', dest_x) os.unlink(dest_x) - print(f"\tln -s {rel_x} {dest_x}") + log.debug('ln -s %s %s', rel_x, dest_x) os.symlink(rel_x, dest_x) continue diff --git a/clouds/aws.py b/clouds/aws.py index 3a997b0..436caa7 100644 --- a/clouds/aws.py +++ b/clouds/aws.py @@ -204,13 +204,13 @@ class AWSCloudAdapter(CloudAdapterInterface): img = ec2c.register_image( Architecture=self.ARCH[ic.arch], BlockDeviceMappings=[{ - 'DeviceName': 'xvda', + 'DeviceName': '/dev/xvda', 'Ebs': {'SnapshotId': snapshot_id} }], Description=description, EnaSupport=True, Name=ic.image_name, - RootDeviceName='xvda', + RootDeviceName='/dev/xvda', SriovNetSupport='simple', VirtualizationType='hvm', BootMode=self.BOOT_MODE[ic.firmware], diff --git a/configs/alpine.conf b/configs/alpine.conf index e3aa9b4..ef335ea 100644 --- a/configs/alpine.conf +++ b/configs/alpine.conf @@ -18,13 +18,13 @@ Default { motd { welcome = "Welcome to Alpine!" - wiki = "The Alpine Wiki contains a large amount of how-to guides and general\n" - wiki += "information about administrating Alpine systems.\n" - wiki += "See ." + wiki = "The Alpine Wiki contains a large amount of how-to guides and general\n"\ + "information about administrating Alpine systems.\n"\ + "See ." - version_notes = "Release Notes:\n" - version_notes += "* " - release_notes = "* " + release_notes = "*