magnumclient not have good validation for node_count
Bug #1522668 reported by
Kai Qiang Wu(Kennan)
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magnum |
Invalid
|
Undecided
|
Yang Hongyang |
Bug Description
according to review https:/
$ magnum bay-create --name k8sbay-test2 --baymodel k8sbaymodel --node-count None ERROR: Invalid input for field/attribute bay. Value: '{'name': 'k8sbay-test2', 'node_count': 'None', 'master_count': 1, 'baymodel_id': '6f5a653a-
It is not good check, it seems move all checks in server side, I think some check can be like nova flavor-create
like this:
$ nova flavor-create dsdsd 120 None None None
ERROR (CommandError): Ram must be an integer.
we should have something like node_count must be an integer.
Changed in magnum: | |
assignee: | nobody → Yang Hongyang (hongyang-yang) |
Changed in magnum: | |
status: | New → Invalid |
To post a comment you must log in.
I think it is fixed in latest version: so can be closed ubuntubase: /opt/stack/ devstack$ magnum bay-list ------- ------- ------- ------- ----+-- ------+ ------- -----+- ------- ------+ ------- ------- ------+ ------- ------- ------- ------- ----+-- ------+ ------- -----+- ------- ------+ ------- ------- ------+ c59c-495e- 8550-0b05104df2 08 | k8sbay | 1 | 1 | CREATE_IN_PROGRESS | ------- ------- ------- ------- ----+-- ------+ ------- -----+- ------- ------+ ------- ------- ------+ ubuntubase: /opt/stack/ devstack$ magnum bay-create --name k8sbay --baymodel k8sbaymodel --node-count err
[-- node-count <node-count>]
[-- master- count <master-count>]
[-- discovery- url <discovery-url>]
[-- timeout <timeout>] ubuntubase: /opt/stack/ devstack$ magnum --version ubuntubase: /opt/stack/ devstack$ magnum bay-list ------- ------- ------- ------- ----+-- ------+ ------- -----+- ------- ------+ ------- ------- ------+ ------- ------- ------- ------- ----+-- ------+ ------- -----+- ------- ------+ ------- ------- ------+ c59c-495e- 8550-0b05104df2 08 | k8sbay | 1 | 1 | CREATE_IN_PROGRESS | ------- ------- ------- ------- ----+-- ------+ ------- -----+- ------- ------+ ------- ------- ------+ ubuntubase: /opt/stack/ devstack$ magnum bay-create --name k8sbay --baymodel k8sbaymodel --node-count err
[-- node-count <node-count>]
[-- master- count <master-count>]
[-- discovery- url <discovery-url>]
[-- timeout <timeout>] ubuntubase: /opt/stack/ devstack$ magnum --version ubuntubase: /opt/stack/ devstack$ magnum-api --version
ubuntu@
+------
| uuid | name | node_count | master_count | status |
+------
| 88349f8f-
+------
ubuntu@
usage: magnum bay-create [--name <name>] --baymodel <baymodel>
error: argument --node-count: invalid int value: u'err'
Try 'magnum help bay-create' for more information.
ubuntu@
2.1.1
ubuntu@
+------
| uuid | name | node_count | master_count | status |
+------
| 88349f8f-
+------
ubuntu@
usage: magnum bay-create [--name <name>] --baymodel <baymodel>
error: argument --node-count: invalid int value: u'err'
Try 'magnum help bay-create' for more information.
ubuntu@
2.1.1
ubuntu@
2.0.1.dev334