rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
6.01k stars 283 forks source link

Reset Kubernetes and images breaks Kubernetes #4208

Open IsaSih opened 1 year ago

IsaSih commented 1 year ago

Actual Behavior

After starting a container and deploying a kubernetes app, when trying to "Reset Kubernetes" and "Delete container images", Kubernetes fails to Restart with fatal error in lima:

'time="2023-03-15T18:10:07-07:00" level=fatal msg="host agent process has exited: exit status 1"\n',
  code: 1,
  command: [
    '/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl',
    'start',
    '--tty=false',
    '/Users/isasih/Library/Application Support/rancher-desktop/lima/_config/0.yaml'
  ]
}

OBS: Reseting Kubernetes, but not deleting the images, works with no errors.

Steps to Reproduce

  1. Launch Rancher Desktop
  2. Deploy a k8s app: kubectl create deploy busybox --image=busybox --replicas=2 -- /bin/sh -c "sleep inf"
  3. Start a container with nerdctl nerdctl run -d --restart=always nginx 4.Hit "Reset Kubernetes" and check the "Delete container images" checkbox.
  4. Hit Apply

Result

After Restarting and deleting the images, it throws a fatal error with host agent in lima: fatal error in lima:

'time="2023-03-15T18:10:07-07:00" level=fatal msg="host agent process has exited: exit status 1"\n',
  code: 1,
  command: [
    '/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl',
    'start',
    '--tty=false',
    '/Users/isasih/Library/Application Support/rancher-desktop/lima/_config/0.yaml'
  ]
}

Logs: Logs_reset_k8s_images.zip ha.stderr.log ha.stdout.log

Expected Behavior

User must be able to Reset Kubernetes and images with no errors.

Additional Information

No response

Rancher Desktop Version

1.7.0-636-g1091a64f

Rancher Desktop K8s Version

1.26.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?

x64

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

None

Windows User Only

No response

jandubois commented 1 year ago

Was this instance running in experimental VZ mode?

soupsoup88 commented 9 months ago

Hi, I am hitting similar issue, could you please provide some suggestion on it? thanks.

jandubois commented 9 months ago

@soupsoup88 Please do a factory reset and start the app again. If it still fails, please do another factory reset and a reboot. If it continues to fail, please upload a zip file with all the logs after the failed start.