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

Enable overwriting of links (solves #351) #360

Merged

Conversation

xanonid
Copy link
Contributor

@xanonid xanonid commented Sep 18, 2018

No description provided.

@priyawadhwa
Copy link
Collaborator

/ok-to-test

@priyawadhwa
Copy link
Collaborator

Hey @xanonid, thanks for contributing this fix! Could you add Dockerfile_test_extraction in the dockerfiles directory so that our integration tests can make sure extraction works for this image?

A simple Dockerfile:

FROM docker.elastic.co/kibana/kibana@sha256:e61c1122d9bc8dc8a113c79a035cf3c34d09674685f550ec842afc2d923ad568

should suffice.

@xanonid
Copy link
Contributor Author

xanonid commented Sep 18, 2018

@priyawadhwa Thanks, I added a Dockerfile for the integration test as suggested.

@xanonid
Copy link
Contributor Author

xanonid commented Sep 20, 2018

@sharifelgamal Seems like the kokoro check did not run again. Is there something I can do?

@dlorenc
Copy link
Collaborator

dlorenc commented Sep 21, 2018

I'll try poking kokoro...

@dlorenc
Copy link
Collaborator

dlorenc commented Sep 21, 2018

The test failure is:

    		]time="2018-09-21T07:44:27-07:00" level=warning msg="remove /tmpfs/tmp/gcr.iokaniko-testkaniko-dockerfile_test_replaced_hardlinks081715982/root/.bash_profile: permission denied"
    		time="2018-09-21T07:44:28-07:00" level=warning msg="remove /tmpfs/tmp/gcr.iokaniko-testdocker-dockerfile_test_replaced_hardlinks989545749/root/.bash_profile: permission denied"

which looks like an issue with the base image and container-diff.

I'll look into it a bit...

@dlorenc
Copy link
Collaborator

dlorenc commented Sep 21, 2018

Is there any way you could reproduce this with a simpler base image than:

docker.elastic.co/kibana/kibana@sha256:e61c1122d9bc8dc8a113c79a035cf3c34d09674685f550ec842afc2d923ad568

@xanonid xanonid force-pushed the fix_changed_links_in_base_image branch from 127676c to 778b30f Compare September 24, 2018 14:07
@xanonid
Copy link
Contributor Author

xanonid commented Sep 24, 2018

@dlorenc I replaced the test image. Hopefully, this works better. Could you trigger kokoro again if necessary, please?

@rroller
Copy link

rroller commented Sep 24, 2018

I can confirm that this change corrects the issue below... (I've tested it with one of my builds and it works fine now)

This is the error prior to applying the change in this PR:

INFO[0000] Downloading base image gcr.io/google-appengine/openjdk:8 
INFO[0000] Mounted directories: [/kaniko /var/run /etc/mtab /proc /dev /dev/pts /sys /sys/fs/cgroup /sys/fs/cgroup/systemd /sys/fs/cgroup/cpuset /sys/fs/cgroup/blkio /sys/fs/cgroup/freezer /sys/fs/cgroup/cpu,cpuacct /sys/fs/cgroup/devices /sys/fs/cgroup/pids /sys/fs/cgroup/rdma /sys/fs/cgroup/memory /sys/fs/cgroup/net_cls,net_prio /sys/fs/cgroup/perf_event /sys/fs/cgroup/hugetlb /dev/mqueue /source /containers /dev/termination-log /etc/resolv.conf /etc/hostname /etc/hosts /dev/shm /run/secrets/kubernetes.io/serviceaccount /proc/bus /proc/fs /proc/irq /proc/sys /proc/sysrq-trigger /proc/kcore /proc/timer_list /sys/firmware] 
INFO[0000] Extracting layer 0                           
error building image: error building stage: link /bin/gunzip /bin/uncompress: file exists

@xanonid
Copy link
Contributor Author

xanonid commented Sep 24, 2018

@dlorenc kokoro seemed to fail again 😞. Probably the base image was not different enough to the last? Is there another way than simple try-and-error?

@priyawadhwa
Copy link
Collaborator

Hey @xanonid, I looked into the failing test and I think I've fixed the issue in #363. Once that merges you can rebase and we can rerun kokoro, which I think should work at that point.

@xanonid
Copy link
Contributor Author

xanonid commented Sep 25, 2018

@priyawadhwa Thanks - great news. BTW, I added another commit which fixes problems, if symlinks are replaced by normal files.

@priyawadhwa
Copy link
Collaborator

@xanonid awesome, I just merged #363 so if you rebase we can rerun the tests.

@xanonid xanonid force-pushed the fix_changed_links_in_base_image branch from 32c3553 to b1d4c52 Compare September 26, 2018 07:06
@xanonid
Copy link
Contributor Author

xanonid commented Sep 26, 2018

@priyawadhwa I rebased the commits.

@dlorenc
Copy link
Collaborator

dlorenc commented Sep 26, 2018

Let's see what Kokoro thinks!

@xanonid
Copy link
Contributor Author

xanonid commented Sep 26, 2018

@dlorenc The Kokoro run was successful 👍

@dlorenc
Copy link
Collaborator

dlorenc commented Sep 26, 2018

Woohoo!

@dlorenc dlorenc merged commit 59cb0eb into GoogleContainerTools:master Sep 26, 2018
@xanonid xanonid deleted the fix_changed_links_in_base_image branch September 26, 2018 14:17
@rroller
Copy link

rroller commented Sep 26, 2018

Just confirming, this PR did fix my issues.

FROM gcr.io/kaniko-project/executor:59cb0ebec969fde3f8c8c7c9468d50580eb1e1ac

Thanks!

@yurrriq
Copy link

yurrriq commented Sep 26, 2018

This issue is now solved for us too, but #245 is still a blocker.

@cugu cugu mentioned this pull request Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants