From df0501ce624a979cc28c7e184c7529a50e40857e Mon Sep 17 00:00:00 2001 From: Dario Faccin Date: Tue, 1 Aug 2023 17:39:36 +0200 Subject: [PATCH] Changing MON Pebble Service command to enter the startup directory first In rockcraft.yaml WORKDIR is not supported, so it needs to be specified in Pebble service definition by using working-dir parameter. However, working-dir is not supported in Juju 2.9.x. So, we are entering to the startup directory first as a workaround. Change-Id: I5949b16ce7e28dfb3f235eabd64062a5a185aa9c Signed-off-by: Dario Faccin --- installers/charm/osm-mon/src/charm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installers/charm/osm-mon/src/charm.py b/installers/charm/osm-mon/src/charm.py index bb98ccf0..21114293 100755 --- a/installers/charm/osm-mon/src/charm.py +++ b/installers/charm/osm-mon/src/charm.py @@ -373,10 +373,11 @@ class OsmMonCharm(CharmBase): self.service_name: { "override": "replace", "summary": "mon service", - "command": "/bin/bash scripts/start.sh", + "command": "/bin/bash -c 'cd /app/osm_mon/ && /bin/bash start.sh'", "startup": "enabled", "user": "appuser", "group": "appuser", + "working-dir": "/app/osm_mon", # This parameter has no effect in Juju 2.9.x "environment": environment, } }, -- 2.25.1