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

Workaround for Podman issue #4920

Merged
merged 1 commit into from
Jan 15, 2025
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
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
Loading