Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [NODE-1444] Upgrade HostOS to 24.04 #1588

Merged
merged 5 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</resource>
<os>
<type arch='x86_64' machine='pc-q35-5.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
<loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE_4M.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/guestos_VARS.fd</nvram>
<boot dev='hd'/>
</os>
Expand Down
2 changes: 1 addition & 1 deletion ic-os/components/hostos-scripts/guestos/qemu-cpu.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<cpu mode='host-model' migratable='off'/>
<cpu mode='host-model'/>
3 changes: 3 additions & 0 deletions ic-os/components/hostos-scripts/libvirt/setup-libvirt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ set -e
# Create space for libvirt to manage its config

mount --bind /run/libvirt /etc/libvirt

# Set up log directory, because it will not create it alone
mkdir -p /var/log/libvirt/qemu
2 changes: 0 additions & 2 deletions ic-os/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ def icos_build(
"/run",
"/boot",
"/var",
"/usr/lib/firmware/brcm/brcmfmac43430a0-sdio.ONDA-V80 PLUS.txt",
"/usr/lib/firmware/brcm/brcmfmac43455-sdio.MINIX-NEO Z83-4.txt",
"/usr/lib/firmware/brcm/brcmfmac43241b4-sdio.Intel Corp.-VALLEYVIEW C0 PLATFORM.txt.zst",
"/usr/lib/firmware/brcm/brcmfmac43340-sdio.ASUSTeK COMPUTER INC.-TF103CE.txt.zst",
"/usr/lib/firmware/brcm/brcmfmac43362-sdio.ASUSTeK COMPUTER INC.-ME176C.txt.zst",
Expand Down
13 changes: 4 additions & 9 deletions ic-os/hostos/context/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN sed -e '/.*pam_motd.so.*/d' -i /etc/pam.d/login && \
# but this is per system (so backups are not persisted across upgrades)
# and thus not very useful, and /etc is read-only.
# So simply suppress generating backups.
RUN sed -e 's/\(backup *= *\)1/\10/' -e 's/\(archive *= *\)1/\10/' -i /etc/lvm/lvm.conf
RUN sed -e 's/\(# \)\?\(backup *= *\)[01]/\20/' -e 's/\(# \)\?\(archive *= *\)[01]/\20/' -i /etc/lvm/lvm.conf

# Deactivate systemd userdb. We don't use it.
RUN sed -e 's/ *systemd//' -i /etc/nsswitch.conf
Expand All @@ -39,7 +39,7 @@ RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

# Clear files that may lead to indeterministic build.
RUN apt-get clean && \
find /usr/lib/python3.8 -name "*.pyc" | xargs rm && \
find /usr/lib/python3.12 -name "*.pyc" | xargs rm && \
find /usr/lib/python3 -name "*.pyc" | xargs rm && \
find /usr/share/python3 -name "*.pyc" | xargs rm && \
truncate --size 0 /etc/machine-id
Expand Down Expand Up @@ -91,6 +91,7 @@ RUN systemctl enable \
chrony \
libvirtd \
nftables \
ssh \
systemd-journal-gatewayd \
systemd-networkd \
systemd-networkd-wait-online \
Expand All @@ -117,14 +118,8 @@ RUN rm -rf \
/usr/local/share/qemu/edk2-arm-code.fd \
/usr/local/share/qemu/edk2-arm-vars.fd

# Add user/group entries specified here: /usr/lib/sysusers.d/systemd.conf E.g., systemd-timesync/coredump
RUN systemd-sysusers && \
# Fix reproducibility issue. Notes in hostos/context/Dockerfile
usermod -p '!!' systemd-timesync && \
usermod -p '!!' systemd-coredump

# Set /bin/sh to point to /bin/bash instead of the default /bin/dash
RUN echo "set dash/sh false" | debconf-communicate && dpkg-reconfigure -fnoninteractive dash
RUN ln -sf bash /usr/bin/sh

# Group accounts to which parts of the runtime state are assigned such that
# user accounts can be granted individual access rights.
Expand Down
2 changes: 1 addition & 1 deletion ic-os/hostos/context/docker-base.dev
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ghcr.io/dfinity/hostos-base-dev@sha256:a6e8e7ab7abf682c80dfd717d36ac027213f757ddad415c66080ac4314639590
ghcr.io/dfinity/hostos-base-dev@sha256:e133ba80d1d291fff89fe9e60f3fbf9285095d9c15a51a1297e314d0f9fe837c
2 changes: 1 addition & 1 deletion ic-os/hostos/context/docker-base.prod
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ghcr.io/dfinity/hostos-base@sha256:5e93fb6cadecd22b838a8e442ed88d3c77ac5626651ee139559150d2a77a6743
ghcr.io/dfinity/hostos-base@sha256:13ae203beb66cdb2ac198ea2441e82b6fb36b93c4e337ccbc32383de49ad7f88
Loading