Skip to content

Commit

Permalink
Workaround for Podman issue
Browse files Browse the repository at this point in the history
The tests that use Podman inside Docker have been modified to
update the graph driver in the SQLite backend as a workaround
for a known issue in Podman on Ubuntu 24 or later.

containers/podman#21683
  • Loading branch information
edewata committed Jan 13, 2025
1 parent 25eeb6b commit 9367193
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 7 deletions.
24 changes: 22 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,28 @@ 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 cat /usr/share/containers/storage.conf
- name: Configure Podman
run: |
OS_VERSION=$(lsb_release -r -s | sed 's/^\(.*\)\..*$/\1/')
echo "OS_VERSION: $OS_VERSION"
if [ "$OS_VERSION" -ge "24" ]; then
# workaround for Ubuntu 24 or later
# https://github.com/containers/podman/issues/21683
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
23 changes: 22 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,28 @@ jobs:
- name: Install Podman
run: |
docker exec pki dnf install -y podman
docker exec pki dnf install -y podman sqlite
docker exec pki cat /usr/share/containers/storage.conf
- name: Configure Podman
run: |
OS_VERSION=$(lsb_release -r -s | sed 's/^\(.*\)\..*$/\1/')
echo "OS_VERSION: $OS_VERSION"
if [ "$OS_VERSION" -ge "24" ]; then
# workaround for Ubuntu 24 or later
# https://github.com/containers/podman/issues/21683
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
19 changes: 15 additions & 4 deletions .github/workflows/ca-container-user-service-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ 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 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 +86,18 @@ jobs:
mount_program = "/usr/bin/fuse-overlayfs"
EOF
docker exec -u pkiuser pki podman system info --format=json | tee output
OS_VERSION=$(lsb_release -r -s | sed 's/^\(.*\)\..*$/\1/')
echo "OS_VERSION: $OS_VERSION"
if [ "$OS_VERSION" -ge "24" ]; then
# workaround for Ubuntu 24 or later
# https://github.com/containers/podman/issues/21683
docker exec -i pki sqlite3 /var/lib/containers/storage/db.sql << EOF
update DBConfig set GraphDriver = 'overlay' where GraphDriver = '';
EOF
fi
docker exec -u pkiuser pki podman info --format=json | tee output
# rootless should be enabled
echo "true" > expected
Expand Down

0 comments on commit 9367193

Please sign in to comment.