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

HCP destroy cluster command fails with context deadline exceeded

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      When trying to destroy HCP cluster from CLI it fails with the following error.
      
      [root@bastion rackm04-hcp]# oc get hc -A
      NAMESPACE      NAME           VERSION   KUBECONFIG    PROGRESS    AVAILABLE   PROGRESSING   MESSAGE
      testcluster1   testcluster1   4.17.6    testcluster1-admin-kubeconfig   Completed   True        False The hosted control plane is available
      
      testcluster-destroy   testcluster-destroy   4.16.23   testcluster-destroy-admin-kubeconfig   Completed   True        False         The hosted control plane is available
      
      clusters       virttest       4.16.20   virttest-admin-kubeconfig       Completed   True        False         The hosted control plane is available
      
      [root@bastion rackm04-hcp]# ./hcp destroy cluster agent --name testcluster-destroy --namespace testcluster-destroy --infra-id testcluster-destroy
      2024-12-30T00:53:16-05:00	INFO	Found hosted cluster	{"namespace": "testcluster-destroy", "name": "testcluster-destroy"}
      2024-12-30T00:53:16-05:00	INFO	Marking cleanup of cloud resources for hosted cluster	{"namespace": "testcluster-destroy", "name": "testcluster-destroy"}
      2024-12-30T00:53:16-05:00	INFO	Updated hosted cluster	{"namespace": "testcluster-destroy", "name": "testcluster-destroy"}
      2024-12-30T00:53:16-05:00	INFO	Deleting hosted cluster	{"namespace": "testcluster-destroy", "name": "testcluster-destroy"}
      2024-12-30T01:03:16-05:00	ERROR	Failed to get hosted cluster	{"namespace": "testcluster-destroy", "name": "testcluster-destroy", "error": "client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline"}github.com/openshift/hypershift/cmd/cluster/core.waitForClusterDeletion.func1	/remote-source/app/cmd/cluster/core/destroy.go:264k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func2	/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/wait/loop.go:87k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext	/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/wait/loop.go:88k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel	/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/wait/poll.go:33github.com/openshift/hypershift/cmd/cluster/core.waitForClusterDeletion	/remote-source/app/cmd/cluster/core/destroy.go:259github.com/openshift/hypershift/cmd/cluster/core.DestroyCluster	/remote-source/app/cmd/cluster/core/destroy.go:152github.com/openshift/hypershift/cmd/cluster/none.DestroyCluster	/remote-source/app/cmd/cluster/none/destroy.go:48github.com/openshift/hypershift/cmd/cluster/agent.DestroyCluster	/remote-source/app/cmd/cluster/agent/destroy.go:41github.com/openshift/hypershift/product-cli/cmd/cluster.NewDestroyCommands.NewDestroyCommand.func1	/remote-source/app/product-cli/cmd/cluster/agent/destroy.go:19github.com/spf13/cobra.(*Command).execute	/remote-source/app/vendor/github.com/spf13/cobra/command.go:983github.com/spf13/cobra.(*Command).ExecuteC	/remote-source/app/vendor/github.com/spf13/cobra/command.go:1115github.com/spf13/cobra.(*Command).Execute	/remote-source/app/vendor/github.com/spf13/cobra/command.go:1039github.com/spf13/cobra.(*Command).ExecuteContext	/remote-source/app/vendor/github.com/spf13/cobra/command.go:1032main.main	/remote-source/app/product-cli/main.go:59runtime.main	/usr/lib/golang/src/runtime/proc.go:271
      
      2024-12-30T01:03:16-05:00	ERROR	HostedCluster deletion failed	{"namespace": "testcluster-destroy", "name": "testcluster-destroy", "error": "context deadline exceeded"}github.com/openshift/hypershift/cmd/cluster/core.waitForClusterDeletion	/remote-source/app/cmd/cluster/core/destroy.go:280github.com/openshift/hypershift/cmd/cluster/core.DestroyCluster	/remote-source/app/cmd/cluster/core/destroy.go:152github.com/openshift/hypershift/cmd/cluster/none.DestroyCluster	/remote-source/app/cmd/cluster/none/destroy.go:48github.com/openshift/hypershift/cmd/cluster/agent.DestroyCluster	/remote-source/app/cmd/cluster/agent/destroy.go:41github.com/openshift/hypershift/product-cli/cmd/cluster.NewDestroyCommands.NewDestroyCommand.func1	/remote-source/app/product-cli/cmd/cluster/agent/destroy.go:19github.com/spf13/cobra.(*Command).execute	/remote-source/app/vendor/github.com/spf13/cobra/command.go:983github.com/spf13/cobra.(*Command).ExecuteC	/remote-source/app/vendor/github.com/spf13/cobra/command.go:1115github.com/spf13/cobra.(*Command).Execute	/remote-source/app/vendor/github.com/spf13/cobra/command.go:1039github.com/spf13/cobra.(*Command).ExecuteContext	/remote-source/app/vendor/github.com/spf13/cobra/command.go:1032main.main	/remote-source/app/product-cli/main.go:59runtime.main	/usr/lib/golang/src/runtime/proc.go:271
      
      2024-12-30T01:03:16-05:00	ERROR	Failed to destroy cluster	{"error": "context deadline exceeded"}github.com/openshift/hypershift/product-cli/cmd/cluster.NewDestroyCommands.NewDestroyCommand.func1	/remote-source/app/product-cli/cmd/cluster/agent/destroy.go:20github.com/spf13/cobra.(*Command).execute	/remote-source/app/vendor/github.com/spf13/cobra/command.go:983github.com/spf13/cobra.(*Command).ExecuteC	/remote-source/app/vendor/github.com/spf13/cobra/command.go:1115github.com/spf13/cobra.(*Command).Execute	/remote-source/app/vendor/github.com/spf13/cobra/command.go:1039github.com/spf13/cobra.(*Command).ExecuteContext	/remote-source/app/vendor/github.com/spf13/cobra/command.go:1032main.main	/remote-source/app/product-cli/main.go:59runtime.main	/usr/lib/golang/src/runtime/proc.go:271
      Error: context deadline exceededcontext deadline exceeded    

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

          

      How reproducible:

          

      Steps to Reproduce:

          1. deploy HCP cluster (agent) from Hub cluster
          2. destroy cluster using HCP cli
          3. Check cli version
          

      Actual results:

      On Hub UI cluster remains in destroying state    

      Expected results:

      CLuster to be deleted completely    

      Additional info:

          

              cchun@redhat.com Crystal Chun
              rhn-support-chdeshpa Chinmay Deshpande
              Liangquan Li Liangquan Li
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: