cmd/juju/storage: "volume list" YAML/JSON format is non-obvious

Bug #1495338 reported by Andrew Wilkins on 2015-09-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
High
Andrew Wilkins
1.25
High
Andrew Wilkins

Bug Description

$ juju bootstrap
$ juju deploy --repository ~/projects/charms local:trusty/storagetest -n2 --storage filesystem=loop
$ juju storage volume list --format=yaml
"1":
  storagetest/0:
    filesystem/0:
      size: 0
      persistent: false
      read-only: false
      volume: 1/0
      status:
        current: pending
        since: 14 Sep 2015 09:32:01+08:00
"2":
  storagetest/1:
    filesystem/1:
      size: 0
      persistent: false
      read-only: false
      volume: 2/1
      status:
        current: pending
        since: 14 Sep 2015 09:32:03+08:00

-----------------------

What are the "1" and "2" IDs? At first you might think they are the volume IDs, but no, they are machine IDs. This is confusing. Storage is meant to be stable from 1.25 onwards, so we have a small window of opportunity to fix this before 1.25 is released.

Andrew Wilkins (axwalk) on 2015-09-14
Changed in juju-core:
milestone: 1.25-beta1 → 1.26-alpha1
status: In Progress → Triaged
Andrew Wilkins (axwalk) wrote :

Proposed format:

-------------------

volumes:
  1/0:
    provider-id: volume-1-0
    storage: filesystem/0
    attachments:
      machines:
        "1":
          device: loop0
          read-only: false
      units:
        storagetest/0:
          machine: "1"
          location: /srv/filesystem/0
    size: 1024
    persistent: false
    status:
      current: attached
      since: 15 Sep 2015 19:13:50+08:00
  2/1:
    provider-id: volume-2-1
    storage: filesystem/1
    attachments:
      machines:
        "2":
          device: loop1
          read-only: false
      units:
        storagetest/1:
          machine: "2"
    size: 1024
    persistent: false
    status:
      current: attached
      since: 15 Sep 2015 19:14:02+08:00

Andrew Wilkins (axwalk) on 2015-09-16
Changed in juju-core:
status: Triaged → In Progress
Andrew Wilkins (axwalk) on 2015-09-18
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui) on 2015-10-16
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers