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

When deleting private cluster backend-service is not getting removed

XMLWordPrintable

    • Moderate
    • No
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • Done

      After successfully creating a private cluster and then deleting it via the command

      openshift-install destroy cluster --dir ./cluster-manifests --log-level debug
      

      We can see that the command never completes as the backend-service is not deleted, so the instance-group deletions fails with:

      DEBUG Deleting instance group bfournie-capg-test-pzjd9-master-us-east1-b in zone us-east1-b 
      DEBUG failed to delete instance group bfournie-capg-test-pzjd9-master-us-east1-b in zone us-east1-b: googleapi: Error 400: The instance_group resource 'projects/openshift-dev-installer/zones/us-east1-b/instanceGroups/bfournie-capg-test-pzjd9-master-us-east1-b' is already being used by 'projects/openshift-dev-installer/regions/us-east1/backendServices/a44b2184b9a324f22a0b1c9b27f077fe', resourceInUseByAnotherResource 
      DEBUG Deleting instance group bfournie-capg-test-pzjd9-master-us-east1-c in zone us-east1-c 
      DEBUG failed to delete instance group bfournie-capg-test-pzjd9-master-us-east1-c in zone us-east1-c: googleapi: Error 400: The instance_group resource 'projects/openshift-dev-installer/zones/us-east1-c/instanceGroups/bfournie-capg-test-pzjd9-master-us-east1-c' is already being used by 'projects/openshift-dev-installer/regions/us-east1/backendServices/a44b2184b9a324f22a0b1c9b27f077fe', resourceInUseByAnotherResource 
      DEBUG Deleting instance group k8s-ig--9b7447a6bde23e2d in zone us-east1-d 
      DEBUG failed to delete instance group k8s-ig--9b7447a6bde23e2d in zone us-east1-d: googleapi: Error 400: The instance_group resource 'projects/openshift-dev-installer/zones/us-east1-d/instanceGroups/k8s-ig--9b7447a6bde23e2d' is already being used by 'projects/openshift-dev-installer/regions/us-east1/backendServices/a44b2184b9a324f22a0b1c9b27f077fe', resourceInUseByAnotherResource 
      DEBUG Deleting instance group k8s-ig--9b7447a6bde23e2d in zone us-east1-b 
      DEBUG failed to delete instance group k8s-ig--9b7447a6bde23e2d in zone us-east1-b: googleapi: Error 400: The instance_group resource 'projects/openshift-dev-installer/zones/us-east1-b/instanceGroups/k8s-ig--9b7447a6bde23e2d' is already being used by 'projects/openshift-dev-installer/regions/us-east1/backendServices/a44b2184b9a324f22a0b1c9b27f077fe', resourceInUseByAnotherResource 
      DEBUG Deleting instance group k8s-ig--9b7447a6bde23e2d in zone us-east1-c 
      DEBUG failed to delete instance group k8s-ig--9b7447a6bde23e2d in zone us-east1-c: googleapi: Error 400: The instance_group resource 'projects/openshift-dev-installer/zones/us-east1-c/instanceGroups/k8s-ig--9b7447a6bde23e2d' is already being used by 'projects/openshift-dev-installer/regions/us-east1/backendServices/a44b2184b9a324f22a0b1c9b27f077fe', resourceInUseByAnotherResource 
      DEBUG Deleting instance group bfournie-capg-test-pzjd9-master-us-east1-d in zone us-east1-d 
      DEBUG failed to delete instance group bfournie-capg-test-pzjd9-master-us-east1-d in zone us-east1-d: googleapi: Error 400: The instance_group resource 'projects/openshift-dev-installer/zones/us-east1-d/instanceGroups/bfournie-capg-test-pzjd9-master-us-east1-d' is already being used by 'projects/openshift-dev-installer/regions/us-east1/backendServices/a44b2184b9a324f22a0b1c9b27f077fe', resourceInUseByAnotherResource 
      DEBUG Instance groups: 6 items pending             
      

      In this case the private cluster was created by letting GCP create the networks, not pre-created. The test also uses this PR https://github.com/kubernetes-sigs/cluster-api-provider-gcp/pull/1266 to create a separate instance-group for the bootstrap VM, its unclear if that PR is contributing to the problem.

      This is the backend-service that was not deleted, it wasn't created by the installerbut by the ingress operator.

      $ gcloud compute backend-services describe https://www.googleapis.com/compute/v1/projects/openshift-dev-installer/regions/us-east1/backendServices/a44b2184b9a324f22a0b1c9b27f077fe
      backends:
      - balancingMode: CONNECTION
        group: https://www.googleapis.com/compute/v1/projects/openshift-dev-installer/zones/us-east1-b/instanceGroups/bfournie-capg-test-pzjd9-master-us-east1-b
      - balancingMode: CONNECTION
        group: https://www.googleapis.com/compute/v1/projects/openshift-dev-installer/zones/us-east1-c/instanceGroups/bfournie-capg-test-pzjd9-master-us-east1-c
      - balancingMode: CONNECTION
        group: https://www.googleapis.com/compute/v1/projects/openshift-dev-installer/zones/us-east1-d/instanceGroups/bfournie-capg-test-pzjd9-master-us-east1-d
      - balancingMode: CONNECTION
        group: https://www.googleapis.com/compute/v1/projects/openshift-dev-installer/zones/us-east1-b/instanceGroups/k8s-ig--9b7447a6bde23e2d
      - balancingMode: CONNECTION
        group: https://www.googleapis.com/compute/v1/projects/openshift-dev-installer/zones/us-east1-c/instanceGroups/k8s-ig--9b7447a6bde23e2d
      - balancingMode: CONNECTION
        group: https://www.googleapis.com/compute/v1/projects/openshift-dev-installer/zones/us-east1-d/instanceGroups/k8s-ig--9b7447a6bde23e2d
      connectionDraining:
        drainingTimeoutSec: 0
      creationTimestamp: '2024-07-09T04:58:09.511-07:00'
      description: '{"kubernetes.io/service-name":"openshift-ingress/router-default"}'
      fingerprint: OJFBlINdWDw=
      healthChecks:
      - https://www.googleapis.com/compute/v1/projects/openshift-dev-installer/global/healthChecks/a44b2184b9a324f22a0b1c9b27f077fe
      id: '4649049067305868094'
      kind: compute#backendService
      loadBalancingScheme: INTERNAL
      name: a44b2184b9a324f22a0b1c9b27f077fe
      protocol: TCP
      region: https://www.googleapis.com/compute/v1/projects/openshift-dev-installer/regions/us-east1
      selfLink: https://www.googleapis.com/compute/v1/projects/openshift-dev-installer/regions/us-east1/backendServices/a44b2184b9a324f22a0b1c9b27f077fe
      sessionAffinity: NONE
      timeoutSec: 30
      

              rh-ee-bbarbach Brent Barbachem
              bfournie@redhat.com Robert Fournier
              Gaoyun Pei Gaoyun Pei
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: