canonical / grafana-k8s-operator

https://charmhub.io/grafana-k8s
Apache License 2.0
6 stars 22 forks source link

Error message while deploying #252

Closed Abuelodelanada closed 2 months ago

Abuelodelanada commented 1 year ago

Bug Description

While deploying Grafana I see:

unit-grafana-0: 09:44:05.526 ERROR unit.grafana/0.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
  File "./src/charm.py", line 1342, in <module>
    main(GrafanaCharm, use_juju_for_storage=True)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/main.py", line 441, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/main.py", line 149, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/framework.py", line 344, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/framework.py", line 841, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/framework.py", line 930, in _reemit
    custom_handler(event)
  File "./src/charm.py", line 272, in _on_config_changed
    self._configure_replication()
  File "./src/charm.py", line 337, in _configure_replication
    self.restart_litestream(leader)
  File "./src/charm.py", line 854, in restart_litestream
    self.containers["replication"].start("litestream")
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/model.py", line 1922, in start
    self._pebble.start_services(service_names)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/pebble.py", line 1700, in start_services
    return self._services_action('start', services, timeout, delay)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/pebble.py", line 1761, in _services_action
    raise ChangeError(change.err, change)
ops.pebble.ChangeError: cannot perform the following tasks:
- Start service "litestream" (cannot start service: exec: "litestream": executable file not found in $PATH)
----- Logs from task 0 -----
2023-08-25T12:44:05Z ERROR cannot start service: exec: "litestream": executable file not found in $PATH
-----
unit-grafana-0: 09:44:05.809 ERROR juju.worker.uniter.operation hook "config-changed" (via hook dispatching script: dispatch) failed: exit status 1

To Reproduce

  1. Pack Grafana from main (Now, this commit: 499166ecbdb06fd095c56653f8c19a9008f7aa35)
  2. Deploy it: juju deploy ./*.charm grafana --resource grafana-image=docker.io/ubuntu/grafana:9.2-22.04_beta --resource litestream-image=docker.io/ubuntu/grafana:9.2-22.04_beta --trust
  3. See juju debug logs

Environment

juju 3.1.5

Relevant log output

.

Additional context

No response

sed-i commented 2 months ago

litestream-image=docker.io/ubuntu/grafana:9.2-22.04_beta is pointing to grafana instead of litestream, that's why the binary isn't there.