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

s2i build, regression with 1.3.2 #1102

Closed
jfdenise opened this issue Dec 20, 2022 · 12 comments
Closed

s2i build, regression with 1.3.2 #1102

jfdenise opened this issue Dec 20, 2022 · 12 comments
Assignees

Comments

@jfdenise
Copy link

When using 1.3.2 release (latest release), it seems that "docker.io" is added as prefix of the image.

I have the image wildfly/wildfly-s2i:1.0.1-jdk11-snapshot in the local docker repository, but s2i command line doesn't find it.
This image doesn't exist in docker.io.

It woks just fine with 1.3.1.

Docker version 20.10.21+azure-2, build baeda1f82a10204ec5708d5fbba130ad76cfee49

The logs:

INFO - Executing new S2I build with the command [s2i build --loglevel=5 --pull-policy if-not-present --context-dir=test/test-app-default-config -r=main -E "/tmp/tmpyu2hgquq" http://github.com/wildfly/wildfly-s2i wildfly/wildfly-s2i:1.0.1-jdk11-snapshot integ-wildfly/wildfly-s2i:1.0.1-jdk11-snapshot --incremental ]...

2022-12-20 09:24:06,681 - root - ERROR - I1220 09:24:06.681036 18000 build.go:52] Running S2I version "v1.3.2"
2022-12-20 09:24:06,681 - root - ERROR - I1220 09:24:06.681158 18000 util.go:58] Getting docker credentials for wildfly/wildfly-s2i:1.0.1-jdk11-snapshot
2022-12-20 09:24:07,855 - root - ERROR - I1220 09:24:06.681177 18000 util.go:74] Using credentials for pulling wildfly/wildfly-s2i:1.0.1-jdk11-snapshot
2022-12-20 09:24:07,855 - root - ERROR - I1220 09:24:06.681181 18000 util.go:58] Getting docker credentials for integ-wildfly/wildfly-s2i:1.0.1-jdk11-snapshot
2022-12-20 09:24:07,855 - root - ERROR - I1220 09:24:06.681192 18000 util.go:74] Using credentials for pulling integ-wildfly/wildfly-s2i:1.0.1-jdk11-snapshot
2022-12-20 09:24:07,855 - root - ERROR - W1220 09:24:07.854860 18000 build.go:167] could not inspect the builder image for labels: reading manifest 1.0.1-jdk11-snapshot in docker.io/wildfly/wildfly-s2i: errors:
2022-12-20 09:24:07,856 - root - ERROR - denied: requested access to the resource is denied
2022-12-20 09:24:07,856 - root - ERROR - unauthorized: authentication required
2022-12-20 09:24:07,856 - root - ERROR - I1220 09:24:07.856303 18000 docker.go:500] error inspecting image docker.io/wildfly/wildfly-s2i:latest: Error: No such image: docker.io/wildfly/wildfly-s2i:latest

@liby2006
Copy link

me too. I have the same problem

@liby2006
Copy link

I have try v1.1.14 release, it have similar problem
The logs:
/bin/sh: /usr/libexec/s2i/assemble: Permission denied
Build failed
ERROR: An error occurred: non-zero (13) exit code from kubespheredev/nginx-centos7-s2ibuilder-sample:latest

@brenthdaniel
Copy link

I have almost the same problem starting with 1.3.2. In my case the image exists in docker.io, but s2i inexplicably uses the 'latest' tag rather than the one I specify. The 'latest' tag does not exist, so it fails.

(cekit4.5.0) bhdaniel@Brents-MacBook-Pro s2i1.3.2 % ./s2i --loglevel 5 build ~/repos/WASdev/websphere-liberty-s2i/test/test-app-rest ibmcom/websphere-liberty-s2i:22.0.0.10-java8 ibmcom/testapp -e DEPLOY_TO_APPS=true
I0104 08:56:16.426030   68942 build.go:52] Running S2I version "v1.3.2"
I0104 08:56:16.430621   68942 util.go:58] Getting docker credentials for ibmcom/websphere-liberty-s2i:22.0.0.10-java8
I0104 08:56:48.106413   68942 docker.go:500] error inspecting image docker.io/ibmcom/websphere-liberty-s2i:latest: Error: No such image: docker.io/ibmcom/websphere-liberty-s2i:latest
I0104 08:56:48.106606   68942 docker.go:487] Image "docker.io/ibmcom/websphere-liberty-s2i:latest" not available locally, pulling ...
I0104 08:56:49.498188   68942 docker.go:566] pulling image error : Error response from daemon: manifest for ibmcom/websphere-liberty-s2i:latest not found: manifest unknown: manifest unknown
I0104 08:56:49.507080   68942 docker.go:458] error inspecting image docker.io/ibmcom/websphere-liberty-s2i:latest: Error: No such image: docker.io/ibmcom/websphere-liberty-s2i:latest
I0104 08:56:49.509369   68942 build.go:170] 
Error describing image:		unable to get docker.io/ibmcom/websphere-liberty-s2i:latest
Source:				/Users/bhdaniel/repos/WASdev/websphere-liberty-s2i/test/test-app-rest
Output Image Tag:		ibmcom/testapp
Environment:			DEPLOY_TO_APPS=true
Labels:				
Incremental Build:		disabled
Remove Old Build:		disabled
Builder Pull Policy:		if-not-present
Previous Image Pull Policy:	if-not-present
Quiet:				disabled
Layered Build:			disabled
Docker Endpoint:		unix:///var/run/docker.sock
Docker Pull Config:		/Users/bhdaniel/.docker/config.json
Docker Pull User:		

I0104 08:56:49.516142   68942 docker.go:500] error inspecting image docker.io/ibmcom/websphere-liberty-s2i:latest: Error: No such image: docker.io/ibmcom/websphere-liberty-s2i:latest
I0104 08:56:49.516203   68942 docker.go:487] Image "docker.io/ibmcom/websphere-liberty-s2i:latest" not available locally, pulling ...
I0104 08:56:50.806413   68942 docker.go:566] pulling image error : Error response from daemon: manifest for ibmcom/websphere-liberty-s2i:latest not found: manifest unknown: manifest unknown
I0104 08:56:50.810043   68942 docker.go:458] error inspecting image docker.io/ibmcom/websphere-liberty-s2i:latest: Error: No such image: docker.io/ibmcom/websphere-liberty-s2i:latest
E0104 08:56:50.811514   68942 errors.go:286] An error occurred: unable to get docker.io/ibmcom/websphere-liberty-s2i:latest
E0104 08:56:50.811582   68942 errors.go:287] Suggested solution: check image name, or if using a local image set the builder image pull policy to "never"
I0104 08:56:50.811623   68942 errors.go:289] Details: Error response from daemon: manifest for ibmcom/websphere-liberty-s2i:latest not found: manifest unknown: manifest unknown
E0104 08:56:50.811635   68942 errors.go:291] If the problem persists consult the docs at https://github.com/openshift/source-to-image/tree/master/docs. Eventually reach us on freenode #openshift or file an issue at https://github.com/openshift/source-to-image/issues providing us with a log from your build using log output level 3.

@brenthdaniel
Copy link

This bug was introduced by #1068. In generate.go, manageConfigImageLabelsBuildImageName sets the builder image to the docker reference name which will not have tag information

cfg.BuilderImage = ref.DockerReference().Name()

Commenting out that line works around the problem. Otherwise, s2i will always try to use the latest tag for the builder image.

@coreydaley coreydaley self-assigned this Mar 14, 2023
@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 12, 2023
@brenthdaniel
Copy link

/remove-lifecycle stale

This is still a major bug that prevents S2I from being able to use builders that don't publish a latest tag and causes it to silently use the wrong builder version when someone requests a specific tag.

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 14, 2023
@coreydaley
Copy link
Member

If someone would like to put together a pull request + test for this we would be happy to review it.

@coreydaley
Copy link
Member

@brenthdaniel I moved the issue that you were having to #1123 to be dealt with separately.

@coreydaley
Copy link
Member

I have try v1.1.14 release, it have similar problem The logs: /bin/sh: /usr/libexec/s2i/assemble: Permission denied Build failed ERROR: An error occurred: non-zero (13) exit code from kubespheredev/nginx-centos7-s2ibuilder-sample:latest

That is a different problem, please open a different issue for that.

@coreydaley
Copy link
Member

I can not replicate this issue using the latest docker (24.0.2) and S2I (1.3.7). When I build an image using docker build .... it automatically adds the docker.io as a prefix and then it is able to find it locally.

@coreydaley
Copy link
Member

No updates from OP since June, closing.
/close

@openshift-ci openshift-ci bot closed this as completed Sep 6, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 6, 2023

@coreydaley: Closing this issue.

In response to this:

No updates from OP since June, closing.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

5 participants