Cannot remove host from aggregate if host has been deleted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Danil Akhmetov |
Bug Description
Kilo code
Reproduce steps:
1. Assuming that we have one nova-compute node named 'icm' which is added into one aggregate named 'zhaoqin'
[root@icm ~]# nova aggregate-details zhaoqin
+----+-
| Id | Name | Availability Zone | Hosts | Metadata |
+----+-
| 1 | zhaoqin | zhaoqin-az | 'icm' | 'availability_
+----+-
[root@icm ~]# nova service-list
+----+-
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+-
| 1 | nova-conductor | icm | internal | enabled | up | 2015-06-
| 3 | nova-scheduler | icm | internal | enabled | up | 2015-06-
| 4 | nova-consoleauth | icm | internal | enabled | up | 2015-06-
| 5 | nova-compute | icm | zhaoqin-az | enabled | up | 2015-06-
| 6 | nova-cert | icm | internal | enabled | up | 2015-06-
+----+-
2. Remove the nova-compute using service-delete command. However, the host is still in aggregate.
[root@icm ~]# nova service-delete 5
[root@icm ~]# nova service-list
+----+-
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+-
| 1 | nova-conductor | icm | internal | enabled | up | 2015-06-
| 3 | nova-scheduler | icm | internal | enabled | up | 2015-06-
| 4 | nova-consoleauth | icm | internal | enabled | up | 2015-06-
| 6 | nova-cert | icm | internal | enabled | up | 2015-06-
+----+-
[root@icm ~]# nova aggregate-details zhaoqin
+----+-
| Id | Name | Availability Zone | Hosts | Metadata |
+----+-
| 1 | zhaoqin | zhaoqin-az | 'icm' | 'availability_
+----+-
3. Then, attempt to remove the host from aggregate, but fails. And we can not remove this aggregate either, because it is not empty.
[root@icm ~]# nova aggregate-
ERROR (NotFound): Cannot remove host icm in aggregate 1: not found (HTTP 404) (Request-ID: req-b5024dbf-
[root@icm ~]# nova aggregate-delete zhaoqin
ERROR (BadRequest): Cannot remove host from aggregate 1. Reason: Host aggregate is not empty. (HTTP 400) (Request-ID: req-a3c5346c-
Changed in nova: | |
assignee: | nobody → Qin Zhao (zhaoqin) |
status: | New → In Progress |
Changed in nova: | |
assignee: | Qin Zhao (zhaoqin) → nobody |
status: | In Progress → Confirmed |
Changed in nova: | |
assignee: | nobody → Ryan Evans (rmevans88) |
Changed in nova: | |
assignee: | Ryan Evans (rmevans88) → nobody |
Changed in nova: | |
assignee: | nobody → Danil Akhmetov (dinobot) |
Changed in nova: | |
importance: | Undecided → Medium |
Related fix proposed to branch: master /review. openstack. org/262165
Review: https:/