taurus@pi5juju:~$ juju status
Model Controller Cloud/Region Version SLA Timestamp
arm m2k8s microk8s/localhost 3.4.2 unsupported 02:07:35+02:00
App Version Status Scale Charm Channel Rev Address Exposed Message
postgresql-k8s 14.11 active 1 postgresql-k8s 14/edge 248 10.152.183.57 no Primary
sysbench waiting 1 sysbench latest/stable 25 10.152.183.154 no installing agent
Unit Workload Agent Address Ports Message
postgresql-k8s/0* active idle 10.1.46.35 Primary
sysbench/0* error idle 10.1.46.42 hook failed: "config-changed"
Error:
unit-sysbench-0: 02:06:12 DEBUG unit.sysbench/0.juju-log ops 2.12.0 up and running.
unit-sysbench-0: 02:06:12 DEBUG unit.sysbench/0.juju-log Emitting Juju event config_changed.
unit-sysbench-0: 02:06:13 DEBUG unit.sysbench/0.juju-log Executing command: ['systemctl', 'daemon-reload']
unit-sysbench-0: 02:06:13 ERROR unit.sysbench/0.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-sysbench-0/charm/./src/charm.py", line 325, in <module>
main(SysbenchOperator)
File "/var/lib/juju/agents/unit-sysbench-0/charm/venv/ops/main.py", line 544, in main
manager.run()
File "/var/lib/juju/agents/unit-sysbench-0/charm/venv/ops/main.py", line 520, in run
self._emit()
File "/var/lib/juju/agents/unit-sysbench-0/charm/venv/ops/main.py", line 509, in _emit
_emit_charm_event(self.charm, self.dispatcher.event_name)
File "/var/lib/juju/agents/unit-sysbench-0/charm/venv/ops/main.py", line 143, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-sysbench-0/charm/venv/ops/framework.py", line 352, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-sysbench-0/charm/venv/ops/framework.py", line 851, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-sysbench-0/charm/venv/ops/framework.py", line 941, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-sysbench-0/charm/./src/charm.py", line 135, in _on_config_changed
svc.render_service_file(
File "/var/lib/juju/agents/unit-sysbench-0/charm/src/sysbench.py", line 83, in render_service_file
return daemon_reload()
File "/var/lib/juju/agents/unit-sysbench-0/charm/lib/charms/operator_libs_linux/v1/systemd.py", line 288, in daemon_reload
return _systemctl("daemon-reload", check=True) == 0
File "/var/lib/juju/agents/unit-sysbench-0/charm/lib/charms/operator_libs_linux/v1/systemd.py", line 90, in _systemctl
proc = subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'systemctl'
unit-sysbench-0: 02:06:13 ERROR juju.worker.uniter.operation hook "config-changed" (via hook dispatching script: dispatch) failed: exit status 1
Versions
Operating system: Ubuntu 23.10
Juju CLI: 3.4.2-genericlinux-arm64
Juju agent: see above
Charm revision: see above
LXD: not applicable
MicroK8s: MicroK8s v1.30.0 revision 6788 (strict)
Log output
Juju debug log: see above
Additional context
Works well on LXD as we have systemd there.... but not on K8s/Pebble. ;-)
Steps to reproduce
Expected behavior
No errors on juju config :-D
Actual behavior
Error:
Versions
Operating system: Ubuntu 23.10 Juju CLI: 3.4.2-genericlinux-arm64 Juju agent: see above Charm revision: see above LXD: not applicable MicroK8s: MicroK8s v1.30.0 revision 6788 (strict)
Log output
Juju debug log: see above
Additional context
Works well on LXD as we have systemd there.... but not on K8s/Pebble. ;-)