TritonDataCenter / sdc-docker

Docker Engine for Triton
Mozilla Public License 2.0
182 stars 49 forks source link

Docker Build Fails to Import all images into IMGAPI #98

Open Smithx10 opened 7 years ago

Smithx10 commented 7 years ago

Docker Build is failing with the following message while importing images into IMGAPI.

"Build failed: zfs_snapshot_tar exited with code: 1 (zfs_snapshot_tar: readlinkat: No such file or directory ) (req_id: 67b10e5f-0420-4176-8df9-b814cd9bdf27)"

creating home directory/home/st2'. Adding group stanley' (GID 1000) ... Done. Adding userstanley' ... Adding new user stanley' (1000) with groupstanley' ... Creating home directory /home/stanley' ... Copying files from/etc/skel' ... Setting up st2 (2.0.1-3) ... ---> 5e8fcb03860f Step 9 : COPY ./conf/st2.conf.template /st2.conf.template ---> 431f44cd964b Step 10 : RUN md5sum /etc/st2/st2.conf > /st2.conf.orig.md5 ---> Running in 77bd7a162a8d ---> 8469ef762bb9 Step 11 : COPY docker-entrypoint.sh /entrypoint.sh ---> 259ce34e280d Step 12 : ENTRYPOINT /entrypoint.sh ---> f001aa3cd51a Importing image b6f0d1ba568e into IMGAPI Importing image 89fd4d78c32f into IMGAPI Importing image 467a11a5867a into IMGAPI Importing image 11fc9ce76c5e into IMGAPI Importing image a89830093fb2 into IMGAPI Importing image 170f95b9d69d into IMGAPI Importing image 5e8fcb03860f into IMGAPI Build failed: zfs_snapshot_tar exited with code: 1 (zfs_snapshot_tar: readlinkat: No such file or directory ) (req_id: 67b10e5f-0420-4176-8df9-b814cd9bdf27) `

twhiteman commented 7 years ago

Thanks for the report. Which DC did this occur in (or is this a private Triton installation)?

Can you share the Dockerfile (and/or repo) that can reproduce this? Thanks.

Smithx10 commented 7 years ago

twhiteman, its a private triton. I'm assuming imgapi isn't functioning properly, Other builds work. I may have orphaned intermediate images from ctrl+c'ing during builds etc...
(other builds tho currently work) I tried with multiple options --no-cache --rm etc.

[root@ws00 stackstorm]# cat Dockerfile FROM debian:wheezy

ARG ST2_VERSION ARG ST2_REPO=stable

COPY ./sources.list /etc/apt/

RUN apt-get -y update \ && apt-get -y install \ adduser \ procps \ python2.7 \ libffi5 \ libyaml-0-2 \ git \ libpcre3 \ libpython2.7 \ libxml2 \ python-dev \ libssl-dev \ libffi-dev \ sudo \ curl

RUN curl -s \ https://packagecloud.io/install/repositories/StackStorm/staging-stable/script.deb.sh \ | bash \ && apt-get install \ st2=2.0.1-3

COPY ./conf/st2.conf.template /st2.conf.template

COPY docker-entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]

twhiteman commented 7 years ago

Great - I can reproduce that problem (though not sure which symlink is the cause yet), I'll track down the cause and update on my findings.

twhiteman commented 7 years ago

It is failing on /etc/rc0.d/K01sendsigs, which gets removed in the second RUN statement in the Dockerfile:

It was originally a symlink into the init.d dir: $ ls -la /etc/rc0.d/K01sendsigs -> ../init.d/sendsigs

I don't exactly know why it's failing here, but we'll continue investigating and let you know what we find out.

jwreagor commented 6 years ago

I just hit this as well and added to the ticket in our JIRA.

jclulow commented 5 years ago

This bug is open internally at Joyent as well, as DOCKER-978.

Adel-Magebinary commented 5 years ago

Hi @jclulow Joshua,

Great seeing you here :)

Yes, this is the issue that I'm hitting now :)

Shall I package all commands into a single RUN command to avoid this issue?

Or, Shall I delete all rm -rf commands from RUN to avoid this?

Cheers, Adel.

Adel-Magebinary commented 5 years ago

Hello @jclulow ,

I can successfully build the image when I remove below lines from Dockerfile. RUN apk del --no-network .ruby-builddeps && cd / && rm -r /usr/src/ruby && rm -r /root/.gem/`