-
Bug
-
Resolution: Done
-
Major
-
None
-
False
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
It looks like backend_apis table trigger to set the tenant_id is incorrect. As reported by a customer, the tenant_id is always NULL
This also applies to log_entries and alerts tables.
Creating a backend_api then checking if the object was there, the API returned a 403 instead of a 200 because of this check
# Backend Create curl -v -X POST "https://3scale-admin.$OCP_DOMAIN/admin/api/backend_apis.json" -d "access_token=${ACCESS_TOKEN}&name=test-deletion-backend&system_name=test-deletion-backend&description=test-deletion-backend&private_endpoint=https%3A%2F%2Fdymmy-endpoint" # Object deletion status for objects that are deleted asynchronously curl -v -X GET "https://3scale-admin.$OCP_DOMAIN/admin/api/objects/status.json?access_token=${ACCESS_TOKEN}&object_type=backend_api&object_id=9" => status code: 403 # Backend Delete curl -v -X DELETE "https://3scale-admin.$OCP_DOMAIN/admin/api/backend_apis/9.json" -d "access_token=${ACCESS_TOKEN}" # Object deletion status for objects that are deleted asynchronously curl -v -X GET "https://3scale-admin.$OCP_DOMAIN/admin/api/objects/status.json?access_token=${ACCESS_TOKEN}&object_type=backend_api&object_id=9" => status code: 404
Dev Notes
The triggers in cause:
The investigation leads to the below query is always returning empty record, as by default, the field master in the accounts table is NULL
SELECT tenant_id FROM accounts WHERE NOT master
Solution:
1. quick work-around: when creating a provider, set the field master to false. Then fix the field in the database setting it to false when it is NULL.
2. programatically set the tenant_id for those models instead of relying on the trigger. The trigger is noop in case tenant_id is set anyway.
- is blocked by
-
THREESCALE-11198 Upgrade to sidekiq 7.3
- To Test (QE)
- is related to
-
THREESCALE-10714 Fix tenant_id data
- Developing
- mentioned on