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

[BUG] Unable to build application on a Crc configured cluster with okd preset #4382

Open
rohanKanojia opened this issue Sep 30, 2024 · 0 comments
Labels
kind/bug Something isn't working status/need triage

Comments

@rohanKanojia
Copy link
Contributor

General information

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]

When I try to run Fabric8 Kubernetes Client E2E tests, I'm getting this error:

[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)?
    • Yes
  • Running CRC on: Laptop

CRC version

2.41.0

CRC config

- consent-telemetry                     : yes
- network-mode                          : user
- preset                                : okd

Host Operating System

NAME="Fedora Linux"
VERSION="40 (KDE Plasma)"
ID=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora Linux 40 (KDE Plasma)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:40"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f40/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=40
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=40
SUPPORT_END=2025-05-13
VARIANT="KDE Plasma"
VARIANT_ID=kde

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

  1. crc config set preset okd
  2. crc config set network-mode user
  3. crc setup
  4. crc start
  5. Clone https://github.com/rohanKanojia/eclipse-jkube-demo-project
  6. 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] ------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/need triage
Projects
None yet
Development

No branches or pull requests

1 participant