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

Update to Fedora 35 + 36 #115

Merged
merged 2 commits into from
Apr 28, 2022
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
8 changes: 4 additions & 4 deletions base_images/gce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ variables: # Empty value means it must be passed in on command-line
# N/B: There are Fedora-Cloud...GCP.tar.gz images available, however
# as of this comment, they lack the cloud-init package which is
# required by GCP for startup resizing of the rootfs.
FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images/Fedora-Cloud-35-1.2-x86_64-CHECKSUM"
FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images/Fedora-Cloud-Base-35-1.2.x86_64.qcow2"
FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/development/36/Cloud/x86_64/images/Fedora-Cloud-36-x86_64-20220422.n.0-CHECKSUM"
FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/development/36/Cloud/x86_64/images/Fedora-Cloud-Base-36-20220422.n.0.x86_64.qcow2"

# Prior Fedora release
PRIOR_FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-34-1.2-x86_64-CHECKSUM"
PRIOR_FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2"
PRIOR_FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images/Fedora-Cloud-35-1.2-x86_64-CHECKSUM"
PRIOR_FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images/Fedora-Cloud-Base-35-1.2.x86_64.qcow2"


# Don't leak sensitive values in error messages / output
Expand Down
1 change: 0 additions & 1 deletion cache_images/fedora-netavark_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ INSTALL_PACKAGES=(\
zip
)

# TODO: Remove this when all CI should test with Netavark/Aardvark by default
EXARG="--exclude=netavark --exclude=aardvark-dns --exclude=cargo --exclude=rust"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@containers/podman-maintainers I need help understanding this.

Context is: containers/podman#14397. That PR is failing with what looks like the usual using-CNI-with-netavark problem. I'm wondering if this is the cause. If you look at the entire diff of this PR (115), you will see three instances of TODO: Remove this. In two of those instances, both the comment and the EXARG= were removed. In this one, only the comment was removed. It is not clear whether the word "this" refers to the comment or the definition. Did anyone work with @cevich in making this change, and does anyone understand why this exclusion is in place and what the right thing is to do here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may have been on purpose (only removing the comment). This specific script (fedora-netavark_packaging.sh) is only used for building the CI VM images used by netavark & aardvark-dns, nowhere else. For those use-cases, CI is using runtime-produced & installed netavark/aardvark-dns binaries. So we definitely don't want the RPMs installed. I'll double check the other TODO: Remove this in the diff (here) and make sure they're intentional...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...Ya, the other ones look fine. Sorry for any confusion removal of (only) the comment here caused.


msg "Installing general build/test dependencies"
Expand Down
5 changes: 1 addition & 4 deletions cache_images/fedora-podman-py_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,8 @@ INSTALL_PACKAGES=(\
zstd
)

# TODO: Remove this when all CI should test with Netavark/Aardvark by default
EXARG="--exclude=netavark --exclude=aardvark-dns"

echo "Installing general build/test dependencies"
bigto $SUDO dnf install -y $EXARG "${INSTALL_PACKAGES[@]}"
bigto $SUDO dnf install -y "${INSTALL_PACKAGES[@]}"

# It was observed in F33, dnf install doesn't always get you the latest/greatest
lilto $SUDO dnf update -y
22 changes: 7 additions & 15 deletions cache_images/fedora_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ INSTALL_PACKAGES=(\
ostree-devel
pandoc
parallel
perl-FindBin
pkgconfig
podman
procps-ng
Expand All @@ -117,6 +118,7 @@ INSTALL_PACKAGES=(\
python-pip-wheel
python-setuptools-wheel
python-wheel-wheel
python-toml
python2
python3-PyYAML
python3-coverage
Expand Down Expand Up @@ -153,17 +155,11 @@ INSTALL_PACKAGES=(\
zstd
)

# Perl module packaging changes between F32 and F33
case "$OS_RELEASE_VER" in
32) INSTALL_PACKAGES+=( python3-pytoml ) ;;
33) ;&
34) ;&
35) INSTALL_PACKAGES+=( perl-FindBin python-toml ) ;;
*) die "Unknown/Unsupported \$OS_REL_VER '$OS_REL_VER'" ;;
esac

# TODO: Remove this when all CI should test with Netavark/Aardvark by default
EXARG="--exclude=netavark --exclude=aardvark-dns"
# test with CNI in F35 and lower
EXARG=""
if [[ "$OS_RELEASE_VER" -le 35 ]]; then
EXARG="--exclude=netavark --exclude=aardvark-dns"
fi

# When installing during a container-build, having this present
# will seriously screw up future dnf operations in very non-obvious ways.
Expand All @@ -174,10 +170,6 @@ if ! ((CONTAINER)); then
selinux-policy-devel
policycoreutils
)
else
if [[ "$OS_RELEASE_VER" -lt 35 ]]; then
EXARG="$EXARG --exclude=selinux*"
fi
fi


Expand Down
13 changes: 0 additions & 13 deletions cache_images/fedora_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@ if ! ((CONTAINER)); then
msg "Enabling cgroup management from containers"
ooe.sh $SUDO setsebool -P container_manage_cgroup true
fi

if [[ "$PACKER_BUILD_NAME" =~ prior ]]; then
warn "Disabling CgroupsV2 kernel command-line option for systemd"
SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 systemd.unified_cgroup_hierarchy=0"/'
ooe.sh $SUDO sed -re "$SEDCMD" -i /etc/default/grub
# This is always a symlink to the correct location under /boot/...
ooe.sh $SUDO grub2-mkconfig -o $($SUDO realpath --physical /etc/grub2.cfg)
# This is needed to update the /boot/loader/entries/... file to match grub
# config (bug?). Discovered Jul 28, 2021 on newly build F33 images. Never
# a problem before this point :(
ooe.sh $SUDO grubby --grub2 --update-kernel=$($SUDO grubby --default-kernel) \
--args="systemd.unified_cgroup_hierarchy=0"
fi
fi

nm_ignore_cni
Expand Down
3 changes: 3 additions & 0 deletions cache_images/podman_tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ else # Fedora
$SUDO curl --fail -s -o /usr/local/bin/swagger -L'#' "$download_url"
$SUDO chmod +x /usr/local/bin/swagger
/usr/local/bin/swagger version

# This is needed for rootless testing
$SUDO make install.modules-load
fi

# Make pristine for other runtime usage/expectations also save a bit
Expand Down
5 changes: 1 addition & 4 deletions cache_images/ubuntu_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ bash $SCRIPT_DIRPATH/ubuntu_packaging.sh

if ! ((CONTAINER)); then
warn "Making Ubuntu kernel to enable cgroup swap accounting"
SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1'
warn "Enabling CgroupsV2 kernel command-line option for systemd"
SEDCMD="$SEDCMD systemd.unified_cgroup_hierarchy=1"
SEDCMD="$SEDCMD\"/"
SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1"/'
ooe.sh $SUDO sed -re "$SEDCMD" -i /etc/default/grub.d/*
ooe.sh $SUDO sed -re "$SEDCMD" -i /etc/default/grub
ooe.sh $SUDO update-grub
Expand Down
2 changes: 1 addition & 1 deletion podman/fedora_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
35
36
2 changes: 1 addition & 1 deletion podman/prior-fedora_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
34
35