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
container: T4870: Update podman to use overlay storage driver #1702
Conversation
Only one question what to do if it exists old images/containers |
Good point, tested on system with existing vfs images:
Resolved by deleting all podman data with |
Yeah, not sure what to do about the manual migration steps required. |
I don't think the image/container data can be converted between drivers. I'm thinking it could either be an "expected breakage" as part of rolling releases, or a warning could be given on boot if vfs storage still exists: |
Would it be possible to move all the container storage files to a temporary place, run |
The data would not be stored in a compatible format for the overlay storage driver. |
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.
I believe the change is justified and that the best way to solve the compatibility is to provide a script that people can run before upgrade.
Since this feature is not in an LTS release, it's only used by the most adventurous users who are likely prepared to have to perform some manual migration steps.
The "incompatibility" can be resolved by running the following script prior to upgrading to a new image: #!/bin/sh
# Migration helper script needed to be executed before upgrading to a more
# recent VyOS version as the container storage driver is changed incompatible
for pod in $(cli-shell-api listActiveNodes container name); do
systemctl stop vyos-container-${pod//\'}.service
done
sed -i 's/vfs/overlay2/g' /etc/containers/storage.conf /usr/share/vyos/templates/container/storage.conf.j2
rm -rf /usr/lib/live/mount/persistence/container/storage/libpod
for pod in $(cli-shell-api listActiveNodes container name); do
image=$(cli-shell-api returnActiveValue container name ${pod//\'} image)
podman image pull $image
systemctl start vyos-container-${pod//\'}.service
done
for dir in vfs vfs-containers vfs-images vfs-layers; do
rm -rf /usr/lib/live/mount/persistence/container/storage/$dir
done |
This manual step just got removed by f3956a5 which simply exports active images as oci-image and re-imports the image after the filesystem got migrated. No manual interaction by the user required. |
Change Summary
We currently use the
vfs
storage driver for podman, which has poor performance and results in much more disk space usage.This PR switches the storage driver to
overlay
, which is docker's preferred storage driver.Types of changes
Related Task(s)
Component(s) name
Proposed changes
How to test
Checklist: