Compare commits

...

9 Commits

Author SHA1 Message Date
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
4 changed files with 41 additions and 3 deletions

29
debian/changelog vendored
View File

@ -1,3 +1,32 @@
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 livecd-rootfs (2.742) impish; urgency=medium
[ Brian Murray ] [ Brian Murray ]

View File

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

View File

@ -21,6 +21,11 @@ case ${PROJECT:-} in
;; ;;
esac 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 # Change image size for preinstalled generic images & all preinstalled riscv64 images
if [ -n "${SUBARCH:-}" ]; then if [ -n "${SUBARCH:-}" ]; then
if [ "${SUBARCH:-}" = "generic" ] || [ "$ARCH" = "riscv64" ]; then if [ "${SUBARCH:-}" = "generic" ] || [ "$ARCH" = "riscv64" ]; then

View File

@ -883,8 +883,10 @@ class ProxyingHTTPRequestHandler(http.server.BaseHTTPRequestHandler):
self.__send_response(e) self.__send_response(e)
except urllib.error.URLError as e: except urllib.error.URLError as e:
self.log_message( self.log_message(
"urlopen() failed for {} with {}".format(uri, e.reason)) "urlopen() failed for {} with {}".format(uri, str(e.reason)))
self.send_error(501, 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): def __get_host_path(self):