-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman-3.2.3 import result image is empty #10994
Comments
Thanks, @babykart! I will take a look at this. |
Got the same issue. Both for rootless and rootfull. |
Interesting. From reproducing locally, it seems that problem relates to when reading the archive from stdin. Importing the file directly |
That would make sense. The only times I've used it is by reading from stdin! |
FWIW when using |
I opened #11018 to fix the issue. |
@hoshsadiq, can you share a reproducer? I am looking into adding a regression test but |
[ -r /tmp/DietPi_RPi-ARMv6-Buster.7z ] || curl -fsSL -o /tmp/DietPi_RPi-ARMv6-Buster.7z https://dietpi.com/downloads/images/DietPi_RPi-ARMv6-Buster.7z
tmp_dir="$(mktemp --directory -t dietpi.XXXXXXXX)"
trap '{ sudo umount -lf $tmp_dir/root || true; } && sudo rm -rf $tmp_dir' EXIT
/usr/bin/7za x /tmp/DietPi_RPi-ARMv6-Buster.7z -o"$tmp_dir" "*.img"
disk_img="$(basename "$(find "$tmp_dir" -name "*.img" -printf "%f")" .img)"
offset="$(fdisk -lu "${tmp_dir}/${disk_img}.img" | sed -n "s/\(^[^ ]*img2\)\s*\([0-9]*\)\s*\([0-9]*\)\s*\([0-9]*\).*/\2/p")"
podman run --rm -it -v "$tmp_dir:/workdir" -w /workdir --entrypoint sh multiarch/qemu-user-static -c 'cp /usr/bin/qemu-arm-static /workdir'
disk_root="$tmp_dir/root"
mkdir "$disk_root"
sudo mount -o loop,offset=$((offset * 512)) "${tmp_dir}/${disk_img}.img" "$disk_root"
sudo mv "$disk_root/etc/ld.so.preload" "$disk_root/etc/ld.so.preload.bak"
sudo cp "$tmp_dir/qemu-arm-static" "$disk_root/usr/bin"
sudo tar -C "$disk_root" -c . | podman import - "dietpi:$disk_img" I've ripped this out of the full script I've got so a variable or two may be missing but I don't think it should. |
If importing an archive via stdin write it to a temporary file such that the temporary file can be opened multiple times later on. Otherwise, we may end up with an empty image. Also fix a bug in the URL parsing code; we need to check whether there's actually a scheme. Add system tests for `podman import` exercising the basics. Fixes: containers#10994 Signed-off-by: Valentin Rothberg <[email protected]>
Thanks everybody! |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman-3.2.3 import result image is empty
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
It appears to be relative to the size of the archive because if I try a smaller archive, it works perfectly with 3.2.X
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
eix app-emulation/podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Physical node.
The text was updated successfully, but these errors were encountered: