From 8127e67ec7938d72a6cc7230efe519e67e5f1c46 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Tue, 12 Apr 2022 13:06:04 +0000 Subject: [PATCH] coreos-base/oem-gce: allow container to mess with /sys and /proc/irq The container performs multi-queue optimizations for ssd and network devices which requires touching /proc and /sys/ mounts which systemd-nspawn usually mounts readonly. Allow the container to modify those by setting the appropriate environment variable (found via https://systemd.io/ENVIRONMENT/). --- .../coreos-base/oem-gce/files/units/oem-gce.service | 2 ++ .../{oem-gce-20180823-r2.ebuild => oem-gce-20180823-r3.ebuild} | 0 2 files changed, 2 insertions(+) rename sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/{oem-gce-20180823-r2.ebuild => oem-gce-20180823-r3.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/oem-gce.service b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/oem-gce.service index 646b04ac1d..bc6333d6fe 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/oem-gce.service +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/oem-gce.service @@ -21,6 +21,8 @@ ExecStartPre=-/usr/bin/umount /var/lib/flatcar-oem-gce.img ExecStartPre=/usr/bin/mount /var/lib/flatcar-oem-gce.img /var/lib/flatcar-oem-gce ExecStartPre=/usr/bin/tar --directory=/var/lib/flatcar-oem-gce --extract --file=/usr/share/oem/flatcar-oem-gce.aci --strip-components=1 rootfs ExecStartPre=/usr/bin/umount /var/lib/flatcar-oem-gce.img +# the container expects to be able to optmize irq settings in /proc/irq and /sys/ +Environment=SYSTEMD_NSPAWN_API_VFS_WRITABLE=1 ExecStart=/usr/bin/systemd-nspawn --keep-unit --register=no --link-journal=no \ --machine=oem-gce --capability=CAP_NET_ADMIN --bind=/dev/log --bind=/run/systemd --tmpfs=/run/lock --bind=/etc --bind=/home --bind-ro=/usr/share/google-oslogin/nsswitch.conf \ --read-only --volatile=overlay --image=/var/lib/flatcar-oem-gce.img /init.sh diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-20180823-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-20180823-r3.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-20180823-r2.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-20180823-r3.ebuild