{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/che/issues/8847","repository_url":"https://api.github.com/repos/eclipse/che","labels_url":"https://api.github.com/repos/eclipse/che/issues/8847/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/che/issues/8847/comments","events_url":"https://api.github.com/repos/eclipse/che/issues/8847/events","html_url":"https://github.com/eclipse/che/issues/8847","id":298682581,"number":8847,"title":"Openshift Origin 1.5 : Che 6.1.0 - MultiUser Deployment Workspace Start Failure","user":{"login":"hbhargav","id":12011767,"avatar_url":"https://avatars0.githubusercontent.com/u/12011767?v=4","gravatar_id":"","url":"https://api.github.com/users/hbhargav","html_url":"https://github.com/hbhargav","followers_url":"https://api.github.com/users/hbhargav/followers","following_url":"https://api.github.com/users/hbhargav/following{/other_user}","gists_url":"https://api.github.com/users/hbhargav/gists{/gist_id}","starred_url":"https://api.github.com/users/hbhargav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbhargav/subscriptions","organizations_url":"https://api.github.com/users/hbhargav/orgs","repos_url":"https://api.github.com/users/hbhargav/repos","events_url":"https://api.github.com/users/hbhargav/events{/privacy}","received_events_url":"https://api.github.com/users/hbhargav/received_events","type":"User","site_admin":false},"labels":[{"id":192367931,"url":"https://api.github.com/repos/eclipse/che/labels/kind/question","name":"kind/question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-20T17:32:20Z","updated_at":"2018-02-21T07:29:58Z","closed_at":null,"author_association":"NONE","body":"### Description\r\n\r\nI've deployed Che 6.1.0 MultiUser on Openshift Origin 1.5. When I try to launch workspace, I get the following error \r\n\r\n\"Message: Route in version \"v1\" cannot be handled as a Route: no kind \"Route\" is registered for version \"route.openshift.io/v1\". Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=Route in version \"v1\" cannot be handled as a Route: no kind \"Route\" is registered for version \"route.openshift.io/v1\", metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).\"\r\n\r\noc version \r\noc v1.5.1+7b451fc\r\nkubernetes v1.5.2+43a9be4\r\nfeatures: Basic-Auth\r\n\r\nServer https://ha-oso.xxxx.com:8443\r\nopenshift v1.5.1\r\nkubernetes v1.5.2+43a9be4\r\n\r\n I've set value for CHE_INFRA_OPENSHIFT_PROJECT, inspite of which every workspace is launched in separate project/namespace.\r\nI'm using dynamic provisioning for pvc & DEFAULT_CHE_INFRA_KUBERNETES_PVC_STRATEGY=\"unique\", as a result of which every workspace will claim pv, dynamic provision isn't working & the claims are running forever\r\n\r\n### Reproduction Steps\r\nI've deployed che 6.1.0 using deploy-che.sh script from Che project repo\r\n\r\n**OS and version:**    \r\nOpenshift 1.5.1\r\nKubernetes 1.5.2\r\n\r\nKeycloak & Postgres have been setup manually outside openshift.\r\n\r\n**Diagnostics:** \r\n I suspect this is related to Kubernetes version, but thats a wild guess \r\n"},"comment":{"url":"https://api.github.com/repos/eclipse/che/issues/comments/367236900","html_url":"https://github.com/eclipse/che/issues/8847#issuecomment-367236900","issue_url":"https://api.github.com/repos/eclipse/che/issues/8847","id":367236900,"user":{"login":"hbhargav","id":12011767,"avatar_url":"https://avatars0.githubusercontent.com/u/12011767?v=4","gravatar_id":"","url":"https://api.github.com/users/hbhargav","html_url":"https://github.com/hbhargav","followers_url":"https://api.github.com/users/hbhargav/followers","following_url":"https://api.github.com/users/hbhargav/following{/other_user}","gists_url":"https://api.github.com/users/hbhargav/gists{/gist_id}","starred_url":"https://api.github.com/users/hbhargav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbhargav/subscriptions","organizations_url":"https://api.github.com/users/hbhargav/orgs","repos_url":"https://api.github.com/users/hbhargav/repos","events_url":"https://api.github.com/users/hbhargav/events{/privacy}","received_events_url":"https://api.github.com/users/hbhargav/received_events","type":"User","site_admin":false},"created_at":"2018-02-21T07:29:58Z","updated_at":"2018-02-21T07:29:58Z","author_association":"NONE","body":"@eivantsov \r\nPlease find my response inline\r\n\r\n1. Any chances you upgrade to Origin 1.6?\r\nWe have been running che 5.20 on origin 1.5 for couple of months & upgrade to origin 1.6 would require considerable effort, I would consider upgrade if we manage to nail down the issue to origin 1.5 with kubernetes 1.5.\r\n\r\n2. Do you use a custom recipe to launch a workspace? If so, which one?\r\nI'm not using any custom recipe to launch a workspace, I'm using java-default stack & console-java-simple project.\r\n\r\n3. \"CHE_INFRA_OPENSHIFT_PROJECT\" should be set to eclipse-che or whatever namespace you used for Che server deployment\r\nI've set CHE_INFRA_OPENSHIFT_PROJECT to the same namespace that che-server is being launched.\r\n\r\nThe reason why workspaces were being launched in a new namespace boils down to the issue\r\nhttps://github.com/eclipse/che/pull/8795\r\n\r\nTo overcome this I set CHE_INFRA_KUBERNETES_NAMESPACE, which matches the value of CHE_INFRA_OPENSHIFT_PROJECT.\r\n\r\nNow, the workspace pod starts in the same namespace as che-server, however it throws the following error message\r\n\"Message: Route in version \"v1\" cannot be handled as a Route: no kind \"Route\" is registered for version \"route.openshift.io/v1\". Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=Route in version \"v1\" cannot be handled as a Route: no kind \"Route\" is registered for version \"route.openshift.io/v1\", metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).\"\r\n\r\nI tried to diagnose the issue, the following are my findings.\r\n\r\n## 1\r\nI've set DEFAULT_CHE_INFRA_KUBERNETES_PVC_STRATEGY=\"unique\" & dynamic provisioning is enabled using storage class as below\r\n\r\nkind: StorageClass\r\napiVersion: storage.k8s.io/v1beta1\r\nmetadata:\r\n  name: gp2\r\nprovisioner: kubernetes.io/aws-ebs\r\nparameters:\r\n  type: gp2\r\n\r\n$oc patch storageclass gp2 -p '{\"metadata\": {\"annotations\": {\"storageclass.kubernetes.io/is-default-class\": \"true\"}}}'\r\n\r\n$oc get storageclass\r\nNAME      TYPE\r\ngp2           kubernetes.io/aws-ebs\r\n\r\n$ oc describe storageclass\r\nName:\t\t        gp2\r\nIsDefaultClass:\tNo\r\nAnnotations:\t        storageclass.kubernetes.io/is-default-class=true\r\nProvisioner:\t        kubernetes.io/aws-ebs\r\nParameters:\t        type=gp2\r\n\r\nThe following happens when launching workspace, The workspace requests for 2 pvc's each of which are 10Gi size, I believe this is picked up from default che.env\r\n\r\nI've not created any pv since dynamic provisioning needs to launch 2 aws-ebs volumes & made available for workspace pod.\r\nI see that the dynamic provision isnt triggered & the claim requests are running forever. In the background che reports the above error on Dashboard & Che Server Logs.\r\n\r\nI made the following changes to che-openshift.yaml for PVC\r\n\r\n- apiVersion: v1\r\n  kind: PersistentVolumeClaim\r\n  metadata:\r\n    labels:\r\n      app: che\r\n    name: che-data-volume\r\n    annotations:\r\n       volume.beta.kubernetes.io/storage-class: gp2\r\n  spec:\r\n    accessModes:\r\n    - ReadWriteOnce\r\n    resources:\r\n      requests:\r\n        storage: 1Gi\r\n- apiVersion: v1\r\n  kind: PersistentVolumeClaim\r\n  metadata:\r\n    labels:\r\n      app: che\r\n    name: claim-che-workspace\r\n    annotations:\r\n       volume.beta.kubernetes.io/storage-class: gp2\r\n  spec:\r\n    accessModes:\r\n    - ReadWriteOnce\r\n    resources:\r\n      requests:\r\n        storage: 1Gi\r\n\r\nChe-server deployment goes through fine, dynamic provisioning gets triggered and things work as expected. Workspace starts fail with error message mentioned above\r\nOn debugging more into pvc claim request during workspace launch, I see an error stating no default storage class found, though storageclass default is set to true.\r\n\r\nSo I plan to create another storageclass which is cluster-wide default using the below script.\r\n\r\nkind: StorageClass\r\napiVersion: storage.k8s.io/v1beta1\r\nmetadata:\r\n  name: generic\r\n  annotations:\r\n    storageclass.beta.kubernetes.io/is-default-class: \"true\"\r\nprovisioner: kubernetes.io/aws-ebs\r\nparameters:\r\n  type: gp2\r\n\r\n## 2\r\nI tried the option of using common volume for all workspaces. \r\nI've set DEFAULT_CHE_INFRA_KUBERNETES_PVC_STRATEGY=\"common\", so that workspace uses the claim-che-workspace pvc already provisioned as part of che-server deployment.\r\n\r\nIn this mode as well it throws\r\n\"Message: Route in version \"v1\" cannot be handled as a Route: no kind \"Route\" is registered for version \"route.openshift.io/v1\". Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=Route in version \"v1\" cannot be handled as a Route: no kind \"Route\" is registered for version \"route.openshift.io/v1\", metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).\"\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"hbhargav"}}