Merge ~waveform/ubuntu/+source/livecd-rootfs:cloud-init-boot into ubuntu/+source/livecd-rootfs:ubuntu/devel

Proposed by Dave Jones
Status: Needs review
Proposed branch: ~waveform/ubuntu/+source/livecd-rootfs:cloud-init-boot
Merge into: ubuntu/+source/livecd-rootfs:ubuntu/devel
Diff against target: 51 lines (+11/-20)
2 files modified
debian/changelog (+6/-0)
live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot (+5/-20)
Reviewer Review Type Date Requested Status
Łukasz Zemczak (community) Approve
Review via email: mp+368472@code.launchpad.net

Commit message

Point cloud-init at the boot partition for its seed

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

This looks good for the Pi POV. Sadly, we need to remember that our pi images are not the only consumer of the ubuntu-cpc project - this is something we use for cloud images as well. And those are not using ubuntu-image and the gadget concept. At least that should be our assumption.

I think we'd need to key this on something. We could do that per SUBARCH, and just use the boot partition for the cloud-init seed there, or maybe actually thinking of keying on IMAGEFORMAT. The problem with the second solution is that I'm not completely confident that IMAGEFORMAT=none is only used for our ubuntu-image based classic images (although it feels like it).

Whichever solution we decide on, remember that by default the ARCH, SUBARCH, IMAGEFORMAT etc. config options are not visible by default from hooks. For them to be visible, during auto/config we need to append those to things like the config/chroot file (grep for '>> config/'). Some variables are passed there like that. The cpc fixes hook already includes the /root/config/chroot file so it should all work then.

review: Needs Fixing
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ok, so Dave gave me a sign that this *is* actually raspi specific. Apparently that part of the hook is only executed whenever linux-image-raspi2 is installed. In light of that info, this feels like it's good to go.

We might need to want to disable raspi2 builds completely soon and maybe try re-branding the raspi3 ones to 'raspi'. Since without this change the old raspi2 preinstalled images will no longer have the ubuntu:ubuntu user.

review: Approve
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ah, hm, is it just me or that's the wrong merge target here? I'd say we all livecd-rootfs merges should be for lp:livecd-rootfs.

Unmerged commits

295e5fe... by Dave Jones

Use boot-partition for c-i seed on RPi

Configure cloud-init to look for its seed in the vFAT boot partition on
raspberry pi images; the corresponding gadget is configured to place the
user-data, meta-data, and network-config files there.

2ccf04e... by Dimitri John Ledkov

Import patches-unapplied version 2.592 to ubuntu/eoan-proposed

Imported using git-ubuntu import.

Changelog parent: a93993ea68d82ffff2102587d3e5febeecad012d

New changelog entries:
  * Drop trying to mount removed maas squashfs.
  * Stop overriding initramfs compression default to lzma. LP: #1831736
  * Do not force lzma on ubuntu-core builds, the compress format default
    should be set universally inside initramfs-tools-ubuntu-core package
    instead of getting duplicated multiple times all over the place.

a93993e... by Dimitri John Ledkov

Import patches-unapplied version 2.591 to ubuntu/eoan-proposed

Imported using git-ubuntu import.

Changelog parent: 72fd04c49185d7eab9e638b7666d5cd8a51cb072

New changelog entries:
  * Fix typpo when dropping jasper.
  * Drop dead wubi subproject.
  * Drop dead jasper subproject.
  * Drop old arm platforms.
  * Drop ubuntu-desktop-next configs
  * Drop ubuntu-desktop-next hooks
  * Drop ubuntu-touch configs
  * Drop ubuntu-touch hooks
  * Drop ubuntu-rtm configs

72fd04c... by Steve Langasek

Import patches-unapplied version 2.589 to ubuntu/eoan-proposed

Imported using git-ubuntu import.

Changelog parent: 506cfae3854b84c4200588299664e2163e0aedd1

New changelog entries:
  * Add support for the 'kassel' subflavor of UC18 images.

506cfae... by Steve Langasek

Import patches-unapplied version 2.588 to ubuntu/eoan-proposed

Imported using git-ubuntu import.

Changelog parent: a84acc098c6a67c485d6f07bf3b6e635adb6906f

New changelog entries:
  * Add an explicit build-dependency on python3-yaml since livecd-rootfs
    uses it, rather than relying on this dependency being pulled in
    indirectly via ubuntu-image.

a84acc0... by Steve Langasek

Import patches-unapplied version 2.587 to ubuntu/eoan-proposed

Imported using git-ubuntu import.

Changelog parent: 15df915428f539dec2204c5b1aa7dcab50dfc8b3

New changelog entries:
  * Strip translation files out of the minimal images, another thing that
    goes unused when there is no human console user (and we already don't
    have the locales themselves present on a minimal image). LP: #1829333.

15df915... by Michael Hudson-Doyle

Import patches-unapplied version 2.586 to ubuntu/eoan-proposed

Imported using git-ubuntu import.

Changelog parent: d807a91a22fecbe3ba92c0015d45a42c0b67fafe

New changelog entries:
  [ Robert C Jennings ]
  * magic-proxy: Send headers on error (LP: #1829944)

d807a91... by Michael Hudson-Doyle

Import patches-unapplied version 2.585 to ubuntu/eoan-proposed

Imported using git-ubuntu import.

Changelog parent: 4cae3b87a93f34b7f7d0c3b6c0e851cad77e5dc8

New changelog entries:
  [ Robert C Jennings ]
  * ubuntu-cpc: Ensure base disk image is the same between all build targets

4cae3b8... by Balint Reczey

Import patches-unapplied version 2.584 to ubuntu/eoan-proposed

Imported using git-ubuntu import.

Changelog parent: ea70309e98a7b851567bfd620f7902ec25fbceaa

New changelog entries:
  * Build WSL rootfs tarball (LP: #1827930)

ea70309... by Dimitri John Ledkov

Import patches-unapplied version 2.583 to ubuntu/eoan-proposed

Imported using git-ubuntu import.

Changelog parent: 550e59ea45dc954b42fc1a05aa8d44ee8f69d1be

New changelog entries:
  * Use snap-tool to seed subiquity snap.
  * Drop maas hook from server-live.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 71d6829..e5997b7 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,9 @@
6+livecd-rootfs (2.593) eoan; urgency=medium
7+
8+ * Use boot-partition for cloud-init seed on RPi
9+
10+ -- Dave Jones <dave.jones@canonical.com> Thu, 06 Jun 2019 08:29:57 +0000
11+
12 livecd-rootfs (2.592) eoan; urgency=medium
13
14 * Drop trying to mount removed maas squashfs.
15diff --git a/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot b/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot
16index 33606a2..561b447 100755
17--- a/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot
18+++ b/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot
19@@ -24,28 +24,13 @@ arch=$(_xchroot "${rootd}" dpkg --print-architecture)
20
21 fake_cloud_init() {
22 # If the cloud does not provide a meta-data service this should be run
23- # This will setup a nocloud datasource.
24-
25- seed_d="${rootd}/var/lib/cloud/seed/nocloud-net"
26- mkdir -p "${seed_d}"
27-
28- # fake instance-id
29- cat << EOF > "${seed_d}/meta-data"
30-instance_id: cloud-image
31-EOF
32-
33- # fake user-data to create the default user/password
34- cat << EOF > "${seed_d}/user-data"
35-#cloud-config
36-password: ubuntu
37-chpasswd: ubuntu
38-ssh_pwauth: True
39-EOF
40-
41- # tell cloud-init not to look for meta-data sources
42- cat << EOF > ${rootd}/etc/cloud/cloud.cfg.d/99-fake_cloud.cfg
43+ # This will setup a nocloud datasource on the boot partition.
44+ cat << EOF > ${rootd}/etc/cloud/cloud.cfg.d/99-fake_cloud.cfg
45 # configure cloud-init for NoCloud
46 datasource_list: [ NoCloud, None ]
47+datasource:
48+ NoCloud:
49+ fs_label: system-boot
50 EOF
51 }
52

Subscribers

People subscribed via source and target branches