juju add-storage help output needs clarification

Bug #1634254 reported by Matt Bruzek on 2016-10-17
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Tim McNamara

Bug Description

The juju add-storage help output is unclear on the order of the options for storage. It seems to indicate a "sequence of: POOL, COUNT, and SIZE", but the examples appear to use POOL, SIZE, COUNT (ebs,1024,3).

This inconsistency should be resolved so our users can call the command properly:

$ juju add-storage -h
Usage: juju add-storage [options]
<unit name> <storage directive> ...
    where storage directive is
        <charm storage name>=<storage constraints>
        <charm storage name>

Adds unit storage dynamically.

-B, --no-browser-login (= false)
    Do not use web browser for authentication
-m, --model (= "")
    Model to operate in. Accepts [<controller name>:]<model name>

Add storage instances to a unit dynamically using provided storage directives.
Specify a unit and a storage specification in the same format
as passed to juju deploy --storage=”...”.

A storage directive consists of a storage name as per charm specification
and storage constraints, e.g. pool, count, size.

The acceptable format for storage constraints is a comma separated
sequence of: POOL, COUNT, and SIZE, where

    POOL identifies the storage pool. POOL can be a string
    starting with a letter, followed by zero or more digits
    or letters optionally separated by hyphens.

    COUNT is a positive integer indicating how many instances
    of the storage to create. If unspecified, and SIZE is
    specified, COUNT defaults to 1.

    SIZE describes the minimum size of the storage instances to
    create. SIZE is a floating point number and multiplier from
    the set (M, G, T, P, E, Z, Y), which are all treated as
    powers of 1024.

Storage constraints can be optionally ommitted.
Model default values will be used for all ommitted constraint values.
There is no need to comma-separate ommitted constraints.

    # Add 3 ebs storage instances for "data" storage to unit u/0:

      juju add-storage u/0 data=ebs,1024,3
      juju add-storage u/0 data=ebs,3
      juju add-storage u/0 data=ebs,,3

    # Add 1 storage instances for "data" storage to unit u/0
    # using default model provider pool:

      juju add-storage u/0 data=1
      juju add-storage u/0 data

Changed in juju:
importance: Undecided → Medium
milestone: none → 2.0.1
status: New → Triaged
Curtis Hovey (sinzui) on 2016-10-28
Changed in juju:
milestone: 2.0.1 → none
tags: added: helptext
Tim McNamara (tim-clicks) wrote :

The example ("juju add-storage u/0 data=ebs,1024,3") works by mistake. Looking at the code, the count is parsed twice and 3 overwrites 1024.

Changed in juju:
assignee: nobody → Tim McNamara (tim-clicks)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers