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 <gulsum.atici@canonical.com>
"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(),