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

APIcast using stale configuration for a deleted Product

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 2.14.2
    • Gateway
    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Workaround Exists
    • Hide

      To bypass this behavior, after deleting the Product it's necessary to redeploy the APIcast pod to have its cache cleared. This does not mitigate the issue and only serves to resolve it after the fact.

      Show
      To bypass this behavior, after deleting the Product it's necessary to redeploy the APIcast pod to have its cache cleared. This does not mitigate the issue and only serves to resolve it after the fact.
    • Hide
      • Configure a new Product through Admin Portal
      • Test this new Product and monitor the behavior in APIcast log
      • Delete this new Product
      • Repeat the API call for the deleted Product and monitor the behavior in APIcast log
      Show
      Configure a new Product through Admin Portal Test this new Product and monitor the behavior in APIcast log Delete this new Product Repeat the API call for the deleted Product and monitor the behavior in APIcast log

      Current behaviour

      After deleting the Product via the Admin Portal, the response from the gateway is not as expected.

      Even after APIcast reloads the configuration it is still observed that the gateway is using the stale configuration for the Product that no longer exists:

      2023/09/05 21:57:03 [info] 22#22: *110 configuration_store.lua:132: store(): added service 2 configuration with hosts: api-3scale-apicast-production.<wildcard_domain>, api-3scale-apicast-staging.<wildcard_domain> ttl: 60, requestID=653ddcb6da3e00f60a31dbdd93214e08, client: 10.131.0.2, server: _, request: "GET /status/402?user_key=xxxxxxxxxxxxx HTTP/1.1", host: "apicast-production-op-3scale-apicast.<wildcard_domain>"
      2023/09/05 21:57:03 [info] 22#22: *110 configuration_store.lua:132: store(): added service 3 configuration with hosts: apicast2-production-op-3scale-apicast.<wildcard_domain>, apicast2-staging-op-3scale-apicast.<wildcard_domain> ttl: 60, requestID=653ddcb6da3e00f60a31dbdd93214e08, client: 10.131.0.2, server: _, request: "GET /status/402?user_key=xxxxxxxxxxxxx HTTP/1.1", host: "apicast-production-op-3scale-apicast.<wildcard_domain>"
      2023/09/05 21:57:03 [info] 22#22: *110 configuration_store.lua:132: store(): added service 4 configuration with hosts: apicast2-production-op-3scale-apicast.<wildcard_domain>, apicast2-staging-op-3scale-apicast.<wildcard_domain> ttl: 60, requestID=653ddcb6da3e00f60a31dbdd93214e08, client: 10.131.0.2, server: _, request: "GET /status/402?user_key=xxxxxxxxxxxxx HTTP/1.1", host: "apicast-production-op-3scale-apicast.<wildcard_domain>"
      2023/09/05 21:57:03 [debug] 22#22: *110 policy_chain.lua:214: rewrite(): policy chain execute phase: rewrite, policy: Find Service Policy, i: 2, requestID=653ddcb6da3e00f60a31dbdd93214e08
      2023/09/05 21:57:03 [info] 22#22: *110 configuration_store.lua:96: find_by_host(): using stale configuration for host apicast-production-op-3scale-apicast.<wildcard_domain>, requestID=653ddcb6da3e00f60a31dbdd93214e08, client: 10.131.0.2, server: _, request: "GET /status/402?user_key=xxxxxxxxxxxxx HTTP/1.1", host: "apicast-production-op-3scale-apicast.<wildcard_domain>"                                                                      
      2023/09/05 21:57:03 [debug] 22#22: *110 path_based_finder.lua:20: find_service(): service httpbin_api_402 matched host apicast-production-op-3scale-apicast.<wildcard_domain>, requestID=653ddcb6da3e00f60a31dbdd93214e08
      2023/09/05 21:57:03 [debug] 22#22: *110 find_service.lua:43: Using service id=16, requestID=653ddcb6da3e00f60a31dbdd93214e08
      .
      .
      .
      2023/09/05 21:57:03 [info] 22#22: *110 backend_client.lua:133: call_backend_transaction(): backend client uri: https://backend-3scale.<wildcard_domain>/transactions/authrep.xml?service_id=16&service_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&usage%5Bstatus_402_method%5D=1&user_key=xxxxxxxxxxxxx ok: true status: 404 body:  error: nil, requestID=653ddcb6da3e00f60a31dbdd93214e08, client: 10.131.0.2, server: _, request: "GET /status/402?user_key=xxxxxxxxxxxxx HTTP/1.1", host: "apicast-production-op-3scale-apicast.<wildcard_domain>"
      2023/09/05 21:57:03 [debug] 22#22: *110 proxy.lua:381: handle_backend_response(): [backend] response status: 404 body: , requestID=653ddcb6da3e00f60a31dbdd93214e08 2023/09/05 21:57:03 [notice] 22#22: *110 cache_handler.lua:47: cache_handler(): apicast cache delete key: 16:xxxxxxxxxxxxx:usage%5Bstatus_402_method%5D=1 cause status 404, requestID=653ddcb6da3e00f60a31dbdd93214e08, client: 10.131.0.2, server: _, request: "GET /status/402?user_key=xxxxxxxxxxxxx HTTP/1.1", host: "apicast-production-op-3scale-apicast.<wildcard_domain>" 2023/09/05 21:57:03 [info] 22#22: *110 errors.lua:17: authorization failed for service 16, requestID=653ddcb6da3e00f60a31dbdd93214e08, client: 10.131.0.2, server: _, request: "GET /status/402?user_key=xxxxxxxxxxxxx HTTP/1.1", host: "apicast-production-op-3scale-apicast.<wildcard_domain>" 
      .
      .
      .

      Expected behaviour

      The expected behavior is the API call (to APIcast) returns a response code 404 instead of 403 as the Product no longer exists.
       

       

       

            Unassigned Unassigned
            rhn-support-keprice Kevin Price
            An Tran An Tran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: