CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
NOTE: We have already discussed this issue on internal chat. I'm creating it just for reference.
I want to enable support for OpenShift 4 in our existing E2E tests pipelines in Eclipse JKube and Fabric8 Kubernetes Client . I'm trying to create an OKD cluster with CRC preset in a GitHub actions workflow. It's creating a cluster and I'm able to login into the cluster.
However, when I try to build an application using Eclipse JKube. I'm getting this error:
[ERROR] oc: Build for demos-s2i failed: stream was reset: PROTOCOL_ERROR
[ERROR] oc: demos-s2i-2 InvalidOutputReference Output image could not be resolved.
[ERROR] oc: Failed to execute the build [Unable to build the image using the OpenShift build service]
[ERROR] BuildIT.buildImage:112 » KubernetesClient 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 = KubeAPIReadyz openshift-kube-apise
rver.17b9c8fe9b00ff29 readyz=true
If I switch crc version from current version to some old version e.g 2.32.0. I'm able to build application and run e2e tests without any problems. I think there is some problem with current okd bundle. Praveen is already investigating this issue.
OS: Linux
Hypervisor: KVM
Did you run crc setup before starting it (Yes/No)?
Run mvn package oc:build oc:resource oc:apply (Requires Maven and Java8)
Expected
Should be able to build application using Eclipse JKube.
Should be able to run Fabric8 Kubernetes Client E2E tests without any issues
All of the abovementioned steps are working on crc 2.32.0
Actual
Facing errors provided above.
Logs
These are the logs when I deploy
[INFO] oc: Starting Build demos-s2i
[ERROR] Failed to upload archive file for the build: demos-s2i
[ERROR] Please check cluster events via `oc get events` to see what could have possibly gone wrong
[ERROR] oc: Build for demos-s2i failed: stream was reset: PROTOCOL_ERROR
[ERROR] oc: demos-s2i-2 InvalidOutputReference Output image could not be resolved.
[ERROR] oc: Failed to execute the build [Unable to build the image using the OpenShift build service]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:02 min
[INFO] Finished at: 2024-09-20T16:16:38+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jkube:openshift-maven-plugin:1.18-SNAPSHOT:build (default-cli) on project jkube-helm-maven:
Failed to execute the build: Unable to build the image using the OpenShift build service: InvalidOutputReference Output image could not
be resolved. -> [Help 1]
These are logs when I run Fabric8 Kubernetes Client E2E tests on crc cluster:
[ERROR] Errors:
[ERROR] BuildIT.buildImage:112 » KubernetesClient 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 = KubeAPIReadyz openshift-kube-apise
rver.17b9c8fe9b00ff29 readyz=true
ShutdownInitiated openshift-kube-apiserver.17b9c922fe2ccb4e Received signal to terminate, becoming unready, but keeping serving
AfterShutdownDelayDuration openshift-kube-apiserver.17b9c922fe749a70 The minimal shutdown duration of 0s finished
TerminationPreShutdownHooksFinished openshift-kube-apiserver.17b9c922ff5bc993 All pre-shutdown hooks have been finished
InFlightRequestsDrained openshift-kube-apiserver.17b9c922ff616f97 All non long-running request(s) in-flight have drained
HTTPServerStoppedListening openshift-kube-apiserver.17b9c922ff9bbd4f HTTP Server has stopped listening
KubeAPIReadyz openshift-kube-apiserver.17b9c96d5c77afa8 readyz=true
KubeAPIReadyz openshift-kube-apiserver.17b9c9c0b7475784 readyz=true
KubeAPIReadyz openshift-kube-apiserver.17b9c9e1226c007a readyz=true
ShutdownInitiated openshift-kube-apiserver.17b9c9f8b20b73f9 Received signal to terminate, becoming unready, but keeping serving
[ERROR] BuildIT.buildImage:112 » KubernetesClient 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 = KubeAPIReadyz openshift-kube-apise
rver.17b9c8fe9b00ff29 readyz=true
ShutdownInitiated openshift-kube-apiserver.17b9c922fe2ccb4e Received signal to terminate, becoming unready, but keeping serving
AfterShutdownDelayDuration openshift-kube-apiserver.17b9c922fe749a70 The minimal shutdown duration of 0s finished
TerminationPreShutdownHooksFinished openshift-kube-apiserver.17b9c922ff5bc993 All pre-shutdown hooks have been finished
InFlightRequestsDrained openshift-kube-apiserver.17b9c922ff616f97 All non long-running request(s) in-flight have drained
HTTPServerStoppedListening openshift-kube-apiserver.17b9c922ff9bbd4f HTTP Server has stopped listening
KubeAPIReadyz openshift-kube-apiserver.17b9c96d5c77afa8 readyz=true
KubeAPIReadyz openshift-kube-apiserver.17b9c9c0b7475784 readyz=true
KubeAPIReadyz openshift-kube-apiserver.17b9c9e1226c007a readyz=true
ShutdownInitiated openshift-kube-apiserver.17b9c9f8b20b73f9 Received signal to terminate, becoming unready, but keeping serving
[ERROR] ServiceToURLIT.getURL:91 » KubernetesClient Failure executing: POST at: https://api.crc.testing:6443/apis/extensions/v1beta1/
namespaces/default/ingresses. Message: Not Found.
[INFO]
[ERROR] Tests run: 67, Failures: 0, Errors: 3, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
General information
I want to enable support for OpenShift 4 in our existing E2E tests pipelines in Eclipse JKube and Fabric8 Kubernetes Client . I'm trying to create an OKD cluster with CRC preset in a GitHub actions workflow. It's creating a cluster and I'm able to login into the cluster.
However, when I try to build an application using Eclipse JKube. I'm getting this error:
When I try to run Fabric8 Kubernetes Client E2E tests, I'm getting this error:
If I switch crc version from current version to some old version e.g 2.32.0. I'm able to build application and run e2e tests without any problems. I think there is some problem with current okd bundle. Praveen is already investigating this issue.
crc setup
before starting it (Yes/No)?CRC version
CRC config
Host Operating System
Steps to reproduce
I followed steps in Test OKD Bundle GitHub workflow with some additional steps to log into cluster and run some java tests
crc config set preset okd
crc config set network-mode user
crc setup
crc start
mvn package oc:build oc:resource oc:apply
(Requires Maven and Java8)Expected
All of the abovementioned steps are working on crc 2.32.0
Actual
Facing errors provided above.
Logs
These are the logs when I deploy
These are logs when I run Fabric8 Kubernetes Client E2E tests on crc cluster: