Compare commits

...

12 Commits

Author SHA1 Message Date
Utkarsh Gupta
bc256f7b74 Update d/ch for 2.742.5 release 2022-03-10 14:44:16 +05:30
Ivan Kapelyukhin
8076e122c5
Update changelog 2022-03-03 15:53:43 +01:00
Ivan Kapelyukhin
d5b6e93e14
perf(cpc): split disk-image-uefi out of disk-image series file
Due to how `disk-image` file is structured, it builds BIOS and UEFI
images at the same time. However, certain images (e.g., GCE images)
require only UEFI image to be built, BIOS image is being simply
discarded. This results in longer build times.

Splitting out `disk-image-uefi` would allow images to use it instead of
`disk-image` and thus avoid building unused BIOS images.

`disk-image` now depends on `disk-image-uefi` for backward
compatibility.

(cherry picked from commit b40ce74fd67bbaa7f9ec94463d8da759724f9fec)
2022-03-03 15:52:48 +01:00
Utkarsh Gupta
7bb7005712 Update d/ch for 2.742.4 release 2022-02-23 14:08:26 +05:30
Ivan Kapelyukhin
bccc9437a0
Update changelog 2022-02-14 21:26:40 +01:00
Ivan Kapelyukhin
e7d06dede2
fix: unset initrdless_boot_fallback_triggered instead of setting it to 0
This fixes GCE shielded VM instances integrity monitoring failures on
focal and later. Our images are built with an empty /boot/grub/grubenv
file, however after the first boot `initrdless_boot_fallback_triggered`
is set to 0. This change in `grubenv` results in integrity monitoring
`lateBootReportEvent` error.

It seems that the only thing that's checking for this `grubenv` variable
is `grub-common.service`, and it is looking specifically for a `1`
value:

  if grub-editenv /boot/grub/grubenv list | grep -q
  initrdless_boot_fallback_triggered=1; then echo "grub:
  GRUB_FORCE_PARTUUID set, initrdless boot paniced, fallback triggered.";
  fi

Unsetting this variable instead of setting it to 0 would prevent issues
with integrity monitoring.
2022-02-14 21:21:51 +01:00
Brian Murray
28c85b9703 releasing package livecd-rootfs version 2.742.3 2022-02-10 15:28:46 -08:00
John Chittum
a093a293aa Add sleep to workaround e2fsck errors
LP: 1960537 illustrates an issue where the calls to e2fsck in the
umount_partition call are failing due to an open file handle. At this
time, we are unable to find a root cause, and it's causing many builds
to fail for CPC. Adding a sleep 30 as a workaround as the file handle
releases within  that timeframe. This does not address root cause.
2022-02-10 15:27:57 -08:00
Philip Roche
bfeba29863 Bump UEFI disk image size for armhf to 3.5 GB LP:#1953609
Current impish builds fail with:
```
cp: error writing 'mountpoint/var/lib/snapd/snaps/snapd_14067.snap': No space left on device
cp: cannot create directory 'mountpoint/var/lib/snapd/ssl': No space left on device
```

This is a cherrypick backport from ubuntu/master
2021-12-08 12:01:01 +00:00
Brian Murray
c42513a609 releasing package livecd-rootfs version 2.742.1 2021-11-18 15:17:19 -08:00
Thomas Bechtold
36cd65e112 Add debian/changelog entry 2021-10-26 16:33:52 +02:00
Thomas Bechtold
408045732e magic-proxy: fix exception handling for URLError LP:#1946520
A urllib.error.URLError.reason variable can either be a string or
another Exception[0]. In case it's another exception, the current code
fails because the exception is passed into send_error() which tries
call html.escape() on the Exception. That fails because the Exception
is not a string. Converting the Exception to a string fixes this.

This fixes:

AttributeError: 'TimeoutError' object has no attribute 'replace'

[0]
https://docs.python.org/3/library/urllib.error.html#urllib.error.URLError.reason

(cherry picked from commit af888e24ff8ec478b490c6d0fc39131cd63a8079)
2021-10-26 16:32:13 +02:00
6 changed files with 57 additions and 4 deletions

36
debian/changelog vendored
View File

@ -1,3 +1,39 @@
livecd-rootfs (2.742.5) impish; urgency=medium
* Split UEFI image out of `disk-image` series file into
`disk-image-uefi`. (LP: #1961760)
-- Ivan Kapelyukhin <ivan.kapelyukhin@canonical.com> Thu, 03 Mar 2022 15:53:10 +0100
livecd-rootfs (2.742.4) impish; urgency=medium
* Unset `initrdless_boot_fallback_triggered` in /boot/grub/grubenv instead
of setting it to 0 when the fallback is not triggered to prevent integrity
monitoring errors on GCE. (LP: #1960564)
-- Ivan Kapelyukhin <ivan.kapelyukhin@canonical.com> Mon, 14 Feb 2022 21:24:22 +0100
livecd-rootfs (2.742.3) impish; urgency=medium
* Add sleep due to e2fsck error in umount_partition. LP: #1960537
-- Brian Murray <brian@ubuntu.com> Thu, 10 Feb 2022 15:28:29 -0800
livecd-rootfs (2.742.2) impish; urgency=medium
* Bump UEFI disk image size for armhf to 3.5 GB (LP: #1953609)
Current builds are failing because the disk size is not big enough.
This a backport from jammy and upstream livecd-rootfs:ubuntu/master.
-- Phil Roche <phil.roche@canonical.com> Wed, 08 Dec 2021 11:24:18 +0000
livecd-rootfs (2.742.1) impish; urgency=medium
[ Thomas Bechtold ]
* magic-proxy: fix exception handling for URLError LP: #1946520
-- Brian Murray <brian@ubuntu.com> Thu, 18 Nov 2021 15:17:05 -0800
livecd-rootfs (2.742) impish; urgency=medium
[ Brian Murray ]

View File

@ -234,6 +234,8 @@ umount_partition() {
mount --make-private $mountpoint
umount $mountpoint
udevadm settle
# workaround for LP: 1960537
sleep 30
if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then
# buildd's don't have /etc/mtab symlinked
@ -1135,7 +1137,7 @@ if [ -n "${have_grubenv}" ]; then
if [ -n "${initrdfail}" ]; then
set initrdless_boot_fallback_triggered="${initrdfail}"
else
set initrdless_boot_fallback_triggered=0
unset initrdless_boot_fallback_triggered
fi
save_env initrdless_boot_fallback_triggered
fi

View File

@ -21,6 +21,11 @@ case ${PROJECT:-} in
;;
esac
if [ "$ARCH" = "armhf" ]; then
# bump to 3.5G (3584*1024**2); Since Impish and Jammy armhf need more then the default 2.2G
IMAGE_SIZE=3758096384
fi
# Change image size for preinstalled generic images & all preinstalled riscv64 images
if [ -n "${SUBARCH:-}" ]; then
if [ "${SUBARCH:-}" = "generic" ] || [ "$ARCH" = "riscv64" ]; then

View File

@ -1,5 +1,5 @@
depends disk-image-uefi
base/disk-image.binary
base/disk-image-uefi.binary
base/disk-image-ppc64el.binary
provides livecd.ubuntu-cpc.ext4
provides livecd.ubuntu-cpc.initrd-generic

View File

@ -0,0 +1,8 @@
base/disk-image-uefi.binary
provides livecd.ubuntu-cpc.ext4
provides livecd.ubuntu-cpc.initrd-generic
provides livecd.ubuntu-cpc.initrd-generic-lpae
provides livecd.ubuntu-cpc.kernel-generic
provides livecd.ubuntu-cpc.kernel-generic-lpae
provides livecd.ubuntu-cpc.manifest
provides livecd.ubuntu-cpc.filelist

View File

@ -883,8 +883,10 @@ class ProxyingHTTPRequestHandler(http.server.BaseHTTPRequestHandler):
self.__send_response(e)
except urllib.error.URLError as e:
self.log_message(
"urlopen() failed for {} with {}".format(uri, e.reason))
self.send_error(501, e.reason)
"urlopen() failed for {} with {}".format(uri, str(e.reason)))
# URLError.reason can either be a string or another Exception
# So do convert it to a string before sending the error (LP: #1946520)
self.send_error(501, str(e.reason))
def __get_host_path(self):