Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-362

google compute sometimes wrongly infers project-id from identity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.2
    • 1.7.0
    • jclouds-labs-google
    • None
    • any

    Description

      the GoogleComputeEngineHttpApiModule assumes the project ID is the portion before the @ in the identity. increasingly the identify is of the form project_id-extended_uid@..., so the API attempts to look up e.g.:

      https://www.googleapis.com/compute/v1beta15/projects/590421487899-sd961cg1an7gc20cpu4fb3hi2l0iu1qv

      instead of

      https://www.googleapis.com/compute/v1beta15/projects/590421487899

      and gets a 400 Bad Request; content:

      [{
      "error": {
      "errors": [
      {
      "domain": "global",
      "reason": "invalidParameter",
      "message": "Invalid value '590421487899-sd961cg1an7gc20cpu4fb3hi2l0iu1qv'. Values must match the following regular expression: '(??:[-a-z0-9]

      {1,63}


      .)*(?:[a-z](?:[-a-z0-9]

      {0,61}[a-z0-9])?)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}

      [a-z0-9])?))'",
      "locationType": "parameter",
      "location": "project"
      }
      }]

      this is an easy fix in GoogleComputeEngineHttpApiModule to also split on "-" which i will submit shortly

      Attachments

        1. JCLOUDS-362.patch
          3 kB
          Andrew Phillips
        2. JCLOUDS-362-1.6.x.patch
          3 kB
          Andrew Phillips

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alex.heneveld Alex Heneveld
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: