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

[Gitlab] Fails because docker_cp cannot copy to non-existing directory #512

Closed
jabbenseth opened this issue May 25, 2020 · 10 comments
Closed

Comments

@jabbenseth
Copy link
Contributor

Hi,

at the moment our CI-Pipelines (with new master branch) fail because of

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
00:53
 Starting function 'prepare_docker_image'
 Building image 'industrial-ci/kinetic/ubuntu:xenial':
 FROM ubuntu:xenial
 ENV ROS_DISTRO kinetic
 ENV LANG C.UTF-8
 ENV LC_ALL C.UTF-8
 RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
 RUN apt-get update -qq && apt-get -qq install -y apt-utils gnupg2 wget ca-certificates lsb-release dirmngr build-essential
 RUN for i in 1 2 3; do { apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 'C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'; } &&  break || sleep 1; done
 RUN echo "deb http://packages.ros.org/ros-testing/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros1-latest.list
 RUN sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list  && apt-get update -qq
 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 Function 'prepare_docker_image' returned with code '0' after 0 min 52 sec
 destination "77d39af9ef6a5c8e83ad0b2bdcbf08b53727127502baeaf0d73f4b988f687c17:/root/" must be a directory
 ERROR: Job failed: exit code 1

Most likely this is because the /root/ directory does not exist in the newly built container. Right now I'm testing whether a quick fix works (master...ipa-jba:mkdir-before-copy) and will comment whether it worked

@gavanderhoorn
Copy link
Member

Most likely this is because the /root/ directory does not exist in the newly built container

No /root in a Linux container?

@jabbenseth
Copy link
Contributor Author

If i start a container with the newest ubuntu:{xenial, bionic, focal} it is there, but all of our (gitlab) pipelines (even using legacy branch) failed with the same error

 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 Function 'prepare_docker_image' returned with code '0' after 1 min 18 sec
 destination "89ae9fcc1c78b709fbe4c5fa3059dc5bd23554c336aaa09bef6d7aa3b38558b5:/root/" must be a directory

I'm not certain what's happening there

@gavanderhoorn
Copy link
Member

Well I'm not saying you're lying, but it would be the first time I see a Linux based container without that directory present.

Were I to come across this problem, I would first start looking at other causes.

@jabbenseth
Copy link
Contributor Author

since I ran into another issue: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/25803 It might be coinciding with that one and a problem of the docker daemon /gitlab runner instead of the actual ci-pipeline.

I will try it without the fix and report back

@jabbenseth
Copy link
Contributor Author

jabbenseth commented May 25, 2020

Reporting back:

I pinned the "image" from "docker:git" to "docker:18-git" which is the fix for the forementioned issue and this solves all the ci-issues --> close and thank you for your input

@gavanderhoorn
Copy link
Member

Thanks for checking it and reporting back.

@Timple
Copy link

Timple commented May 27, 2020

We are having this issue as well. I think this is closed too early.
If "docker:18-git" is the final solution, we need to update the README's and examples.

edit: This fix also works for us on bitbucket

@mathias-luedtke
Copy link
Member

mathias-luedtke commented May 27, 2020

If "docker:18-git" is the final solution, we need to update the README's and examples.

It is not a fix in general.
This problem is not even related to Gitlab, but a apparently Docker issues: The most recent client does not work with older daemons (docker/cli#2537).
At least on Gitlab.com, docker:19.03.5-dind (current industrial_ci config) works as well

I think this is closed too early.

I agree

@mathias-luedtke mathias-luedtke changed the title [Master] Fails because docker_cp cannot copy to non-existing directory [Gitlab] Fails because docker_cp cannot copy to non-existing directory May 27, 2020
@mathias-luedtke
Copy link
Member

mathias-luedtke commented May 27, 2020

At least on Gitlab.com, docker:19.03.5-dind (current industrial_ci config) works as well

So do docker:dind and docker:git

@mathias-luedtke
Copy link
Member

This seems to have been fixed (docker/cli#2538, probably released in 19.03.10).
Please test again with the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants