From ec23ebc9381481a856c8d4a231c4ab781189748c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Mon, 25 Jan 2021 12:28:09 +0100 Subject: [PATCH 1/2] ADD missing geoloc and expiration indexes to Orion service provision --- ChangeLog | 2 ++ src/orchestrator/core/mongo.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index ec71e150..c703623e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ CHANGES ======= +FIX: create geo-index in Orion DB upon service provision (#301) +FIX: cratee expiration index in Orion DB upon service provision Upgrade Dockerfile base image from centos7.7.1908 to centos7.9.2009 3.7.0 diff --git a/src/orchestrator/core/mongo.py b/src/orchestrator/core/mongo.py index b509ffab..6c4bbb15 100644 --- a/src/orchestrator/core/mongo.py +++ b/src/orchestrator/core/mongo.py @@ -52,6 +52,8 @@ def createOrionIndexes(self, SERVICE_NAME): # For Orion databaseName = 'orion-' + SERVICE_NAME db = self.client[databaseName] + db.entities.create_index([("location.coords", pymongo.GEOSPHERE)]) + db.entities.create_index("expDate", expireAfterSeconds=0) db.entities.create_index([("_id.servicePath", pymongo.ASCENDING), ("_id.id", pymongo.ASCENDING), ("_id.type", pymongo.ASCENDING)]) From 073b596ac2f48d4a28d5c7be5ec2a9fd562d308b Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Mon, 25 Jan 2021 12:30:53 +0100 Subject: [PATCH 2/2] Update ChangeLog --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c703623e..d0fffbe6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,7 @@ CHANGES ======= FIX: create geo-index in Orion DB upon service provision (#301) -FIX: cratee expiration index in Orion DB upon service provision +FIX: create expiration index in Orion DB upon service provision Upgrade Dockerfile base image from centos7.7.1908 to centos7.9.2009 3.7.0