relation not complete for juju status formats other then tabular

Bug #1947030 reported by Steven Parker
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

juju status tabular format provides the following information for relationships

Relation provider,Requirer,Interface,Type,Message

However, formats for yaml and json do not provide a one to one mapping for relations.
  Ie. There is no non-ambiguous linkage between a relation provider and requirer

Additionally there is no information provided about the interface at all.

For example given the following relation provided by:

juju status --relations

Relation provider Requirer Interface Type
ceph-mon:client cinder-ceph:ceph ceph-client regular

Output from juju status --format yaml is missing a one to one mapping of the relations

ceph-mon:
    charm: cs:ceph-mon-58
     ...
    application-status:
      current: active
      message: Unit is ready and clustered
      since: 07 Oct 2021 22:58:41Z
    relations:
      client:
      - cinder-ceph <--- No way to map this to cinder-ceph:ceph without making assumptions
      - glance
      - gnocchi
      - landscape-client
      - nova-compute
      - prometheus-ceph-exporter
      juju-info:
      - filebeat
      - logrotated
      - rsyslog-forwarder-ha
      - telegraf
      mon:
      - ceph-mon
      nrpe-external-master:
      - nrpe
      osd:
      - ceph-osd
      radosgw:
      - ceph-radosgw

----
cinder-ceph:
    charm: cs:cinder-ceph-264
    ...
    application-status:
      current: active
      message: Unit is ready
      since: 07 Oct 2021 23:03:51Z
    relations:
      ceph:
      - ceph-mon <--- No way to map this non-ambiguously
      ceph-access:
      - nova-compute
      storage-backend:
      - cinder
    subordinate-to:
    - cinder

Also interface is not in the yaml and json formats at all in this case ceph-client.

Revision history for this message
Steven Parker (sbparke) wrote :

This one to one mapping is required for juju lint bug https://bugs.launchpad.net/juju-lint/+bug/1840814

description: updated
Revision history for this message
John A Meinel (jameinel) wrote :

so in the output that you mention you can say that:
application:
  ceph-mon:
  ...
  relations:
    client: <- endpoint
      - cinder-ceph
...
  cinder-ceph:
    relations:
      ceph:
      - ceph-mon

So you can see that ceph-mon on the client endpoint is related to cinder-ceph, and cinder-ceph on the ceph endpoint is related to cinder-mon.

I agree that it isn't explicitly clear that those are both ends of the link, but certainly in any case where a is related to b only a single time, you can see which endpoint in a you find b, and which endpoint in b you find a.

Interestingly that information is more obvious in 'show-unit' but not in 'show-application':
```
$ juju show-unit dummy-sink/0
dummy-sink/0:
  machine: "0"
  opened-ports: []
  public-address: 10.5.24.108
  charm: local:xenial/dummy-sink-0
  leader: true
  relation-info:
  - endpoint: source
    related-endpoint: sink
...
```
(show application doesn't list any relations)

We could change 'juju status --format=yaml' to have:
```
ceph-mon:
  relations:
    client:
      - cinder-ceph:ceph
```

I would worry a bit that we are changing the structure of the yaml output which we generally try to preserve compatibility. (we have added fields, but rarely do we change the content of a field)

Changed in juju:
importance: Undecided → Low
status: New → Triaged
tags: added: bitesize status
tags: added: ju-18
tags: removed: ju-18
Revision history for this message
Andrea Ieri (aieri) wrote :

for context, this bug is a partial blocker for bug 1840814 and (probably) bug 1936838, and its importance would be largely reduced if bug 1947760 was implemented.

Revision history for this message
Pietro Pasotti (ppasotti) wrote :

This is bugging me as well.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.