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

devfiles v1 is not working with devWorkspace.enabled #20072

Closed
4 of 23 tasks
flacatus opened this issue Jul 2, 2021 · 12 comments
Closed
4 of 23 tasks

devfiles v1 is not working with devWorkspace.enabled #20072

flacatus opened this issue Jul 2, 2021 · 12 comments
Assignees
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.

Comments

@flacatus
Copy link
Contributor

flacatus commented Jul 2, 2021

Describe the bug

Starting workspace in eclipse che nightly is not working on openshift 4.7 and openshft 4.8.

Che Server Error:

2021-07-02 18:47:23,838[aceSharedPool-0]  [WARN ] [.i.k.KubernetesInternalRuntime 257]  - Failed to start Kubernetes runtime of workspace workspacep0tltzdq3p86epc8.
org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesInfrastructureException: Failure executing: POST at: https://172.30.0.1/apis/route.openshift.io/v1/namespaces/flacatus-che/routes. Message: Route.route.openshift.io "routel05isyes" is invalid: spec.host: Invalid value: "routeerybyw.": host must conform to DNS 952 subdomain conventions. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.host, message=Invalid value: "routeerybyw.": host must conform to DNS 952 subdomain conventions, reason=FieldValueInvalid, additionalProperties={})], group=route.openshift.io, kind=Route, name=routel05isyes, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Route.route.openshift.io "routel05isyes" is invalid: spec.host: Invalid value: "routeerybyw.": host must conform to DNS 952 subdomain conventions, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Inval...
	at org.eclipse.che.workspace.infrastructure.openshift.project.OpenShiftRoutes.create(OpenShiftRoutes.java:53)
	at org.eclipse.che.workspace.infrastructure.openshift.OpenShiftInternalRuntime.createRoutes(OpenShiftInternalRuntime.java:166)
	at org.eclipse.che.workspace.infrastructure.openshift.OpenShiftInternalRuntime.startMachines(OpenShiftInternalRuntime.java:128)
	at org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesInternalRuntime.internalStart(KubernetesInternalRuntime.java:214)
	at org.eclipse.che.api.workspace.server.spi.InternalRuntime.start(InternalRuntime.java:141)
	at org.eclipse.che.api.workspace.server.WorkspaceRuntimes$StartRuntimeTask.run(WorkspaceRuntimes.java:964)
	at org.eclipse.che.commons.lang.concurrent.CopyThreadLocalRunnable.run(CopyThreadLocalRunnable.java:38)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source)
	at io.micrometer.core.instrument.internal.TimedRunnable.run(TimedRunnable.java:44)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.eclipse.che.commons.observability.CountedThreadFactory.lambda$newThread$0(CountedThreadFactory.java:75)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://172.30.0.1/apis/route.openshift.io/v1/namespaces/flacatus-che/routes. Message: Route.route.openshift.io "routel05isyes" is invalid: spec.host: Invalid value: "routeerybyw.": host must conform to DNS 952 subdomain conventions. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.host, message=Invalid value: "routeerybyw.": host must conform to DNS 952 subdomain conventions, reason=FieldValueInvalid, additionalProperties={})], group=route.openshift.io, kind=Route, name=routel05isyes, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Route.route.openshift.io "routel05isyes" is invalid: spec.host: Invalid value: "routeerybyw.": host must conform to DNS 952 subdomain conventions, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, ...
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:639)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:578)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:543)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:504)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleCreate(OperationSupport.java:292)
	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleCreate(BaseOperation.java:893)
	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.create(BaseOperation.java:372)
	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.create(BaseOperation.java:86)
	at org.eclipse.che.workspace.infrastructure.openshift.project.OpenShiftRoutes.create(OpenShiftRoutes.java:51)
	... 12 common frames omitted

Openshift CI Job Logs: https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/eclipse-che_che-operator/888/pull-ci-eclipse-che-che-operator-main-v8-multi-host-nightly-deployment/1411001758028664832/artifacts/multi-host-nightly-deployment/gather-extra/artifacts/pods/

Workspace used to start: "https://raw.githubusercontent.com/eclipse-che/che-devfile-registry/master/devfiles/go/devfile.yaml"

Che version

  • latest
  • nightly
  • other: please specify

Steps to reproduce

Deploy che using chectl server:deploy --platform=openshift --installer=olm

Expected behavior

Runtime

  • kubernetes (include output of kubectl version)
  • Openshift (include output of oc version)
  • minikube (include output of minikube version and kubectl version)
  • minishift (include output of minishift version and oc version)
  • docker-desktop + K8S (include output of docker version and kubectl version)
  • other: (please specify)

Screenshots

Installation method

  • chectl
    • provide a full command that was used to deploy Eclipse Che (including the output)
    • provide an output of chectl version command
  • OperatorHub
  • I don't know

Environment

  • my computer
    • Windows
    • Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • Dev Sandbox (workspaces.openshift.com)
  • other: please specify

Eclipse Che Logs

Additional context

@flacatus flacatus added the kind/bug Outline of a bug - must adhere to the bug report template. label Jul 2, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jul 2, 2021
@mshaposhnik
Copy link
Contributor

Cannot reproduce on 4.7 RHPDS.

@flacatus
Copy link
Contributor Author

flacatus commented Jul 5, 2021

@mshaposhnik I get also using installer operator for chectl:

io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://172.30.0.1/apis/authorization.openshift.io/v1/namespaces/user-che/rolebindings/admin. Message: Get "https://172.30.0.1:443/apis/rbac.authorization.k8s.io/v1/namespaces/user-che/rolebindings/admin": net/http: invalid header field name "Impersonate-Extra-authentication.kubernetes.io/pod-uid". Received status: Status(apiVersion=v1, code=500, details=null, kind=Status, message=Get "https://172.30.0.1:443/apis/rbac.authorization.k8s.io/v1/namespaces/user-che/rolebindings/admin": net/http: invalid header field name "Impersonate-Extra-authentication.kubernetes.io/pod-uid", metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=null, status=Failure, additionalProperties={}).

@ibuziuk ibuziuk added severity/P1 Has a major impact to usage or development of the system. area/che-server and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jul 5, 2021
@skabashnyuk
Copy link
Contributor

@flacatus can you provide CheCluster configuration?

@flacatus
Copy link
Contributor Author

flacatus commented Jul 6, 2021

With single-host exposure:

+ echo '{
  "apiVersion": "org.eclipse.che/v1",
  "kind": "CheCluster",
  "metadata": {
    "name": "eclipse-che"
  },
  "spec": {
    "auth": {
      "externalIdentityProvider": false,
      "identityProviderAdminUserName": "",
      "identityProviderClientId": "",
      "identityProviderPassword": "",
      "identityProviderRealm": "",
      "identityProviderURL": "",
      "initialOpenShiftOAuthUser": true,
      "oAuthClientName": "",
      "oAuthSecret": ""
    },
    "database": {
      "chePostgresDb": "",
      "chePostgresHostName": "",
      "chePostgresPassword": "",
      "chePostgresPort": "",
      "chePostgresUser": "",
      "externalDb": false
    },
    "devWorkspace": {
      "enable": true
    },
    "metrics": {
      "enable": true
    },
    "server": {
      "allowUserDefinedWorkspaceNamespaces": false,
      "cheClusterRoles": "",
      "cheFlavor": "",
      "cheWorkspaceClusterRole": "",
      "gitSelfSignedCert": false,
      "nonProxyHosts": "",
      "proxyPassword": "",
      "proxyPort": "",
      "proxyURL": "",
      "proxyUser": "",
      "serverExposureStrategy": "single-host",
      "serverTrustStoreConfigMapName": "",
      "tlsSupport": true,
      "useInternalClusterSVCNames": true,
      "workspaceNamespaceDefault": "<username>-che"
    },
    "storage": {
      "postgresPVCStorageClassName": "",
      "preCreateSubPaths": true,
      "pvcClaimSize": "10Gi",
      "pvcStrategy": "common",
      "workspacePVCStorageClassName": ""
    }
  }
}'

@flacatus
Copy link
Contributor Author

flacatus commented Jul 6, 2021

Multi-host che cluster:

+ echo '{
  "apiVersion": "org.eclipse.che/v1",
  "kind": "CheCluster",
  "metadata": {
    "name": "eclipse-che"
  },
  "spec": {
    "auth": {
      "externalIdentityProvider": false,
      "identityProviderAdminUserName": "",
      "identityProviderClientId": "",
      "identityProviderPassword": "",
      "identityProviderRealm": "",
      "identityProviderURL": "",
      "initialOpenShiftOAuthUser": true,
      "oAuthClientName": "",
      "oAuthSecret": ""
    },
    "database": {
      "chePostgresDb": "",
      "chePostgresHostName": "",
      "chePostgresPassword": "",
      "chePostgresPort": "",
      "chePostgresUser": "",
      "externalDb": false
    },
    "devWorkspace": {
      "enable": true
    },
    "metrics": {
      "enable": true
    },
    "server": {
      "allowUserDefinedWorkspaceNamespaces": false,
      "cheClusterRoles": "",
      "cheFlavor": "",
      "cheWorkspaceClusterRole": "",
      "gitSelfSignedCert": false,
      "nonProxyHosts": "",
      "proxyPassword": "",
      "proxyPort": "",
      "proxyURL": "",
      "proxyUser": "",
      "serverExposureStrategy": "multi-host",
      "serverTrustStoreConfigMapName": "",
      "tlsSupport": true,
      "useInternalClusterSVCNames": true,
      "workspaceNamespaceDefault": "<username>-che"
    },
    "storage": {
      "postgresPVCStorageClassName": "",
      "preCreateSubPaths": true,
      "pvcClaimSize": "10Gi",
      "pvcStrategy": "common",
      "workspacePVCStorageClassName": ""
    }
  }
}'

@flacatus
Copy link
Contributor Author

flacatus commented Jul 6, 2021

@mshaposhnik @skabashnyuk ^^

@flacatus
Copy link
Contributor Author

flacatus commented Jul 6, 2021

I think the problems comes when start v1 devfile with devworkspace enabled.

@ibuziuk
Copy link
Member

ibuziuk commented Jul 6, 2021

v1 devfiles are expected to work with the devworkspace enabled I believe.
There has been an issue reported some time ago, but not sure if it is relevant for the current context - #20052

@skabashnyuk skabashnyuk self-assigned this Jul 13, 2021
@skabashnyuk skabashnyuk changed the title Unable to start a workspace in Openshift 4.7 and Openshift 4.8 devfiles v1 is not working with devWorkspace.enabled Jul 13, 2021
@skabashnyuk skabashnyuk added kind/task Internal things, technical debt, and to-do tasks to be performed. and removed kind/bug Outline of a bug - must adhere to the bug report template. labels Jul 13, 2021
@ibuziuk
Copy link
Member

ibuziuk commented Jul 26, 2021

I was able to reproduce with the following error:

Failed to run the workspace: "Failure executing: POST at: https://172.30.0.1/apis/route.openshift.io/v1/namespaces/ibuziuk-che/routes. Message: Route.route.openshift.io "routegh2x4gr1" is invalid: spec.host: Invalid value: "routes4stqz.": host must conform to DNS 952 subdomain conventions. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.host, message=Invalid value: "routes4stqz.": host must conform to DNS 952 subdomain conventions, reason=FieldValueInvalid, additionalProperties={})], group=route.openshift.io, kind=Route, name=routegh2x4gr1, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Route.route.openshift.io "routegh2x4gr1" is invalid: spec.host: Invalid value: "routes4stqz.": host must conform to DNS 952 subdomain conventions, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={})."

@skabashnyuk
Copy link
Contributor

AFAIK we didn't make a promise yet that two devfile engines will work together at the same time. The fact that it was working before I believe luck and not a deliberate action. As soon as we have more free hands we will take a look.

@ibuziuk
Copy link
Member

ibuziuk commented Jul 28, 2021

cc: @benoitf not sure what shall we do with the dogfooding instance in this case
it looks like there are problems with both devfile engines when the devWorkspace is enabled

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Aug 17, 2021

expected behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

5 participants