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

zone/projectID field in gcpProviderspec allows invalid value

XMLWordPrintable

    • Important
    • No
    • CLOUD Sprint 265
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      Cause: GCP updated their zone API error message to provide more granularity.
      Consequence: The machine controller mistakenly marked the machine as valid with a temporary cloud error instead of recognizing it as an invalid machine configuration error, preventing the invalid machine from transitioning to a failed state.
      Fix: The machine controller was updated to handle the new error messages correctly.
      Result: Machines with an invalid zone or projectID now correctly transition to a failed state again.
      Show
      Cause: GCP updated their zone API error message to provide more granularity. Consequence: The machine controller mistakenly marked the machine as valid with a temporary cloud error instead of recognizing it as an invalid machine configuration error, preventing the invalid machine from transitioning to a failed state. Fix: The machine controller was updated to handle the new error messages correctly. Result: Machines with an invalid zone or projectID now correctly transition to a failed state again.
    • Bug Fix
    • In Progress

      This is a clone of issue OCPBUGS-47790. The following is the description of the original issue:

      This is a clone of issue OCPBUGS-43531. The following is the description of the original issue:

      Description of problem:

          We can input invalid value to zone field in gcpproviderSpec

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

          4.18.0-0.nightly-2024-10-16-094159

      How reproducible:

          Always

      Steps to Reproduce:

          1.Edit machineset with invalid zone value , scale machineset
         
          

      Actual results:

          Machineset edited successfully 
      
      Machines stuck with blank status and do not fail 
      
      miyadav@miyadav-thinkpadx1carbongen8:~/multifieldsgcp$ oc get machines
      NAME                                 PHASE     TYPE            REGION        ZONE            AGE
      miyadav-1809g-7bdh4-master-0         Running   n2-standard-4   us-central1   us-central1-a   62m
      miyadav-1809g-7bdh4-master-1         Running   n2-standard-4   us-central1   us-central1-b   62m
      miyadav-1809g-7bdh4-master-2         Running   n2-standard-4   us-central1   us-central1-c   62m
      miyadav-1809g-7bdh4-worker-a-9kmdv   Running   n2-standard-4   us-central1   us-central1-a   57m
      miyadav-1809g-7bdh4-worker-b-srj28   Running   n2-standard-4   us-central1   us-central1-b   57m
      miyadav-1809g-7bdh4-worker-c-828v9   Running   n2-standard-4   us-central1   us-central1-c   57m
      miyadav-1809g-7bdh4-worker-f-7d9bx                                                           11m
      miyadav-1809g-7bdh4-worker-f-bcr7v   Running   n2-standard-4   us-central1   us-central1-f   20m
      miyadav-1809g-7bdh4-worker-f-tjfjk                                                           7m3s
      

       

      Expected results:

          machines status can report failed status and the reason , may be timeout instead of waiting continuously .

      Additional info:

          logs are present in machine-controller 
      "E1018 03:55:39.735293       1 controller.go:316] miyadav-1809g-7bdh4-worker-f-7d9bx: failed to check if machine exists: unable to verify project/zone exists: openshift-qe/us-central1-in; err: googleapi: Error 400: Invalid value for field 'zone': 'us-central1-in'. Unknown zone., invalid"
      
      the machines will be stuck in deletion also because of no status.
      
      
      for Invalid ProjectID - Errors in logs - 
      urce project OPENSHIFT-QE.
      Details:
      [
        {
          "@type": "type.googleapis.com/google.rpc.Help",
          "links": [
            {
              "description": "Google developers console",
              "url": "https://console.developers.google.com"
            }
          ]
        },
        {
          "@type": "type.googleapis.com/google.rpc.ErrorInfo",
          "domain": "googleapis.com",
          "metadatas": {
            "consumer": "projects/OPENSHIFT-QE",
            "service": "compute.googleapis.com"
          },
          "reason": "CONSUMER_INVALID"
        }
      ]
      , forbidden
      E1018 08:59:40.405238       1 controller.go:316] "msg"="Reconciler error" "error"="unable to verify project/zone exists: OPENSHIFT-QE/us-central1-f; err: googleapi: Error 403: Permission denied on resource project OPENSHIFT-QE.\nDetails:\n[\n  {\n    \"@type\": \"type.googleapis.com/google.rpc.Help\",\n    \"links\": [\n      {\n        \"description\": \"Google developers console\",\n        \"url\": \"https://console.developers.google.com\"\n      }\n    ]\n  },\n  {\n    \"@type\": \"type.googleapis.com/google.rpc.ErrorInfo\",\n    \"domain\": \"googleapis.com\",\n    \"metadatas\": {\n      \"consumer\": \"projects/OPENSHIFT-QE\",\n      \"service\": \"compute.googleapis.com\"\n    },\n    \"reason\": \"CONSUMER_INVALID\"\n  }\n]\n, forbidden" "controller"="machine-controller" "name"="miyadav-1809g-7bdh4-worker-f-dcnf5" "namespace"="openshift-machine-api" "object"={"name":"miyadav-1809g-7bdh4-worker-f-dcnf5","namespace":"openshift-machine-api"} "reconcileID"="293f9d09-1387-4702-8b67-2d209316585e"
      
      
      

      must-gather- https://drive.google.com/file/d/1N--U8V3EfdEYgQUvK-fcrGxBYRDnzK1G/view?usp=sharing

      ProjectID issue must-gather -https://drive.google.com/file/d/1lKNOu4eVmJJbo23gbieD5uVNtw_qF7p6/view?usp=sharing

       

              rmanak@redhat.com Radek Manak
              openshift-crt-jira-prow OpenShift Prow Bot
              Milind Yadav Milind Yadav
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: