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

fix: handle the KubernetesClientException during the stop workspace role provisioning #289

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

ibuziuk
Copy link
Member

@ibuziuk ibuziuk commented Apr 12, 2022

What does this PR do?

fix: handle the KubernetesClientException during the stop workspace role provisioning

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#21331

How to test this PR?

Image quay.io/ibuziuk/che-server:stop-role-catch

logs during provisioning with edit rights for user - oc adm policy add-role-to-user edit "${USER}"

022-04-12 12:26:57,183[main] [INFO ] [o.e.c.c.metrics.MetricsServer 46] - Metrics server started at port 8087 successfully
12-Apr-2022 12:26:57.814 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/user/eclipse-che/tomcat/webapps/api.war] has finished in [32,594] ms
12-Apr-2022 12:26:57.816 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/home/user/eclipse-che/tomcat/webapps/swagger.war]
12-Apr-2022 12:26:58.088 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/user/eclipse-che/tomcat/webapps/swagger.war] has finished in [272] ms
12-Apr-2022 12:26:58.093 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
12-Apr-2022 12:26:58.104 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [39298] milliseconds
2022-04-12 12:34:12,819[io-8080-exec-10] [WARN ] [tStopWorkspaceRoleConfigurator 90] - Stop workspace Role and RoleBinding will not be provisioned to the 'openshift-operators' namespace. 'che.workspace.stop.role.enabled' property is set to 'true', Failure executing: GET at: https://10.217.4.1/apis/authorization.openshift.io/v1/namespaces/user1-devspace/roles/workspace-stop. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. roles.authorization.openshift.io "workspace-stop" is forbidden: User "user1" cannot get resource "roles" in API group "authorization.openshift.io" in the namespace "user1-devspace"

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants