[Merge] livecd-rootfs:u-i-cloud-init into livecd-rootfs:ubuntu/master

Ɓukasz Zemczak lukasz.zemczak at canonical.com
Fri Sep 6 09:19:55 UTC 2019


Thanks for the review Steve! Let me push a comment-addition commit on top.

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

+1 on that. I agree that in the future, without properly documenting this, we might miss this part and experience invalid behavior. Let me add a comment for it.

> +    # 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

I would say 'yes' here, especially that we already have official classic images in the wild with the boot partition being system-boot IIRC. I am really bad at inventing names, always locked in an infinite inner-bikeshedding argument, so I wouldn't even know what other label to use. Of course if you have any good propositions, we can change that.
I like re-using 'system-boot' because then generally we have one less delta between core and classic images to worry about. Right now a delta in the partition naming is not a problem, but who knows. I have a thing for unnecessary consistency.

> +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