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

Bug #1495338 reported by Andrew Wilkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Andrew Wilkins
1.25
Fix Released
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)
Changed in juju-core:
milestone: 1.25-beta1 → 1.26-alpha1
status: In Progress → Triaged
Revision history for this message
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)
Changed in juju-core:
status: Triaged → In Progress
Andrew Wilkins (axwalk)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
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.