https://rancher.com/ logo
a

astonishing-electrician-27820

10/18/2022, 11:27 AM
Hey, im having trouble reinstalling longhorn. I have an older version that I didn't follow through with proper uninstall, which is my fault. So I tried running all the "uninstall.yaml" versions based on the major releases in the github branches. Everything after 0.4 shows this:
Copy code
E1018 11:12:14.544813       1 reflector.go:126] <http://github.com/longhorn/longhorn-manager/k8s/pkg/client/informers/externalversions/factory.go:117|github.com/longhorn/longhorn-manager/k8s/pkg/client/informers/externalversions/factory.go:117>: Failed to list *v1beta1.Setting: the server could not find the requested resource (get <http://settings.longhorn.io|settings.longhorn.io>)
E1018 11:12:14.745037       1 reflector.go:126] <http://github.com/longhorn/longhorn-manager/k8s/pkg/client/informers/externalversions/factory.go:117|github.com/longhorn/longhorn-manager/k8s/pkg/client/informers/externalversions/factory.go:117>: Failed to list *v1beta1.Engine: the server could not find the requested resource (get <http://engines.longhorn.io|engines.longhorn.io>)
E1018 11:12:14.944640       1 reflector.go:126] <http://github.com/longhorn/longhorn-manager/k8s/pkg/client/informers/externalversions/factory.go:117|github.com/longhorn/longhorn-manager/k8s/pkg/client/informers/externalversions/factory.go:117>: Failed to list *v1beta1.Replica: the server could not find the requested resource (get <http://replicas.longhorn.io|replicas.longhorn.io>)
E1018 11:12:15.144968       1 reflector.go:126] <http://github.com/longhorn/longhorn-manager/k8s/pkg/client/informers/externalversions/factory.go:117|github.com/longhorn/longhorn-manager/k8s/pkg/client/informers/externalversions/factory.go:117>: Failed to list *v1beta1.InstanceManager: the server could not find the requested resource (get <http://instancemanagers.longhorn.io|instancemanagers.longhorn.io>)
E1018 11:12:15.367282       1 reflector.go:126] <http://github.com/longhorn/longhorn-manager/k8s/pkg/client/informers/externalversions/factory.go:117|github.com/longhorn/longhorn-manager/k8s/pkg/client/informers/externalversions/factory.go:117>: Failed to list *v1beta1.EngineImage: conversion webhook for <http://longhorn.io/v1beta2|longhorn.io/v1beta2>, Kind=EngineImage failed: Post "<https://longhorn-conversion-webhook.longhorn-system.svc:9443/v1/webhook/conversion?timeout=30s>": service "longhorn-conversion-webhook" not found
So some webhook was deleted before it should have been? Further evident when I try to remove the finalizers from some objects manually,
Copy code
   ~  kubectl edit <http://nodes.longhorn.io|nodes.longhorn.io> -n longhorn-system                                                                                                                                   ✔  red ⎈ 
error: <http://nodes.longhorn.io|nodes.longhorn.io> "mcsh1" could not be patched: Internal error occurred: failed calling webhook "<http://validator.longhorn.io|validator.longhorn.io>": Post "<https://longhorn-admission-webhook.longhorn-system-2.svc:9443/v1/webhook/validaton?timeout=10s>": service "longhorn-admission-webhook" not found
error: <http://nodes.longhorn.io|nodes.longhorn.io> "mcsh2" could not be patched: Internal error occurred: failed calling webhook "<http://validator.longhorn.io|validator.longhorn.io>": Post "<https://longhorn-admission-webhook.longhorn-system-2.svc:9443/v1/webhook/validaton?timeout=10s>": service "longhorn-admission-webhook" not found
error: <http://nodes.longhorn.io|nodes.longhorn.io> "pfdc-store-2" could not be patched: Internal error occurred: failed calling webhook "<http://validator.longhorn.io|validator.longhorn.io>": Post "<https://longhorn-admission-webhook.longhorn-system-2.svc:9443/v1/webhook/validaton?timeout=10s>": service "longhorn-admission-webhook" not found
error: <http://nodes.longhorn.io|nodes.longhorn.io> "ryzen1" could not be patched: Internal error occurred: failed calling webhook "<http://validator.longhorn.io|validator.longhorn.io>": Post "<https://longhorn-admission-webhook.longhorn-system-2.svc:9443/v1/webhook/validaton?timeout=10s>": service "longhorn-admission-webhook" not found
All and all, I have these resources left based on the status of this NS
Copy code
- lastTransitionTime: "2021-11-04T05:49:28Z"
    message: 'Discovery failed for some groups, 3 failing: unable to retrieve the
      complete list of server APIs: <http://subresources.kubevirt.io/v1|subresources.kubevirt.io/v1>: the server is currently
      unable to handle the request, <http://upload.cdi.kubevirt.io/v1alpha1|upload.cdi.kubevirt.io/v1alpha1>: the server is
      currently unable to handle the request, <http://upload.cdi.kubevirt.io/v1beta1|upload.cdi.kubevirt.io/v1beta1>: the
      server is currently unable to handle the request'
How do I completely remove longhorn from here so I can reinstall it on my cluster?
Made some progress by deleting the respective ValidatingWebhookConfiguration and MutatingWebhookConfiguration
n

narrow-egg-98197

10/20/2022, 10:37 AM
Would you mind to share the Longhorn namespaces status to check whether it is under terminating?
kubectl get namespaces
793 Views