Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-11121

Changing backendUsage unexpectedly results in a path already taken error

XMLWordPrintable

    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Hide
      • Delete the Backend Usage 

        • DELETE /admin/api/services/{service_id}/backend_usages/{id}.json
      • Run the toolbox command

      This must be done for every product update using the toolbox.

      Show
      Delete the Backend Usage  DELETE /admin/api/services/{service_id}/backend_usages/{id}.json Run the toolbox command This must be done for every product update using the toolbox.
    • Hide
      1. Download the attached `product-api-test.yaml`
      2. Import using the toolbox
        1. `3scale product import -f product-api-test.yaml <remote>`
      3. Download the attached `product-api.yaml`
        1. (the only difference is the backend name in the respective locations)
      4. Import using the toolbox
        1. `3scale product import -f product-api.yaml <remote>`
      5. Observe Error
      Show
      Download the attached `product-api-test.yaml` Import using the toolbox `3scale product import -f product-api-test.yaml <remote>` Download the attached `product-api.yaml` (the only difference is the backend name in the respective locations) Import using the toolbox `3scale product import -f product-api.yaml <remote>` Observe Error

      When using the 3scale toolbox to import a product via Product CRD the backends are automatically created and linked to the product.

      The design of the `3scale product import` command is that it is meant to allow modifications to the existing product.yaml and reimport to apply the changes.

      However, when changing the product.yaml definition to use a new backend but the same path the expected result is that it will create the new backend (if needed) and change the existing backend usage to use the new backend.

       

      Instead, it will result in an error:

       

      {
        "code": "E_3SCALE_API",
        "message": "Backend usage has not been created. Errors: {\"path\"=>[\"This path is already taken. Specify a different path.\"]}",
        "class": "ThreeScaleToolbox::ThreeScaleApiError"
      }

       

      It appear that this happens because the existing backend usage is not cleared first. 

        1. product-api.yaml
          1 kB
          Shannon Poole
        2. product-api-test.yaml
          1 kB
          Shannon Poole

              Unassigned Unassigned
              rhn-support-spoole Shannon Poole
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: