canonical / grafana-agent-k8s-operator

https://charmhub.io/grafana-agent-k8s
Apache License 2.0
8 stars 18 forks source link

Wrong cli args on pod restart [k8s] #226

Closed dstathis closed 1 year ago

dstathis commented 1 year ago

Bug Description

When a pod restarts, the pebble layer is never set. This is because we only set the pebble layer in pebble_ready which does not fire on pod restart.

To Reproduce

  1. deploy grafana-agent and get it to active status
  2. kubectl delete pod <pod-name>
  3. Observe the running cli args. They will be the default args for the rock rather than the args set by the charm.

Environment

                           juju info v0.1                           
┌──────────────┬───────────────────────────────────────────────────┐
│ jhack        │ 0.3.18.3                                          │
│ python       │ 3.10.6 (/home/dylan/repos/jhack/venv/bin/python3) │
│ juju-* snaps │  juju │ 3.1.5 - 23354 (latest/stable)             │
│ microk8s     │ MicroK8s v1.27.2 revision 5372                    │
│ lxd          │ 5.0.2                                             │
│ multipass    │ Not Installed.                                    │
│ multipassd   │ Not Installed.                                    │
│ os           │ Ubuntu 22.04.2 LTS                                │
│ kernel       │ Linux 5.15.0-76-generic x86_64                    │
└──────────────┴───────────────────────────────────────────────────┘

Relevant log output

-

Additional context

No response

dstathis commented 1 year ago

I tried this again and can not reproduce.