-
Notifications
You must be signed in to change notification settings - Fork 157
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
Add Podman v5 breaking changes checks. #2818
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# https://github.com/coreos/fedora-coreos-tracker/issues/1629 | ||
# Delete this file once we are on Podman v5 everywhere. | ||
# i.e. We have moved past F39. | ||
ostree-layers: | ||
- overlay/14podman-v5 |
1 change: 1 addition & 0 deletions
1
overlay.d/14podman-v5/usr/lib/systemd/system-preset/14-fcos.preset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
enable coreos-cni-networking-check.service |
11 changes: 11 additions & 0 deletions
11
overlay.d/14podman-v5/usr/lib/systemd/system/coreos-cni-networking-check.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This service checks if the system nodes are still using | ||
# CNI networking. If so, they will be warned to move | ||
# their nodes to netavark respectively. | ||
[Unit] | ||
Description=Check If Podman Is Still Using CNI Networking | ||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/libexec/coreos-cni-networking-check | ||
RemainAfterExit=yes | ||
[Install] | ||
WantedBy=multi-user.target |
37 changes: 37 additions & 0 deletions
37
overlay.d/14podman-v5/usr/libexec/coreos-cni-networking-check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/bash | ||
set -euo pipefail | ||
# Podman is dropping support for CNI networking. | ||
# Podman 5 changes: https://fedoraproject.org/wiki/Changes/Podman5 | ||
# This script checks if the system nodes are still using CNI | ||
# networking. If so, they will warned to move their nodes to Netavark. | ||
|
||
# Change the output color to yellow | ||
warn=$(echo -e '\033[0;33m') | ||
# No color | ||
nc=$(echo -e '\033[0m') | ||
|
||
# Podman supports two network backends Netavark and CNI. | ||
# Netavark is the default network backend and was added in | ||
# Podman version 4.0. CNI is deprecated and is removed | ||
# in Podman version 5.0, in preference of Netavark. | ||
podmanBackend=$(podman info --format "{{.Host.NetworkBackend}}") | ||
|
||
if [[ $podmanBackend != "netavark" ]]; then | ||
motd_path=/run/motd.d/35_cni_warning.motd | ||
|
||
cat << EOF > "${motd_path}" | ||
${warn} | ||
############################################################################## | ||
WARNING: Podman is using CNI networking. CNI is deprecated and will be | ||
removed in the upcoming Podman v5.0, in preference of Netavark. To switch | ||
from CNI networking to Netavark, you must run 'podman system reset --force'. | ||
This will delete all of your images, containers, and custom networks. | ||
Depending on your setup it may be preferable to reprovision the whole machine | ||
from the latest images. | ||
|
||
To disable this warning, use: | ||
sudo systemctl disable coreos-cni-networking-check.service | ||
############################################################################## | ||
${nc} | ||
EOF | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
enable coreos-check-ssh-keys.service | ||
# Check if cgroupsv1 is still being used | ||
enable coreos-check-cgroups.service | ||
enable coreos-check-cgroups-version.service | ||
# https://fedoraproject.org/wiki/Changes/EnableFwupdRefreshByDefault | ||
enable fwupd-refresh.timer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing
set -euo pipefail