[Merge] livecd-rootfs:u-i-cloud-init into livecd-rootfs:ubuntu/master
Steve Langasek
steve.langasek at canonical.com
Thu Sep 5 23:59:23 UTC 2019
Review: Needs Information
Diff comments:
> diff --git a/live-build/ubuntu-cpc/hooks.d/chroot/999-ubuntu-image-customization.chroot b/live-build/ubuntu-cpc/hooks.d/chroot/999-ubuntu-image-customization.chroot
> new file mode 100755
> index 0000000..d1e89ba
> --- /dev/null
> +++ b/live-build/ubuntu-cpc/hooks.d/chroot/999-ubuntu-image-customization.chroot
> @@ -0,0 +1,18 @@
> +#!/bin/bash -ex
> +
> +. /root/config/common
> +
> +# Specific ubuntu-image chroot configuration goes here.
> +if [ "$IMAGEFORMAT" == "ubuntu-image" ]; do
> + # If the cloud does not provide a meta-data service this should be run
It's not immediately obvious why imageformat == ubuntu-image is the correct check. A second's pondering makes it clear that we are building cloud images (KVM, etc) for all architectures via this hook, and we definitely don't want to configure the NoCloud datasource for those; but the use of IMAGEFORMAT==ubuntu-image as a proxy for "this image is running on a device and not on a cloud instance" at least should get a comment, especially since using ubuntu-image as part of the cloud image build process is a potentially interesting area of future expansion.
> + # This will setup a nocloud datasource on the boot partition.
> + # This is the default behavior for our ubuntu-image built preinstalled
> + # images.
> + cat << EOF > /etc/cloud/cloud.cfg.d/99-fake_cloud.cfg
> +# configure cloud-init for NoCloud
> +datasource_list: [ NoCloud, None ]
> +datasource:
> + NoCloud:
> + fs_label: system-boot
"system-boot" is an Ubuntu Core-ism. I guess we inherit that from the gadget snap for our u-i classic images, but is this a good general rule that we want to rely on?
> +EOF
> +fi
--
https://code.launchpad.net/~ubuntu-core-dev/livecd-rootfs/+git/livecd-rootfs/+merge/371080
Your team Ubuntu Core Development Team is subscribed to branch livecd-rootfs:ubuntu/master.
More information about the Ubuntu-reviews
mailing list