trove create asks for size/instance volume though it is mentioned optional

Bug #1336807 reported by Rajalakshmi Ganesan
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-troveclient
Fix Released
Medium
Greg Lucas

Bug Description

Description:

"trove help create" mentions only name and flavor_id as positional arguments but we get "ERROR: Validation error: instance 'volume' is a required property (HTTP 400)" on mentioning only name and flavor_id. The error is resolved on mentioning size in the client call.

venkater@devstack-trove:~$ trove help create
usage: trove create <name> <flavor_id>
                    [--size <size>]
                    [--databases <databases> [<databases> ...]]
                    [--users <users> [<users> ...]] [--backup <backup>]
                    [--availability_zone <availability_zone>]
                    [--datastore <datastore>]
                    [--datastore_version <datastore_version>]
                    [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid>]
                    [--configuration <configuration>] [--slave_of <master_id>]

Creates a new instance.

Positional arguments:
  <name> Name of the instance.
  <flavor_id> Flavor of the instance.

Optional arguments:
  --size <size> Size of the instance disk in GB.
  --databases <databases> [<databases> ...]
                                  Optional list of databases.
  --users <users> [<users> ...] Optional list of users in the form
                                  user:password.
  --backup <backup> A backup ID.
  --availability_zone <availability_zone>
                                  The Zone hint to give to nova.
  --datastore <datastore> A datastore name or ID.
  --datastore_version <datastore_version>
                                  A datastore version name or ID.
  --nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid>
                                  Create a NIC on the instance. Specify option
                                  multiple times to create multiple NICs. net-
                                  id: attach NIC to network with this ID
                                  (either port-id or net-id must be
                                  specified), v4-fixed-ip: IPv4 fixed address
                                  for NIC (optional), port-id: attach NIC to
                                  port with this ID (either port-id or net-id
                                  must be specified).
  --configuration <configuration>
                                  ID of the configuration group to attach to
                                  the instance.
  --slave_of <master_id> ID of an existing instance to replicate
                                  from.
venkater@devstack-trove:~$

venkater@devstack-trove:~$ trove create ps_test 2
ERROR: Validation error: instance 'volume' is a required property (HTTP 400)
venkater@devstack-trove:~$trove create ps_test 2 --size 1
+-------------------+--------------------------------------+
| Property | Value |
+-------------------+--------------------------------------+
| created | 2014-07-02T13:06:51 |
| datastore | mysql |
| datastore_version | 5.5 |
| flavor | 2 |
| id | b09b94fe-0dd6-47bf-966a-e66af4a019cf |
| name | ps_test |
| status | BUILD |
| updated | 2014-07-02T13:06:51 |
| volume | 1 |
+-------------------+--------------------------------------+
venkater@devstack-trove:~$

Revision history for this message
Greg Lucas (glucas-q) wrote :

I agree this is confusing. The volume size is only required when trove_volume_support is enabled, so it is not a required parameter in all cases.

We may just need a better help message here. I'd raised a related issue (https://bugs.launchpad.net/trove/+bug/1285240) and have seen other new trove users ask about the 'volume required' error.

Changed in python-troveclient:
assignee: nobody → Greg Lucas (glucas-q)
Changed in python-troveclient:
status: New → Triaged
importance: Undecided → Medium
milestone: none → juno-2
Changed in python-troveclient:
milestone: juno-2 → juno-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-troveclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/109414

Changed in python-troveclient:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-troveclient (master)

Reviewed: https://review.openstack.org/109414
Committed: https://git.openstack.org/cgit/openstack/python-troveclient/commit/?id=872abf2c9d57bdec03433b23bf48ac4eb5a79ac6
Submitter: Jenkins
Branch: master

commit 872abf2c9d57bdec03433b23bf48ac4eb5a79ac6
Author: Greg Lucas <email address hidden>
Date: Thu Jul 24 16:34:28 2014 -0400

    Improve help text for --size option

    Update help text to indicate that --size may be a required parameter.

    Change-Id: If1a40475a8d4a8e1c71c2c1e61a87bacb6e42e00
    Closes-Bug: 1336807

Changed in python-troveclient:
status: In Progress → Fix Committed
Zhao Chao (zhaochao1984)
Changed in python-troveclient:
milestone: juno-3 → none
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.