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

[release-4.10] Add required parameter --credentials-requests-dir for ccoctl gcp delete

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 4.10
    • None
    • False
    • Hide

      None

      Show
      None
    • Hide
      [id="ocp-4-YY-ZZ-notable-technical-changes"]
      ==== Notable Technical Changes

      * With this release, when you xref:../installing/installing_gcp/uninstalling-cluster-gcp.adoc#cco-ccoctl-deleting-sts-resources_uninstalling-cluster-gcp[delete GCP resources with the Cloud Credential Operator utility], you must specify the directory containing the files for the component `CredentialsRequest` objects.
      Show
      [id="ocp-4-YY-ZZ-notable-technical-changes"] ==== Notable Technical Changes * With this release, when you xref:../installing/installing_gcp/uninstalling-cluster-gcp.adoc#cco-ccoctl-deleting-sts-resources_uninstalling-cluster-gcp[delete GCP resources with the Cloud Credential Operator utility], you must specify the directory containing the files for the component `CredentialsRequest` objects.
    • Unspecified Release Note Type - Unknown

      In order to delete the correct GCP cloud resources, the "--credentials-requests-dir" parameter must be passed to "ccoctl gcp delete". This was fixed for 4.12 as part of https://github.com/openshift/cloud-credential-operator/pull/489 but must be backported for previous releases. See https://github.com/openshift/cloud-credential-operator/pull/489#issuecomment-1248733205 for discussion regarding this bug.

      To reproduce, create GCP infrastructure with a name parameter that is a subset of another set of GCP infrastructure's name parameter. I will "ccoctl gcp create all" with "name=abutcher-gcp" and "name=abutcher-gcp1".

      $ ./ccoctl gcp create-all \
      --name=abutcher-gcp \
      --region=us-central1 \
      --project=openshift-hive-dev \
      --credentials-requests-dir=./credrequests
      
      $ ./ccoctl gcp create-all \
      --name=abutcher-gcp1 \
      --region=us-central1 \
      --project=openshift-hive-dev \
      --credentials-requests-dir=./credrequests
      

      Running "ccoctl gcp delete --name=abutcher-gcp" will result in GCP infrastructure for both "abutcher-gcp" and "abutcher-gcp1" being deleted. 

      $ ./ccoctl gcp delete --name abutcher-gcp --project openshift-hive-dev
      2022/10/24 11:30:06 Credentials loaded from file "/home/abutcher/.gcp/osServiceAccount.json"
      2022/10/24 11:30:06 Deleted object .well-known/openid-configuration from bucket abutcher-gcp-oidc
      2022/10/24 11:30:07 Deleted object keys.json from bucket abutcher-gcp-oidc
      2022/10/24 11:30:07 OIDC bucket abutcher-gcp-oidc deleted
      2022/10/24 11:30:09 IAM Service account abutcher-gcp-openshift-image-registry-gcs deleted
      2022/10/24 11:30:10 IAM Service account abutcher-gcp-openshift-gcp-ccm deleted
      2022/10/24 11:30:11 IAM Service account abutcher-gcp1-openshift-cloud-network-config-controller-gcp deleted
      2022/10/24 11:30:12 IAM Service account abutcher-gcp-openshift-machine-api-gcp deleted
      2022/10/24 11:30:13 IAM Service account abutcher-gcp-openshift-ingress-gcp deleted
      2022/10/24 11:30:15 IAM Service account abutcher-gcp-openshift-gcp-pd-csi-driver-operator deleted
      2022/10/24 11:30:16 IAM Service account abutcher-gcp1-openshift-ingress-gcp deleted
      2022/10/24 11:30:17 IAM Service account abutcher-gcp1-openshift-image-registry-gcs deleted
      2022/10/24 11:30:19 IAM Service account abutcher-gcp-cloud-credential-operator-gcp-ro-creds deleted
      2022/10/24 11:30:20 IAM Service account abutcher-gcp1-openshift-gcp-pd-csi-driver-operator deleted
      2022/10/24 11:30:21 IAM Service account abutcher-gcp1-openshift-gcp-ccm deleted
      2022/10/24 11:30:22 IAM Service account abutcher-gcp1-cloud-credential-operator-gcp-ro-creds deleted
      2022/10/24 11:30:24 IAM Service account abutcher-gcp1-openshift-machine-api-gcp deleted
      2022/10/24 11:30:25 IAM Service account abutcher-gcp-openshift-cloud-network-config-controller-gcp deleted
      2022/10/24 11:30:25 Workload identity pool abutcher-gcp deleted

       

            abutcher@redhat.com Andrew Butcher
            abutcher@redhat.com Andrew Butcher
            Mingxia Huang Mingxia Huang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: