Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-23528

hypershift destroy command fails when removing destroy finalizer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • None
    • 4.15
    • HyperShift
    • Moderate
    • No
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      Attempting to destroy an AWS cluster can result in an error such as:
      
      2023-11-21T15:04:15Z	INFO	Deleted role	{"role": "53375835bafc21240c89-mgmt-worker-role"}
      2023-11-21T15:04:15Z	INFO	Deleting Secrets	{"namespace": "clusters"}
      2023-11-21T15:04:15Z	INFO	Deleted CLI generated secrets
      2023-11-21T15:04:15Z	ERROR	Failed to destroy cluster	{"error": "failed to remove finalizer: HostedCluster.hypershift.openshift.io \"53375835bafc21240c89-mgmt\" is invalid: metadata.finalizers: Forbidden: no new finalizers can be added if the object is being deleted, found new finalizers []string{\"hypershift.io/aws-oidc-discovery\"}"}
      github.com/spf13/cobra.(*Command).execute
      	/hypershift/vendor/github.com/spf13/cobra/command.go:916
      github.com/spf13/cobra.(*Command).ExecuteC
      	/hypershift/vendor/github.com/spf13/cobra/command.go:1044
      github.com/spf13/cobra.(*Command).Execute
      	/hypershift/vendor/github.com/spf13/cobra/command.go:968
      github.com/spf13/cobra.(*Command).ExecuteContext
      	/hypershift/vendor/github.com/spf13/cobra/command.go:961
      main.main
      	/hypershift/main.go:70
      runtime.main
      	/usr/local/go/src/runtime/proc.go:250
      Error: failed to remove finalizer: HostedCluster.hypershift.openshift.io "53375835bafc21240c89-mgmt" is invalid: metadata.finalizers: Forbidden: no new finalizers can be added if the object is being deleted, found new finalizers []string{"hypershift.io/aws-oidc-discovery"}
      failed to remove finalizer: HostedCluster.hypershift.openshift.io "53375835bafc21240c89-mgmt" is invalid: metadata.finalizers: Forbidden: no new finalizers can be added if the object is being deleted, found new finalizers []string{"hypershift.io/aws-oidc-discovery"}

      Version-Release number of selected component (if applicable):

      4.15

      How reproducible:

      Occasionally

      Steps to Reproduce:

      1. create hosted AWS cluster
      2. destroy cluster with `hypershift destroy cluster aws`
      

      Actual results:

      In some cases, the destroy will fail with the message in the description

      Expected results:

      The destroy does not fail while removing the destroy finalizer

      Additional info:

       

              agarcial@redhat.com Alberto Garcia Lamela
              cewong@redhat.com Cesar Wong
              Jie Zhao Jie Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: