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

Openshift connector and Che: the extension is not keeping the state after workspace restart. #15270

Closed
3 of 5 tasks
sunix opened this issue Nov 21, 2019 · 22 comments · Fixed by eclipse-che/che-plugin-registry#543
Assignees
Labels
area/plugins severity/P1 Has a major impact to usage or development of the system. status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach
Milestone

Comments

@sunix
Copy link
Contributor

sunix commented Nov 21, 2019

Describe the bug

When using the openshift connector, the state is lost after restart.

Che version

  • latest
  • nightly
  • other: please specify

Steps to reproduce

  1. Start a workspace with the openshift connector plugin + a nodejs project
  2. Login to a remote openshift cluster from the openshift connector panel
  3. Create some project / component to the nodejs project, push
  4. Restart the workspace
  5. User is not connected anymore, and after reloaded, the component has no context although .odo folder is still present in the nodejs project.

Runtime

  • Openshift 4.2

Installation method

  • che-operator (operator hub)
@sunix sunix added the kind/bug Outline of a bug - must adhere to the bug report template. label Nov 21, 2019
@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 Nov 21, 2019
@sunix sunix added the area/editor/theia Issues related to the che-theia IDE of Che label Nov 21, 2019
@tsmaeder
Copy link
Contributor

@sunix are you using persistent storage or ephemeral? Is the state preserved when you use the extension in VS Code?

@tsmaeder tsmaeder added the status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering. label Nov 21, 2019
@sunix
Copy link
Contributor Author

sunix commented Nov 21, 2019

Persistent storage. Yes it works on VS Code

@sunix sunix removed their assignment Nov 21, 2019
@sunix sunix removed the status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering. label Nov 21, 2019
@tolusha tolusha added severity/P1 Has a major impact to usage or development of the system. status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering. status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. severity/P1 Has a major impact to usage or development of the system. labels Nov 22, 2019
@azatsarynnyy
Copy link
Member

It's because of kubeconfig isn't persisted between workspace restarts. Should be fixed by #14877

@benoitf benoitf removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 27, 2019
@vparfonov vparfonov added this to the Backlog - IDE 1 milestone Nov 27, 2019
@vparfonov vparfonov added team/ide and removed status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering. labels Nov 27, 2019
@vparfonov vparfonov modified the milestones: Backlog - IDE 1, 7.6.0 Nov 28, 2019
@sunix
Copy link
Contributor Author

sunix commented Dec 5, 2019

@azatsarynnyy i don't see how these are related: #14877 is about chectl

@azatsarynnyy
Copy link
Member

If I understand it right, the solution #2 , proposed in #14877, should fix that problem partly. When access to a cluster is set up with chectl workspace:inject.

@ericwill ericwill mentioned this issue Dec 17, 2019
15 tasks
@ericwill ericwill mentioned this issue Jan 8, 2020
16 tasks
@azatsarynnyy azatsarynnyy removed their assignment Jan 13, 2020
@ericwill ericwill mentioned this issue Jan 28, 2020
12 tasks
@azatsarynnyy azatsarynnyy removed the area/editor/theia Issues related to the che-theia IDE of Che label Feb 6, 2020
@sunix sunix added area/dev-experience severity/P1 Has a major impact to usage or development of the system. labels Feb 11, 2020
@tsmaeder
Copy link
Contributor

Note that any VS Code extension can save state to a directory provided by the API, so the only general fix is to preserve that directory between workspace runs.

@ericwill ericwill mentioned this issue Feb 19, 2020
21 tasks
@ericwill ericwill removed this from the 7.6.0 milestone Mar 3, 2020
@ericwill ericwill mentioned this issue Mar 12, 2020
50 tasks
@ericwill ericwill mentioned this issue Apr 1, 2020
47 tasks
@ericwill ericwill mentioned this issue Apr 22, 2020
52 tasks
@vinokurig vinokurig self-assigned this Apr 23, 2020
@vinokurig vinokurig reopened this Apr 23, 2020
@vinokurig
Copy link
Contributor

Can not reproduce the bug. Looks like since we have the auto login feature, it is not relevant any more. Here is my steps to reproduce:
video-convert (1)

@sunix sunix reopened this Jun 23, 2020
@sunix
Copy link
Contributor Author

sunix commented Jun 23, 2020

Hey sorry, @vinokurig autologin is for login in the current openshift cluster. What if we log in another cluster?

@nickboldt
Copy link
Contributor

is this on track for Che 7.16? We'd like this to work OOTB in CRW 2.3.

@ericwill ericwill mentioned this issue Jul 15, 2020
38 tasks
@ericwill ericwill added the status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach label Jul 15, 2020
@ericwill ericwill added this to the 7.17 milestone Jul 15, 2020
@sunix
Copy link
Contributor Author

sunix commented Jul 16, 2020

also ... has autologin #15261 been moved to CRW?

@vinokurig
Copy link
Contributor

@sunix

also ... has autologin #15261 been moved to CRW?

It should work for CRW.

@vinokurig
Copy link
Contributor

vinokurig commented Jul 17, 2020

Proposal: to keep the plugin state between workspace restarts we should have an additional PVC, like the /projects folder mount. @skabashnyuk WDYT?

@sunix
Copy link
Contributor Author

sunix commented Jul 17, 2020

@vinokurig yep so which folder(s) would you turn into volumes ?

@vinokurig
Copy link
Contributor

It think it should be a new folder somewhere in root, don't know the name yet :)

@skabashnyuk
Copy link
Contributor

keeping the state of workspace between restarts in a volume sounds good to me

@tsmaeder
Copy link
Contributor

Note that we sometimes run multiple copies of VS Code extensions in various containers (VSCode YAML, for example). This could lead to the plugins overwriting each other's state. So if this is going to be a general fix, we should follow up by doing something about that: IMO, running multiple copies of the same plugin is wrong anyway: we needed it because we could not remotely call plugin API. Now that we can, we should refactor our plugins and prevent multiple copies of the same plugin.

@vinokurig vinokurig removed the kind/bug Outline of a bug - must adhere to the bug report template. label Jul 20, 2020
@vinokurig
Copy link
Contributor

The openshift-connector plugin uses the openshift-client tool under the hood, so the login state is kept in the config of the openshift-client tool, not in the plugin state. I've added a volume mount to the openshift-connector plugin which will save the config of the openshift-client tool, so the the login session will be saved between workspace restarts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins severity/P1 Has a major impact to usage or development of the system. status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach
Projects
None yet
Development

Successfully merging a pull request may close this issue.