Extended the SRU verification test case to validate that expected
changes are present in mount-image-callback which loop over "fstype in overlay overlayfs".
I can confirm both that proper bits are uploaded in any overlay fs is functional using cloud-utils (0.27-0ubuntu25.2).
Extended the SRU verification test case to validate that expected callback which loop over "fstype in overlay overlayfs".
changes are present in mount-image-
I can confirm both that proper bits are uploaded in any overlay fs is functional using cloud-utils (0.27-0ubuntu25.2).
#### Updated test script
#!/bin/bash
set -x
cat > install_ hwe_kernel_ and_overlay_ root.sh <<EOF
#!/bin/bash
echo "3.) Enable proposed, install HWE kernel and install overlayroot to show fix." archive. ubuntu. com/ubuntu sources. list.d/ proposed. list hwe-16. 04 | egrep 'linux- image|cloud- utils'
mirror=http://
echo deb \$mirror xenial-proposed main | tee /etc/apt/
apt-get update
apt-get install -qy cloud-utils overlayroot linux-generic-
EOF
expect_ overlayfs_ mounts( ){ mounts= $1 mounts= $(multipass exec $VM mount | grep overlay -c)
expected_
overlay_
[[ "$expected_mounts" = "$overlay_mounts" ]] && echo "SUCCESS: found $overlay_mounts overlay mounts" || echo "FAILURE: expected $expected_mounts overlay mounts found $overlay_mounts"
}
VM=sru-1493188 overlayfs_ mounts 0 hwe_kernel_ and_overlay_ root.sh $VM:. hwe_kernel_ and_overlay_ root.sh callback" $(multipass exec $VM -- grep -c "for fstype in overlay overlayfs" /usr/bin/ mount-image- callback) tmpfs:recurse= 0 | sudo tee -a /etc/overlayroo t.local. conf" overlayfs_ mounts 1 tmpfs:recurse= 1 | sudo overlayroot-chroot tee /etc/overlayroo t.local. conf" overlayfs_ mounts 1 overlayroot. log || echo "FAIL: didn't find overlayroot"
RELEASE=xenial
multipass launch daily:$RELEASE -n $VM
multipass exec $VM -- cloud-init status --wait --long > /dev/null
echo --- No overlayfs mounts on initial boot
expect_
multipass transfer install_
multipass exec $VM -- sudo bash ./install_
echo "--- confirm overlay overlayfs patch present in mount-image-
fs_types=
[[ "1" = "$fs_types" ]] || echo "FAILURE: didn't find 'for fstype in overlay overlayfs'"
multipass exec $VM -- sudo sh -c "echo overlayroot=
multipass restart $VM
echo "--- expect 1 overlayfs mounts because using HWE kernel"
multipass exec $VM -- cloud-init status --wait --long
expect_
multipass exec $VM -- sudo sh -c "echo overlayroot=
multipass restart $VM
expect_
multipass exec $VM -- grep overlay /etc/fstab || echo "FAIL: didn't find overlayroot"
multipass exec $VM -- grep success /run/initramfs/
### Xenial verification results overlayfs_ mounts 0 hwe_kernel_ and_overlay_ root.sh sru-1493188:. hwe_kernel_ and_overlay_ root.sh archive. ubuntu. com/ubuntu xenial-proposed main security. ubuntu. com/ubuntu xenial-security InRelease [109 kB] archive. ubuntu. com/ubuntu xenial InRelease archive. ubuntu. com/ubuntu xenial-updates InRelease [109 kB] security. ubuntu. com/ubuntu xenial- security/ universe amd64 Packages [774 kB] security. ubuntu. com/ubuntu xenial- security/ universe Translation-en [219 kB] security. ubuntu. com/ubuntu xenial- security/ multiverse amd64 Packages [8,236 B] security. ubuntu. com/ubuntu xenial- security/ multiverse Translation-en [2,888 B] archive. ubuntu. com/ubuntu xenial-backports InRelease [107 kB] archive. ubuntu. com/ubuntu xenial-proposed InRelease [260 kB] archive. ubuntu. com/ubuntu xenial/universe amd64 Packages [7,532 kB] archive. ubuntu. com/ubuntu xenial/universe Translation-en [4,354 kB] archive. ubuntu. com/ubuntu xenial/multiverse amd64 Packages [144 kB] archive. ubuntu. com/ubuntu xenial/multiverse Translation-en [106 kB] archive. ubuntu. com/ubuntu xenial-updates/main amd64 Packages [1,880 kB] archive. ubuntu. com/ubuntu xenial- updates/ universe amd64 Packages [1,195 kB] archive. ubuntu. com/ubuntu xenial- updates/ universe Translation-en [349 kB] archive. ubuntu. com/ubuntu xenial- updates/ multiverse amd64 Packages [23.0 kB] archive. ubuntu. com/ubuntu xenial- updates/ multiverse Translation-en [8,632 B] archive. ubuntu. com/ubuntu xenial- backports/ main amd64 Packages [9,812 B] archive. ubuntu. com/ubuntu xenial- backports/ main Translation-en [4,456 B] archive. ubuntu. com/ubuntu xenial- backports/ universe amd64 Packages [11.3 kB] archive. ubuntu. com/ubuntu xenial- backports/ universe Translation-en [4,476 B] archive. ubuntu. com/ubuntu xenial- proposed/ main amd64 Packages [80.1 kB] archive. ubuntu. com/ubuntu xenial- proposed/ main Translation-en [21.9 kB] image-4. 15.0-122- generic linux-image- generic- hwe-16. 04 image-4. 15.0-122- generic linux-image- generic- hwe-16. 04 archive. ubuntu. com/ubuntu xenial-updates/main amd64 linux-image- 4.15.0- 122-generic amd64 4.15.0- 122.124~ 16.04.1 [7,996 kB] archive. ubuntu. com/ubuntu xenial-updates/main amd64 linux-image- generic- hwe-16. 04 amd64 4.15.0.122.122 [2,386 B] archive. ubuntu. com/ubuntu xenial- proposed/ main amd64 cloud-utils all 0.27-0ubuntu25.2 [1,514 B] 4.15.0- 122-generic. image-4. 15.0-122- generic_ 4.15.0- 122.124~ 16.04.1_ amd64.deb ... 4.15.0- 122-generic (4.15.0- 122.124~ 16.04.1) ... generic- hwe-16. 04. image-generic- hwe-16. 04_4.15. 0.122.122_ amd64.deb ... generic- hwe-16. 04 (4.15.0.122.122) ... utils_0. 27-0ubuntu25. 2_all.deb ... 4.15.0- 122-generic (4.15.0- 122.124~ 16.04.1) ... generic- hwe-16. 04 (4.15.0.122.122) ... 4.15.0- 122-generic (4.15.0- 122.124~ 16.04.1) ... callback' callback mount-image- callback tmpfs:recurse= 0 | sudo tee -a /etc/overlayroo t.local. conf' tmpfs:recurse= 0 dev/sr0] [dsmode= net] overlayfs_ mounts 1 tmpfs:recurse= 1 | sudo overlayroot-chroot tee /etc/overlayroo t.local. conf' tmpfs:recurse= 1 overlayfs_ mounts 1 /media/ root-ro/ ,upperdir= /media/ root-rw/ overlay/ ,workdir= /media/ root-rw/ overlay- workdir/ _ 0 0 overlayroot. log etc/overlayroot .local. conf
+ cat
+ VM=sru-1493188
+ RELEASE=xenial
+ multipass launch daily:xenial -n sru-1493188
Launched: sru-1493188
+ multipass exec sru-1493188 -- cloud-init status --wait --long
+ echo --- No overlayfs mounts on initial boot
--- No overlayfs mounts on initial boot
+ expect_
+ expected_mounts=0
++ multipass exec sru-1493188 mount
++ grep overlay -c
+ overlay_mounts=0
+ [[ 0 = \0 ]]
+ echo 'SUCCESS: found 0 overlay mounts'
SUCCESS: found 0 overlay mounts
+ multipass transfer install_
+ multipass exec sru-1493188 -- sudo bash ./install_
3.) Enable proposed, install HWE kernel and install overlayroot to show fix.
deb http://
Get:1 http://
Hit:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Get:15 http://
Get:16 http://
Get:17 http://
Get:18 http://
Get:19 http://
Get:20 http://
Get:21 http://
Get:22 http://
Get:23 http://
Get:24 http://
Fetched 17.3 MB in 4s (3,585 kB/s)
Reading package lists... Done
linux-
cloud-utils-euca shunit2 wodim cdrkit-doc fdutils linux-hwe-tools
amd64-microcode cloud-image-utils cloud-utils crda distro-info genisoimage
linux-
Get:22 http://
Get:26 http://
Get:36 http://
Extracting templates from packages: 100%
Selecting previously unselected package linux-image-
Preparing to unpack .../linux-
Unpacking linux-image-
Selecting previously unselected package linux-image-
Preparing to unpack .../linux-
Unpacking linux-image-
Selecting previously unselected package cloud-utils.
Preparing to unpack .../cloud-
Unpacking cloud-utils (0.27-0ubuntu25.2) ...
Setting up linux-image-
Setting up linux-image-
Setting up cloud-utils (0.27-0ubuntu25.2) ...
Processing triggers for linux-image-
+ echo '--- confirm overlay overlayfs patch present in mount-image-
--- confirm overlay overlayfs patch present in mount-image-
++ multipass exec sru-1493188 -- grep -c 'for fstype in overlay overlayfs' /usr/bin/
+ fs_types=1
+ [[ 1 = \1 ]]
+ multipass exec sru-1493188 -- sudo sh -c 'echo overlayroot=
overlayroot=
+ multipass restart sru-1493188
+ echo '--- expect 1 overlayfs mounts because using HWE kernel'
--- expect 1 overlayfs mounts because using HWE kernel
+ multipass exec sru-1493188 -- cloud-init status --wait --long
..
status: done
time: Mon, 09 Nov 2020 04:16:57 +0000
detail:
DataSourceNoCloud [seed=/
+ expect_
+ expected_mounts=1
++ multipass exec sru-1493188 mount
++ grep overlay -c
+ overlay_mounts=1
+ [[ 1 = \1 ]]
+ echo 'SUCCESS: found 1 overlay mounts'
SUCCESS: found 1 overlay mounts
+ multipass exec sru-1493188 -- sudo sh -c 'echo overlayroot=
INFO: Chrooting into [/media/root-ro]
overlayroot=
+ multipass restart sru-1493188
+ expect_
+ expected_mounts=1
++ multipass exec sru-1493188 mount
++ grep overlay -c
+ overlay_mounts=1
+ [[ 1 = \1 ]]
+ echo 'SUCCESS: found 1 overlay mounts'
SUCCESS: found 1 overlay mounts
+ multipass exec sru-1493188 -- grep overlay /etc/fstab
# This fstab is in an overlay. The real one can be found at
# sudo overlayroot-chroot
/media/root-ro/ / overlay lowerdir=
+ multipass exec sru-1493188 -- grep success /run/initramfs/
[success]: configured root with 'tmpfs:recurse=1' using overlay per /dev/sda1/