Changing RO Pebble Service command to enter the startup directory first
[osm/devops.git] / installers / charm / osm-ro / src / charm.py
index 84c0ee3..89da4f1 100755 (executable)
@@ -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(),