While attempting to update tenant configuration to reduce retention for some indices using Jarvis API as below for example (to reduce retention to 2 days for metrics_uim and 30 days for metrics_anomaly)
PATCH /onbaarding/tenants updatenant
{
"tenant_id": "<yourtenant>-USERSTORE",
"product_id": "ao",
"ldds": {
"product_admin_role_name": "PA",
"admin_role_name": "TA",
"ana": "oauth",
"user_role_name": "OA"
},
"tenant_doc_type_details": [
{
"doc_type_id": "itoa_metrics_uim",
"doc_type_version": "1",
"retention_period": 2
},
{
"doc_type_id": "itoa_metrics_anomaly",
"doc_type_version": "1",
"retention_period": 30
}
],
"retention_period": 45
}
the operation failed with ERROR Code 500 and below message:
{ "_message" : "Update of Tenant in LDDS failed, please contact administrator. LDDS error with response code: 404, response: {\"data\":\"Product with the productId ao does not exist\"}", "_code":"1846"|
CA DIGITAL OPERATIONAL INTELLIGENCE - 1.3.2
Troubleshooting done to identify the root cause:
1. Verify that ldds-web is running and volumes have configured correctly
Go to openshift console, Applications, pods
Open ldds-web pod
2. Verify in Jarvis that product “ao” is onboarded in ldds:
Go to openshift console, Applications, Routes
Open Jarvis Endpoint
Click “GET” /onboarding/products getProduct
Click “Try it out”
Click “Execute”
Result = CORRECT
3. Verify CouchDB (this is the database for ldds)
Go to openshift console, Applications, pods
Open couchdb pod
a) Check that pod is running and volumes have been configured correctly
Result = CORRECT
b) Check that “ao” product exist the database
Open terminal, query all documents and verify if product “ao” exist
curl -X GET http://127.0.0.1:5984/product/_all_docs
curl -X GET http://127.0.0.1:5984/product/<id>
Result = INCORRECT, there is not entry for product “ao”
Conclusion:
“ao” product is onboarded on ldds but somehow that product got removed from couchDB, the expected results is an “ao” entry as below:
Delete incorrect records from Jarvis_metada and PATCH product and tenant information again
IMPORTANT:
jarvis_meatdata is main metadata storage for Jarvis. It is strongly recommended to perform and validate below steps in a DX OI test environment.
If only Production environment is available please contact Broadcom Support to get assistance from Jarvis Development team.
Step # 1: Take a backup of current product and tenant configuration details
Go to Jarvis endpoint
Go to Openshift console, Applications, Routes
Open Jarvis Endpoint
a) Get product list information:
Click “GET” /onboarding/products getProduct
Click “Try it out”, Execute
Save the “Response Body” temporarily in your “backup notes”
b)
Click “GET” /onboarding/tenants(product_id=’{product_id}’) Get all Tenants Details
Click “Try it out”
set “product_id” = ao
Click Execute
Save the “Response Body” temporarily in your “backup notes”
Step # 2: Deleted records in Jarvis_metadata specific to the “ao” product and problematic tenant that are having ldds configurations problems.
a) Query jarvis_metadata to identify product entry to remove:
{es_endpoint}/jarvis_metadata/_search?pretty&q=md_type:"product_info"
In this example, the entry to delete is “_id”= “ao_1”
Open SOAP UI and perform the DELETE operation:
DELETE {es_endpoint}/jarvis_metadata/md/ao_1
{es_endpoint}/jarvis_metadata/_search?pretty&q=md_type:"tenant_info"
In this example, the entry to delete is “_id”= “ao_<tenant-name>-USERSTORE_1”
Open SOAP UI and perform the DELETE operation:
DELETE {es_endpoint}/jarvis_metadata/md/ao_<tenant-name>-USERSTORE_1
Step # 3: PATCH the deleted product and tenant again, this step will add this product and tenant in the ldds database.
a) PATCH Product
Click PATCH /onboarding/product upateProduct
Click “Try it out”
From your “backup notes”, copy and paste ONLY the ldds section from your notes, as highlighted below
In Jarvis UI:
Click "Execute
Validate that new entry exist in
-jarvis_metadata
{es_endpoint}/jarvis_metadata/_search?pretty&q=md_type:"product_info"
-and Jarvis API:
Click “GET” /onboarding/products getProduct
b) PATCH Tenant
Click PATCH /onboarding/tenants upateTenant
Click “Try it out”
From your “backup notes”, copy and paste include ONLY the section for the affected tenant
Remove “creation_time” entry
As below:
Click "Execute
Validate that new entry exist :
-jarvis_metadata
{es_endpoint}/jarvis_metadata/_search?pretty&q=md_type:"tenant_info"
-and Jarvis API:
Click “GET” /onboarding/tenants(product_id=’{product_id}’) Get all Tenants Details
Click “Try it out”
set “product_id” = ao
Click Execute