Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Cant pull Docker hello-world image #402

Closed
Strum355 opened this issue Sep 5, 2019 · 6 comments · Fixed by #553
Closed

Cant pull Docker hello-world image #402

Strum355 opened this issue Sep 5, 2019 · 6 comments · Fixed by #553
Labels
area/runtime Issues related to container runtimes hacktoberfest kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@Strum355
Copy link

Strum355 commented Sep 5, 2019

image

@stealthybox
Copy link
Contributor

Thanks for reporting -- I can reproduce this on master:

sudo bin/ignite image import hello-world
INFO[0000] Docker image "hello-world:latest" not found locally, pulling... 
INFO[0001] Starting image import...                     
FATA[0001] failed to format image 8b8e8bc523a3065f: command ["mkfs.ext4" "-b" "4096" "-I" "256" "-F" "-E" "lazy_itable_init=0,lazy_journal_init=0" "/var/lib/firecracker/image/8b8e8bc523a3065f/image.ext4"] exited with "mke2fs 1.44.6 (5-Mar-2019)\n/var/lib/firecracker/image/8b8e8bc523a3065f/image.ext4: Not enough space to build proposed filesystem while setting up superblock\n": exit status 1 

With golang:latest (which is significantly larger), there's no issue:

sudo bin/ignite image import golang
INFO[0000] Docker image "golang:latest" not found locally, pulling... 
INFO[0138] Starting image import...                     
INFO[0141] Imported OCI image "golang:latest" (778.2 MB) to base image with UID "cf32284d89a33432" 
INFO[0141] Created image with ID "cf32284d89a33432" and name "golang:latest" 

@stealthybox stealthybox added the kind/bug Categorizes issue or PR as related to a bug. label Sep 6, 2019
@chanwit chanwit added this to the v0.7.0 milestone Sep 11, 2019
@chanwit chanwit added the area/runtime Issues related to container runtimes label Sep 11, 2019
@uLan08
Copy link

uLan08 commented Oct 2, 2019

I'd like to work on this.

@chanwit
Copy link
Member

chanwit commented Oct 2, 2019

sure @uLan08

@chanwit
Copy link
Member

chanwit commented Oct 2, 2019

/contributor-assign @uLan08

@uLan08
Copy link

uLan08 commented Oct 2, 2019

Any tips on where to start looking?

@darkowlzz
Copy link
Contributor

Hi, I got curious about this issue, debugged and found a few problems that are related to tiny images and the images made from scratch.
When a very small image is imported, the filesystem file (in /var/lib/firecracker/image/) that's created based on the image source size is also small. In case of hello-world image, it's so small that mkfs that's run on the filesystem file fails with the following error:

FATA[0000] failed to format image 0f58e80dcf4bae0f: command ["mkfs.ext4" "-b" "4096" "-I" "256" "-F" "-E" "lazy_itable_init=0,lazy_journal_init=0" "/var/lib/firecracker/image/0f58e80dcf4bae0f/image.ext4"] exited with "mke2fs 1.45.3 (14-Jul-2019)\n/var/lib/firecracker/image/0f58e80dcf4bae0f/image.ext4: Not enough space to build proposed filesystem while setting up superblock\n": exit status 1 

Even through the file is created to be 3x of the image size, refer https://github.com/weaveworks/ignite/blob/v0.6.3/pkg/dmlegacy/image_format.go#L37, it seems to not be enough.
Maybe adding a minimum size check for image file would be a good solution. When an image source is smaller than the image size, use the minimum file size.

Once the filesystem size issue is resolved, the image import fails with the following error:

DEBU[0000] Copying in files to the image file from a source... 
FATA[0000] symlink ../proc/net/pnp /tmp/562398507/etc/resolv.conf: no such file or directory 

After trying a few other images, it looks like this happens for small images that are created from scratch only, hello-world, alpine, busybox, etc.
Failing to create resolv.conf results in network issues in the VM.
I'm not sure about a solution for this. Maybe just log a warning when resolv.conf setup fails?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/runtime Issues related to container runtimes hacktoberfest kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants