juju add-storage help output needs clarification

Bug #1634254 reported by Matt Bruzek
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
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>
    or
        <charm storage name>

Summary:
Adds unit storage dynamically.

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

Details:
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.

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

      juju add-storage u/0 data=ebs,1024,3
    or
      juju add-storage u/0 data=ebs,3
    or
      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
    or
      juju add-storage u/0 data

Changed in juju:
importance: Undecided → Medium
milestone: none → 2.0.1
status: New → Triaged
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.0.1 → none
tags: added: helptext
Revision history for this message
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)
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
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.