rancher-desktop icon indicating copy to clipboard operation
rancher-desktop copied to clipboard

Lock container runtime selection if the app still booting up

Open evertonlperes opened this issue 2 years ago • 3 comments

Preflight Checklist

  • [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

Currently you can switch between containerd to dockerd during the app startup and it will have the following behaviour:

  1. Switch from containerd to dockerd during the app startup (progress bar should be visible), won't show the superuser network permission pop-up for dockerd.
  2. After app being ready to use, docker seems broken: docker ps --> error during connect: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": EOF

Proposed Solution

  • We should "lock" container runtime selection if the background services still loading.
  • Enabled container runtime selection only after all services being ready to use.

Additional Information

No response

evertonlperes avatar Dec 17 '21 17:12 evertonlperes

I don't understand this issue. Changing the container runtime will restart the VM, so I don't see why it would be useful to let the VM finish initializing.

I'm also curious why the error message is showing the http: instead of the unix: scheme, so wondering if maybe something else is going on.

jandubois avatar Dec 17 '21 17:12 jandubois

I don't understand this issue. Changing the container runtime will restart the VM, so I don't see why it would be useful to let the VM finish initializing.

I'm also curious why the error message is showing the http: instead of the unix: scheme, so wondering if maybe something else is going on.

@jandubois Here's a detailed scenario about the improvement opportunity:

Scenario: New installation 0.7.0 and containerd already selected.

  1. Open RD
  2. It will start the vm, install k3s and etc... (don't wait to finish the booting process).
  3. Navigate to K8s Settings tab and select dockerd container runtime and click ok.
  4. Select dockerd (make sure the progress bar still visible)
  5. Wait the progress bar to be hidden
  6. Go to terminal and try to list some containers: docker ps
  7. Should see the error: error during connect: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": EOF

The suggestion is basically to block some features to be triggered during the app start up.

Here's a screenshot about the issue, having dockerd selected and during the app startup, I've switched to containerd without waiting until the app being "ready to use": Screen Shot 2021-12-17 at 1 46 23 PM

evertonlperes avatar Dec 17 '21 19:12 evertonlperes

Alternatively, we could check at the end of k8s startup to see if the container runtime matches the expected value, and redo instead. This doesn't take any longer than making the user wait for it to finish and then changing, but does allow the user to at least start the process early.

mook-as avatar Dec 17 '21 22:12 mook-as