One of our Partners were upgrading VM to kernel linux-rt-4.19.198-21.ph3 from TCA, and are getting below error: "JSNOPATH["repopath"] not found"With GET call to /hybridity/api/infra/k8s/repodetails, we are getting multiple entries for linux-rt-4.19.198-21.ph3 (out of which there are some entries where repopath parameter is not there, need to delete those entries):{
"_id": {
"timestamp": 1670954367,
"counter": 10017222,
"randomValue1": 13422438,
"randomValue2": 24313
},
"name": "dpdk",
"kernel": "linux-rt-4.19.198-21.ph3",
"artifactName": "dpdk",
"artifactVersion": "20.11",
"id": "2a458791-63ed-4ff9-bf4f-aeade7a0c761",
"lastUpdated": "2022-12-13T17:59:27.478+00:00",
"lastUpdateEnterprise": "HybridityAdmin",
"lastUpdateOrganization": "HybridityAdmin",
"lastUpdateUser": "HybridityAdmin",
"creationDate": "2022-12-13T17:59:27.478+00:00",
"creationEnterprise": "HybridityAdmin",
"creationOrganization": "HybridityAdmin",
"creationUser": "HybridityAdmin",
"isDeleted": false
},
{
"_id": {
"timestamp": 1670955298,
"counter": 10017502,
"randomValue1": 13422438,
"randomValue2": 24313
},
"name": "dpdk",
"kernel": "linux-rt-4.19.198-21.ph3",
"artifactName": "dpdk",
"artifactVersion": "20.11",
"repo": "airgap.trainc.com:8043/registry/dpdk:linux-rt-4.19.198-21.ph3",
"id": "5380d934-f2c3-45a1-bffb-dda48fa2ab13",
"lastUpdated": "2022-12-13T1858.225+00:00",
"lastUpdateEnterprise": "HybridityAdmin",
"lastUpdateOrganization": "HybridityAdmin",
"lastUpdateUser": "HybridityAdmin",
"creationDate": "2022-12-13T1858.225+00:00",
"creationEnterprise": "HybridityAdmin",
"creationOrganization": "HybridityAdmin",
"creationUser": "HybridityAdmin",
"isDeleted": false
},
{
"_id": {
"timestamp": 1670956409,
"counter": 10017671,
"randomValue1": 13422438,
"randomValue2": 24313
},
"name": "dpdk",
"kernel": "linux-rt-4.19.198-21.ph3",
"artifactName": "dpdk",
"artifactVersion": "20.11",
"repoFqdn": "airgap.trainc.com:8043",
"repoPath": "registry/dpdk:linux-rt-4.19.198-21.ph3",
"id": "7a77da5b-1b0a-49b8-8c87-ecec91067079",
"lastUpdated": "2022-12-13T1829.447+00:00",
"lastUpdateEnterprise": "HybridityAdmin",
"lastUpdateOrganization": "HybridityAdmin",
"lastUpdateUser": "HybridityAdmin",
"creationDate": "2022-12-13T1829.447+00:00",
"creationEnterprise": "HybridityAdmin",
"creationOrganization": "HybridityAdmin",
"creationUser": "HybridityAdmin",
"isDeleted": false
}
So the procedure to delete entries from TCA databse-
Try this from your TCA-M SSH
mongo hybridity
db.K8sRepoDetails.find({"kernel" : "linux-rt-4.19.198-21.ph3",repoPath:{$exists:false}}).pretty()
This should list only affected repos and nothing else…
2. If it shows up the correct invalid records, you can delete those records by changing the find to remove and removing the pretty part of the same command:
db.K8sRepoDetails.remove({"kernel" : "linux-rt-4.19.198-21.ph3",repoPath:{$exists:false}})
Comments