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

Silently remove incompatible extensions when switching container engine #4788

Closed
Tracked by #4798
IsaSih opened this issue May 29, 2023 · 4 comments · Fixed by #4810
Closed
Tracked by #4798

Silently remove incompatible extensions when switching container engine #4788

IsaSih opened this issue May 29, 2023 · 4 comments · Fixed by #4810
Labels
area/rdx kind/bug Something isn't working priority/1 Work should be fixed for next release
Milestone

Comments

@IsaSih
Copy link
Contributor

IsaSih commented May 29, 2023

Actual Behavior

Once user has installed extensions using dockerd as the container engine and switches to containerd, Rancher Desktop restarts displaying a Kubernetes error dialog stating that it "Could not read extension metadata", even though there are no real errors in the Kubernetes side.

Steps to Reproduce

  1. Start Rancher Desktop with dockerd
  2. Install some extensions (in this example, the extensions were Resource Usage, Blockly Automation and Newman)
  3. Switch to containerd
  4. Wait for the application to restart

Result

An error dialog stating that the application "Could not read extension metadata" is shown as a Kubernetes error when the application restarts. But Kubernetes is running, so it's not an actual Kubernetes error.

Screen Shot 2023-05-29 at 3 58 03 PM

Fatal error: It seems that RD fails to clean the volumes from namespace rancher-desktop-extensions

2023-05-29T22:57:30.434Z: > /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl shell --workdir=. 0 /usr/local/bin/nerdctl --namespace rancher-desktop-extensions rm --force --volumes 37ad1462978843e11805c623c8ac37a5fb07fd36a773efa6f4c46cc56db8e689
37ad1462978843e11805c623c8ac37a5fb07fd36a773efa6f4c46cc56db8e689

2023-05-29T22:57:30.439Z: > /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl shell --workdir=. 0 /usr/local/bin/nerdctl --namespace rancher-desktop-extensions rm --force --volumes e89ad8abe6e3bcb04eec7575c33350cef22cd664c31044b5fc8542ca613316c6
e89ad8abe6e3bcb04eec7575c33350cef22cd664c31044b5fc8542ca613316c6

2023-05-29T22:57:30.446Z: > /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl shell --workdir=. 0 /usr/local/bin/nerdctl --namespace rancher-desktop-extensions rm --force --volumes 9503ca61aff965f0144b2adb000712a4bce73c2a28159465b660cab75b97172c
9503ca61aff965f0144b2adb000712a4bce73c2a28159465b660cab75b97172c

Logs:
logs.zip

Expected Behavior

Rancher Desktop must silently uninstall incompatible extensions when switching engines, and Rancher Desktop must start with no error dialogs.

Additional Information

No response

Rancher Desktop Version

1.7.0-1432-g567322bd

Rancher Desktop K8s Version

1.27.2

Which container engine are you using?

containerd (nerdctl)

What operating system are you using?

macOS

Operating System / Build Version

macOS Monterey

What CPU architecture are you using?

arm64 (Apple Silicon)

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

No response

@IsaSih IsaSih added the kind/bug Something isn't working label May 29, 2023
@IsaSih IsaSih added priority/1 Work should be fixed for next release area/rdx labels May 29, 2023
@IsaSih IsaSih changed the title Silently remove incompatible extensions when switching container engines Silently remove incompatible extensions when switching container engine May 29, 2023
@IsaSih
Copy link
Contributor Author

IsaSih commented May 29, 2023

This behavior also occurs on Linux

@mook-as
Copy link
Contributor

mook-as commented May 30, 2023

The summary says:

Silently remove incompatible extensions

The expected behaviour says:

Rancher Desktop must display a message warning that all the extensions will be removed

It's unclear which should be done.

@mook-as mook-as removed their assignment May 30, 2023
@mook-as
Copy link
Contributor

mook-as commented May 30, 2023

From discussion:

  • We will just uninstall extensions known to be incompatible (with containerd) on start up, regardless of how it was previously installed.
  • There would be no notification at all.
  • We should trap any errors from extension install. (There's a missing await in front of the install call.)

@IsaSih
Copy link
Contributor Author

IsaSih commented May 31, 2023

Indeed, the expected behavior is a bit unclear, but I will update it to just remove the incompatible extensions with no warning messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rdx kind/bug Something isn't working priority/1 Work should be fixed for next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants