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

[DO_NOT_MERGE] Fix for PUSH_DOCKERCFG_PATH value #8479

Closed
wants to merge 1 commit into from
Closed

[DO_NOT_MERGE] Fix for PUSH_DOCKERCFG_PATH value #8479

wants to merge 1 commit into from

Conversation

nak3
Copy link
Contributor

@nak3 nak3 commented Apr 12, 2016

No description provided.

@nak3
Copy link
Contributor Author

nak3 commented Apr 12, 2016

This patch changed the value PUSH_DOCKERCFG_PATH to use /var/run/secrets/openshift.io/push/ + kapi.DockerConfigKey.

description

As there are a lot of issue reports(projectatomic/openshift2nulecule#42, #7825), current S2I build failed due to the no basic auth credentials.

I also got same error and below is the build log (--loglevel=5).

...
I0412 16:22:28.520155       1 sti.go:298] Successfully built 172.30.138.60:5000/default/helloworld-v3:latest
I0412 16:22:36.926828       1 cleanup.go:23] Removing temporary directory /tmp/s2i-build133282949
I0412 16:22:36.926852       1 fs.go:99] Removing directory '/tmp/s2i-build133282949'
I0412 16:22:36.928473       1 cfg.go:44] Locating docker auth for image 172.30.138.60:5000/default/helloworld-v3:latest and type PUSH_DOCKERCFG_PATH
I0412 16:22:36.928491       1 cfg.go:80] Using Docker authentication configuration in '/var/run/secrets/openshift.io/push'
E0412 16:22:36.928514       1 cfg.go:57] Reading /var/run/secrets/openshift.io/push failed: read /var/run/secrets/openshift.io/push: is a directory
I0412 16:22:36.928527       1 sti.go:215] No push secret provided
I0412 16:22:36.928535       1 sti.go:217] Pushing 172.30.138.60:5000/default/helloworld-v3:latest image ...
The push refers to a repository [172.30.138.60:5000/default/helloworld-v3] (len: 1)
Preparing
F0412 16:22:36.934827       1 builder.go:59] Build error: Failed to push image. Response from registry is: Post http://172.30.138.60:5000/v2/default/helloworld-v3/blobs/uploads/: no basic auth credentials

As you can see, it looks like this line is the root cause.

Reading /var/run/secrets/openshift.io/push failed: read /var/run/secrets/openshift.io/push: is a directory

@nak3
Copy link
Contributor Author

nak3 commented Apr 12, 2016

@bparees Could you please take a look? I understand you chnaged here #6887

But as far as I tested, I hit same issue with other reporters', and this patch fixed it.

@bparees
Copy link
Contributor

bparees commented Apr 12, 2016

@nak3 can you give me an exact recreate?

@bparees
Copy link
Contributor

bparees commented Apr 12, 2016

I suspect you have mismatched images (openshift/origin-sti-builder and openshift/origin-docker-builder) that do not align with the version of your master.

@bparees
Copy link
Contributor

bparees commented Apr 12, 2016

also #7825 appears unrelated since the first build succeeded. if it were the issue you've described, no build would succeed.

@bparees bparees self-assigned this Apr 12, 2016
@nak3
Copy link
Contributor Author

nak3 commented Apr 12, 2016

@bparees Sure. Here is my setup script[1] and steps[2].

[1] https://github.com/nak3/openshift-local-setup/blob/master/openshift-local-setup.sh
[2] https://github.com/nak3/openshift-local-setup

NOTE: I'm using Fedora23 and every oc new-app <git src> hit the issue after the setup.

@bparees
Copy link
Contributor

bparees commented Apr 12, 2016

@nak3 since you are using --latest-images=true, you are responsible for making sure the local images on your host machine are current. I suspect yours are not. Can you either remove that flag, or docker pull openshift/origin-sti-builder and openshift/origin-docker-builder to your node hosts?

@nak3
Copy link
Contributor Author

nak3 commented Apr 12, 2016

Oh, I see. I thought --latest-image=true pulls latest image automatically. So I don't think I pulled them by myself.
Since I am away from my env now, I will check it tomorrow and let you know.

@bparees bparees changed the title Fix for PUSH_DOCKERCFG_PATH value [DO_NOT_MERGE] Fix for PUSH_DOCKERCFG_PATH value Apr 12, 2016
@bparees
Copy link
Contributor

bparees commented Apr 12, 2016

yeah it's poorly named but it really means "use the latest image available locally" which can actually be older than what is in dockerhub.

@nak3
Copy link
Contributor Author

nak3 commented Apr 13, 2016

Yes, you are right. Dropping --latest-image=true could work.
Please feel free to close this PR. Thank you.

@bparees bparees closed this Apr 13, 2016
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

Successfully merging this pull request may close these issues.

2 participants