Confusing error for trove create missing --size

Bug #1285240 reported by Greg Lucas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Invalid
Undecided
Unassigned

Bug Description

Leaving off the --size parameter of a 'trove create' call results in this message:

ERROR: Validation error: instance 'volume' is a required property

It is not obvious that this means the --size param is required.

Revision history for this message
Sushil Kumar (sushil-kumar2) wrote :

This is not a bug, I think so.

Size parameter is required dependent on trove_volume_support.

If trove_volume_support is set to True then size becomes required property else it is optional.

Changed in trove:
status: New → Invalid
Revision history for this message
Greg Lucas (glucas-q) wrote :

To clarify: the issue is not that size is required, but that the message itself is unclear (at least to a new user like myself).

The error says "volume is a required" but the trove create command help doesn't mention "volume" at all. You have to know that "volume is required" actually means "size is required".

Revision history for this message
Auston McReynolds (amcrn) wrote :

100% agree that it's far from clear Greg, thanks for the report. The reason why it's saying "volume is required" is that the json looks like { ... "volume": { "size": "5" } }. so if the "volume" field isn't present, the apischema validation runs (see https://github.com/openstack/trove/blob/master/trove/common/apischema.py#L191-L192) and correctly reports that "volume" isn't present.

the only way this can be enhanced is in python-troveclient, via an error-message rewrite, which is a bit hacky.

Revision history for this message
Martin Paulo (martin-paulo) wrote :

Changing the python-troveclient might be hacky, but it will enhance usability. I can imagine some people becoming very confused by being told that the volume is a required property when its not even listed as an optional argument...

Revision history for this message
Martin Paulo (martin-paulo) wrote :

Being a casual observer, isn't this bug in fact a duplicate of https://bugs.launchpad.net/python-troveclient/+bug/1267104 ?

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

Martin - Yes, looks like it is. Thanks, I'll close this one as a dup.

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.