From b5c4f6de37da45b4193f3c52a43b30d3ba952ea6 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Fri, 16 Sep 2022 15:28:09 +0200 Subject: [PATCH] fix: [mongo] use running mongo container with more accuray Check the exact mount point whereas checking a parent dir allow us to simplify the implementation of ``is_volume_used``. The new implementation to be included in next version of compose is also more solid (it doesn't rely on ``docker inspect`` that can stall execution of the script if a container is stalled). Signed-off-by: Valentin Lab --- mongo/lib/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongo/lib/common b/mongo/lib/common index cf3bf7e5..c1fd9aaa 100644 --- a/mongo/lib/common +++ b/mongo/lib/common @@ -9,7 +9,7 @@ export DATA_DIR=$SERVICE_DATASTORE$DB_DATADIR is_db_locked() { - is_volume_used "$DATASTORE/${SERVICE_NAME}" + is_volume_used "${DATA_DIR}" }