-
Notifications
You must be signed in to change notification settings - Fork 265
Description
Bug description
"We are running two Orion Context Broker pods in a Kubernetes cluster with a multi-tenant setup, backed by approximately 40 MongoDB databases. We are observing tenant data pollution: a small percentage of ingested NGSIv2 entities are being persisted in an incorrect tenant's database, though the default tenant database remains empty."
- Orion version: 2.6.1 (this can be got with
GET /versionin the API port or usingcontextBroker --version)
"orion": {
"version": "2.6.1",
"uptime": "0 d, 0 h, 17 m, 20 s",
"git_hash": "ec20c8bcfd883d6d7214a28818c8310fb179bbcf",
"compile_time": "Tue Mar 30 11:43:48 UTC 2021",
"compiled_by": "root",
"compiled_in": "06ed7e03551a",
"release_date": "Tue Mar 30 11:43:48 UTC 2021",
"doc": "https://fiware-orion.rtfd.io/en/2.6.1/",
"libversions": {
"boost": "1_53",
"libcurl": "libcurl/7.29.0 NSS/3.53.1 zlib/1.2.7 libidn/1.28 libssh2/1.8.0",
"libmicrohttpd": "0.9.70",
"openssl": "1.0.2k",
"rapidjson": "1.1.0",
"mongodriver": "legacy-1.1.2"
}
} - MongoDB version 4.2.7
- Env variables or CLI parameters
"orion": {
"log_level": "WARN",
"mongo": {
"auth": {
"source": "admin"
},
"pool_size": "400",
"db": "",
"password": "",
"user": "gip_orion_p",
"replica_set": "repset_iot1_prod",
"host": "mongo1:27017,mongo2:27017,mongo3:27017"
},
"notif": {
"mode": "threadpool:10:200"
},
"stat": {
"notif_queue": "TRUE",
"counters": "TRUE"
},
"http_timeout": "3000",
"trq_pool_size": "400",
"ngsiv1_autocast": "TRUE",
"multi_service": "TRUE",
"foreground": "TRUE",
"port": "80"
}
} - Operating System or Docker Image used: we deployed 2 K8s pods for this old Orion version
How to reproduce it
HTTP POST to https://orion-app1.city.be/v2/op/update + tenantId as a http header eg. tenantId:city_awv
Body:
{
"actionType": "APPEND",
"entities": [
{
"id": "Vehicle:PoppyCar:595419bb-1d06-544e-bad3-ce278c8d61fc",
"type": "Vehicle",
"dataProvider": {
"type": "URL",
"value": "https://poppy.be"
}
},
{
"id": "Vehicle:PoppyCar:b3503e54-e26d-54d8-9f32-70cf49f93118",
"type": "Vehicle",
"dataProvider": {
"type": "URL",
"value": "https://poppy.be"
}
}
]
}
Expected behavior
No tenant pollution, all NGSIv2 entities are stored into the right MongoDB as explicitly mentioned with the tenantId header in the HTTP POST .../v2/op/update
?
Additional information
We will upgrade to the leatest greates Orion version 4.2, but will this solve the tenant pollution issue? Many Thanks!