Skip to content

Commit

Permalink
Temporary workaround for Podman issue on Ubuntu 24
Browse files Browse the repository at this point in the history
To avoid a known issue in Podman on Ubuntu 24 the non-rootless
container tests have been modified to update the graph driver in
the SQLite backend manually. However, this method does not work
for the rootless container test so it has has been hard-coded to
use Ubuntu 22 for now.

containers/podman#21683
  • Loading branch information
edewata committed Jan 15, 2025
1 parent 2817b43 commit 919db96
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 8 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/ca-container-migration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,30 @@ jobs:
- name: Install Podman
run: |
docker exec pki dnf install -y podman
docker exec pki podman info
docker exec pki dnf install -y podman sqlite
docker exec pki ls -lR /usr/share/containers
docker exec pki cat /usr/share/containers/containers.conf
docker exec pki cat /usr/share/containers/storage.conf
- name: Configure Podman
run: |
OS_VERSION=$(lsb_release -r -s | sed 's/\..*$//')
echo "OS_VERSION: $OS_VERSION"
# workaround for Podman issue on Ubuntu 24
# https://github.com/containers/podman/issues/21683
if [ "$OS_VERSION" -ge "24" ]; then
docker exec -i pki sqlite3 /var/lib/containers/storage/db.sql << EOF
update DBConfig set GraphDriver = 'overlay' where GraphDriver = '';
EOF
fi
docker exec pki podman info --format=json | tee output
# rootless should be disabled
echo "false" > expected
jq -r '.host.security.rootless' output > actual
diff expected actual
- name: Load PKI images into root user's space
run: |
Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/ca-container-system-service-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,30 @@ jobs:
- name: Install Podman
run: |
docker exec pki dnf install -y podman
docker exec pki dnf install -y podman sqlite
docker exec pki ls -lR /usr/share/containers
docker exec pki cat /usr/share/containers/containers.conf
docker exec pki cat /usr/share/containers/storage.conf
- name: Configure Podman
run: |
OS_VERSION=$(lsb_release -r -s | sed 's/\..*$//')
echo "OS_VERSION: $OS_VERSION"
# workaround for Podman issue on Ubuntu 24
# https://github.com/containers/podman/issues/21683
if [ "$OS_VERSION" -ge "24" ]; then
docker exec -i pki sqlite3 /var/lib/containers/storage/db.sql << EOF
update DBConfig set GraphDriver = 'overlay' where GraphDriver = '';
EOF
fi
docker exec pki podman info --format=json | tee output
# rootless should be disabled
echo "false" > expected
jq -r '.host.security.rootless' output > actual
diff expected actual
- name: Load PKI images into root user's space
run: |
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/ca-container-user-service-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ env:
jobs:
test:
name: Test
runs-on: ubuntu-latest
# workaround for Podman issue on Ubuntu 24
# https://github.com/containers/podman/issues/21683
runs-on: ubuntu-22.04
env:
SHARED: /tmp/workdir/pki
steps:
Expand Down Expand Up @@ -51,10 +53,12 @@ jobs:
- name: Install Podman
run: |
docker exec pki dnf install -y podman fuse-overlayfs
docker exec pki podman info
docker exec pki dnf install -y podman sqlite fuse-overlayfs
docker exec pki ls -lR /usr/share/containers
docker exec pki cat /usr/share/containers/containers.conf
docker exec pki cat /usr/share/containers/storage.conf
- name: Configure rootless container
- name: Configure Podman
run: |
# enable SETUID and SETGID capabilities
# https://github.com/containers/podman/discussions/21739
Expand Down Expand Up @@ -86,7 +90,7 @@ jobs:
mount_program = "/usr/bin/fuse-overlayfs"
EOF
docker exec -u pkiuser pki podman system info --format=json | tee output
docker exec -u pkiuser pki podman info --format=json | tee output
# rootless should be enabled
echo "true" > expected
Expand Down

0 comments on commit 919db96

Please sign in to comment.