[ux] Relation data snapshot on error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Whenever a hook error happens, it would be useful to automatically save a snapshot of controller data that a unit has retrieved from the agent's PoV. That would make it possible to observe the exact state snapshot that triggered an error. I recognize that this will not capture the state of a unit's host but that can be analyzed via other means.
The snapshot could be similar to what is possible to display via `juju show-unit <unit>`:
juju show-unit etcd-operator/0
etcd-operator/0:
opened-ports: []
charm: local:focal/
leader: true
life: alive
relation-info:
- relation-id: 41
endpoint: cluster
related-
application
cluster-
peer-urls: '{"etcd-
local-unit:
in-scope: true
data:
peer-url: https:/
# ...
summary: |
- [ux] Ability to easily show relation data + [ux] Relation data snapshot on error |
description: | updated |
Changed in juju: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Are you aware that `juju show-unit foo/0` will report the relation data as
seen from that unit? (it doesn't show the data that the unit is telling
others, but does give you the values that the unit is seeing)
On Wed, Jul 13, 2022 at 10:00 AM Dmitrii Shcherbakov <
<email address hidden>> wrote:
> ** Summary changed: /etcd-operator- 1.etcd- operator- endpoints. skydive. svc.cluster. local:2380 etcd-operator- 28 5447-4376- ba4f-e9d90a6beb 21 operator- 1": " /etcd-operator- 1.etcd- operator- endpoints. skydive. svc.cluster. local:2380 /etcd-operator- 2.etcd- operator- endpoints. skydive. svc.cluster. local:2380 /etcd-operator- 0.etcd- operator- endpoints. skydive. svc.cluster. local:2380 /etcd-operator- 0.etcd- operator- endpoints. skydive. svc.cluster. local:2380
>
> - [ux] Ability to easily show relation data
> + [ux] Relation data snapshot on error
>
> ** Description changed:
>
> - A common repetitive task when debugging charms (in my experience) is
> - getting relation data bag contents.
> -
> - While it is possible to do something like this:
> -
> - # juju run --unit etcd-operator/0 'relation-ids cluster'
> - cluster:41
> -
> - # juju run --unit etcd-operator/0 'relation-get -r 41 - etcd-operator/1'
> - egress-subnets: 10.152.183.208/32
> - ingress-address: 10.152.183.208
> - peer-url:
> https:/
> - private-address: 10.152.183.208
> -
> - it seems like a Juju client command to dump a snapshot of relation data
> - (and server side unit state data) at a particular point in time from the
> - point of view of a given unit would be useful.
> -
> - This may also be useful for integration QA runs so that this data can be
> - collected as well and included for charm engineering teams to resolve
> - issues faster. The relation data state is often needed to simulate the
> - problematic case without being able to reproduce it as it may be
> - difficult to trigger it due to timing, environment specifics or other
> - reasons.
> -
> - Likewise, whenever a hook error happens, it would be useful to save a
> - snapshot of controller data that a unit has retrieved from the agent's
> + Whenever a hook error happens, it would be useful to automatically save
> + a snapshot of controller data that a unit has retrieved from the agent's
> PoV. That would make it possible to observe the exact state snapshot
> that triggered an error. I recognize that this will not capture the
> state of a unit's host but that can be analyzed via other means.
> +
> + The snapshot could be similar to what is possible to display via `juju
> show-unit <unit>`:
> + juju show-unit etcd-operator/0
> + etcd-operator/0:
> + opened-ports: []
> + charm: local:focal/
> + leader: true
> + life: alive
> + relation-info:
> + - relation-id: 41
> + endpoint: cluster
> + related-endpoint: cluster
> + application-data:
> + cluster-token: 2c5c4b2e-
> + peer-urls: '{"etcd-
> https:/
> ",
> + "etcd-operator-2": "
> https:/
> ",
> + "etcd-operator-0": "
> https:/
> "}'
> + local-unit:
> + in-scope: true
> + data:
> + egress-subnets: 10.152.183.208/32
> + ingress-address: 10.152.183.208
> + peer-url:
> https:/
> + private-address: 10.15...