senlin node-create specify the cluster
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
senlin |
Invalid
|
Undecided
|
chenyb4 |
Bug Description
Use "senlin node-create" specify the cluster, the cluster has max_size, the node don't create succeed and return error, but the node status always INIT status.
Example:
The node create:
# senlin node-create -p profile_nova -c cluster_002 node_001
WARNING (shell) "senlin node-create" is deprecated and will be removed by Apr 2017, please use "openstack cluster node create" instead.
+------
| Property | Value |
+------
| cluster_id | cbab4413-
| created_at | - |
| data | {} |
| dependents | {} |
| details | - |
| domain_id | - |
| id | f1e6d2ff-
| index | 10 |
| init_at | 2017-08-
| location | - |
| metadata | {} |
| name | node_001 |
| physical_id | - |
| profile_id | 8c7ca125-
| profile_name | profile_nova |
| project_id | 631b9209a992429
| role | |
| status | INIT |
| status_reason | Initializing |
| updated_at | - |
| user_id | 0ed165520f9b443
+------
The engine log:
e4e1f44d7f0 631b9209a992429
2017-08-02 04:23:40.157 6727 INFO senlin.engine.event [req-62b59039-
2017-08-02 04:23:40.790 6727 ERROR senlin.engine.event [req-62b59039-
The node status:
[root@ocata-senlin ~(keystone_admin)]# senlin node-list
WARNING (shell) "senlin node-list" is deprecated and will be removed by Apr 2017, please use "openstack cluster node list" instead.
+------
| id | name | index | status | cluster_id | physical_id | profile_name | created_at | updated_at |
+------
| 3e057382 | node-cbab4413-008 | 8 | ACTIVE | cbab4413 | 019de57d | profile_nova | 2017-08-
| 4cf368d3 | node-cbab4413-009 | 9 | ACTIVE | cbab4413 | f18e425c | profile_nova | 2017-08-
| f1e6d2ff | node_001 | 10 | INIT | | | profile_nova | - | - |
+------
The right way, must set node status before return error.
Changed in senlin: | |
assignee: | nobody → chenyb4 (chenyb4) |
Fix proposed to branch: master /review. openstack. org/490798
Review: https:/