From: gatici Date: Mon, 31 Jul 2023 13:18:42 +0000 (+0300) Subject: Changing RO Pebble Service command to enter the startup directory first X-Git-Tag: release-v15.0-start~34 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F94%2F13794%2F5;p=osm%2Fdevops.git Changing RO 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: I44bbe0beeafce3932218a0df1d38191a14cb4a8a Signed-off-by: gatici --- diff --git a/installers/charm/osm-ro/src/charm.py b/installers/charm/osm-ro/src/charm.py index 84c0ee30..89da4f12 100755 --- a/installers/charm/osm-ro/src/charm.py +++ b/installers/charm/osm-ro/src/charm.py @@ -302,10 +302,11 @@ class OsmRoCharm(CharmBase): "ro": { "override": "replace", "summary": "ro service", - "command": "python3 -u -m osm_ng_ro.ro_main", + "command": "/bin/sh -c 'cd /app/osm_ro && python3 -u -m osm_ng_ro.ro_main'", # cd /app/osm_nbi is needed until we upgrade Juju to 3.x. "startup": "enabled", "user": USER, "group": GROUP, + "working-dir": "/app/osm_ro", # This parameter has no effect in Juju 2.9.x. "environment": { # General configuration "OSMRO_LOG_LEVEL": self.config["log-level"].upper(),