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

OpenShift deployment fails while instantiating the build #31228

Closed
michalvavrik opened this issue Feb 16, 2023 · 3 comments · Fixed by #31781
Closed

OpenShift deployment fails while instantiating the build #31228

michalvavrik opened this issue Feb 16, 2023 · 3 comments · Fixed by #31781
Labels
area/kubernetes kind/bug Something isn't working
Milestone

Comments

@michalvavrik
Copy link
Member

michalvavrik commented Feb 16, 2023

Describe the bug

With Quarkus 3.0.0.Alpha4 deploying app using OpenShift extension started to fail. I think it's down to changes in #30480.

Expected behavior

App is deployed to OC.

Actual behavior

App is never deployed. Example from log:

[INFO] --- quarkus-maven-plugin:3.0.0.Alpha4:build (default) @ code-with-quarkus ---
[INFO] [io.quarkus.kubernetes.deployment.KubernetesDeployer] Selecting target 'openshift' since it has the highest priority among the implicitly enabled deployment targets
[WARNING] [io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider] Default DNS servers: [/[2001:4860:4860:0:0:0:0:8888]:53, /[2001:4860:4860:0:0:0:0:8844]:53] (Google Public DNS as a fallback)
[WARNING] There are multiple httpclient implementation in the classpath, choosing the first non-default implementation. You should exclude dependencies that aren't needed or use an explicit association of the HttpClient.Factory.
[INFO] [io.quarkus.kubernetes.deployment.KubernetesDeploy] Kubernetes API Server at 'https://api.ocp4-12.dynamic.quarkus:6443/' successfully contacted.
[INFO] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] Starting (in-cluster) container image build for jar using: BINARY on server: https://api.ocp4-12.dynamic.quarkus:6443/ in namespace:mvavrik-oc-debug.
[INFO] [io.quarkus.kubernetes.deployment.KubernetesDeploy] Kubernetes API Server at 'https://api.ocp4-12.dynamic.quarkus:6443/' successfully contacted.
[INFO] [io.quarkus.kubernetes.deployment.KubernetesDeploy] Kubernetes API Server at 'https://api.ocp4-12.dynamic.quarkus:6443/' successfully contacted.
[INFO] [io.quarkus.kubernetes.deployment.KubernetesDeploy] Kubernetes API Server at 'https://api.ocp4-12.dynamic.quarkus:6443/' successfully contacted.
[INFO] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] Applied: ImageStream code-with-quarkus
[INFO] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] Applied: ImageStream openjdk-17
[INFO] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] Applied: BuildConfig code-with-quarkus
[ERROR] Failed to upload archive file for the build: code-with-quarkus
[ERROR] Please check cluster events via `oc get events` to see what could have possibly gone wrong
[WARNING] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] An exception: 'Can't instantiate binary build, due to error reading/writing stream. Can be caused if the output stream was closed by the server.See if something's wrong in recent events in Cluster = Created code-with-quarkus-1-build.17446c87676bc8ce Created container git-clone
Started code-with-quarkus-1-build.17446c87697c5835 Started container git-clone
BuildStarted code-with-quarkus-1.17446c8777a66cf1 Build mvavrik-oc-debug/code-with-quarkus-1 is now running
AddedInterface code-with-quarkus-1-build.17446c87544c7074 Add eth0 [10.128.2.148/23] from openshift-sdn
Pulled code-with-quarkus-1-build.17446c8758613563 Container image "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:91496407bea46c76443337eb7fb54aa9ddf9f69856940c2d5ec1df4220d0f8fb" already present on machine
Scheduled code-with-quarkus-1-build.17446c86f2deaad7 Successfully assigned mvavrik-oc-debug/code-with-quarkus-1-build to ocp4-12-mbq2m-worker-0-hhl9f
 ' occurred while instantiating the build, however the build has been started.
[INFO] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] Receiving source from STDIN as archive ...
[INFO] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] error: unable to extract binary build input, must be a zip, tar, or gzipped tar, or specified as a file: exit status 1

How to Reproduce?

Steps to reproduce the behavior:

  • prerequisite: OC stuff
  1. Create app with Resteasy and Openshift extensions, f.e. download here https://code.quarkus.io/d?e=resteasy&e=openshift&S=io.quarkus.platform%3A3.0&cn=code.quarkus.io
  2. Add following properties to application.properties
quarkus.kubernetes.deploy=true
quarkus.openshift.route.expose=true
quarkus.kubernetes-client.trust-certs=true
  1. mvn clean verify

Output of uname -a or ver

Linux

Output of java -version

OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)

GraalVM version (if different from Java)

22.3

Quarkus version or git rev

3.0.0.Alpha4 & 999-SNAPSHOT

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6

Additional information

OpenShift 4.12 (Kubernetes version v1.25.4+77bec7a)

@michalvavrik michalvavrik added the kind/bug Something isn't working label Feb 16, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 16, 2023

/cc @Sgitario (kubernetes), @geoand (kubernetes,openshift), @iocanel (kubernetes,openshift)

@michalvavrik
Copy link
Member Author

/cc @manusa

@manusa
Copy link
Contributor

manusa commented Feb 17, 2023

Might be the same problem as what causes eclipse-jkube/jkube#2024

michalvavrik added a commit to michalvavrik/quarkus-test-suite that referenced this issue Feb 22, 2023
pjgg pushed a commit to quarkus-qe/quarkus-test-suite that referenced this issue Feb 23, 2023
@quarkus-bot quarkus-bot bot added this to the 3.0 - main milestone Mar 11, 2023
michalvavrik added a commit to michalvavrik/quarkus-test-framework that referenced this issue Mar 11, 2023
Enable tests using Quarkus OpenShift extension as quarkusio/quarkus#31228 is resolved.
michalvavrik added a commit to michalvavrik/quarkus-test-framework that referenced this issue Mar 11, 2023
Enable tests using Quarkus OpenShift extension as quarkusio/quarkus#31228 is resolved.
michalvavrik added a commit to michalvavrik/quarkus-test-framework that referenced this issue Mar 11, 2023
Enable tests using Quarkus OpenShift extension as quarkusio/quarkus#31228 is resolved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants