Host aggregates delete fails with error(s)
book
Article ID: 324729
calendar_today
Updated On:
Products
VMware Integrated OpenStack
Show More
Show Less
Issue/Introduction
Depending on how you delete, will determine error shown:
Using Horizon Dashboard within Admin > System > Host Aggregates section results in the following error:Error: Unable to delete host aggregate: <Name_of_the_host_aggregate >
Using the OpenStackClient results in the following error: # openstack aggregate delete 7Cannot remove host from aggregate 7. Reason: Host aggregate is not empty. (HTTP 400) (Request-ID: req-########-####-####-####-############)
In the nova-osapi log, you see entries similar to:2017-03-28 21:53:11.094 25877 DEBUG nova.api.openstack.wsgi [req-########-####-####-####-############ 80366402033940189a42a5980e4a0e18 0bcb957f02dd480094fdfd22cec511a9 - - -] Calling method '<bound m</SPAN> method AggregateController.delete of <nova.api.openstack.compute.aggregates.AggregateController object at 0x7fc18956a810>>' _process_stack /usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py:6 99 2017-03-28 21:53:11.107 25877 INFO nova.api.openstack.wsgi [req-########-####-####-####-############ 80366402033940189a42a5980e4a0e18 0bcb957f02dd480094fdfd22cec511a9 - - -] HTTP exception thrown: Ca nnot remove host from aggregate 7. Reason: Host aggregate is not empty. 2017-03-28 21:53:11.108 25877 DEBUG nova.api.openstack.wsgi [req-########-####-####-####-############ 80366402033940189a42a5980e4a0e18 0bcb957f02dd480094fdfd22cec511a9 - - -] Returning 400 to user: Cannot remove host from aggregate 7. Reason: Host aggregate is not empty. __call__ /usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py:1070 2017-03-28 21:53:11.109 25877 INFO nova.osapi_compute.wsgi.server [req-########-####-####-####-############ 80366402033940189a42a5980e4a0e18 0bcb957f02dd480094fdfd22cec511a9 - - -] 172.20.2.121,172.20.0.133 "DELETE /v2/0bcb957f02dd480094fdfd22cec511a9/os-aggregates/7 HTTP/1.1" status: 400 len: 333 time: 0.0199990 Note : The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.
Cause
This issue occurs because hosts aggregates that have a compute-cluster assigned cannot be deleted.
Resolution
To resolve this issue, remove the compute-clusters from the aggregate before attempting to delete.
To remove from the Horizon dashboard
Log in to Horizon dashboard as an admin from the VIO public API IP.
Navigate to Admin > System > Host Aggregates section.
From the Host Aggregate dropdown, click Manage Hosts .
Click the minus (-) symbol for each of the associated compute hosts (Also known as compute-clusters).
Save changes and attempt to delete the Host Aggregate again.
To remove from OpenStack Client
Download and install the OpenStack client. For more information, see Install the OpenStack client .Disclaimer : Broadcom is not responsible for the reliability of any data, opinions, advice, or statements made on third-party websites. Inclusion of such links does not imply that Broadcom endorses, recommends, or accepts any responsibility for the content of such sites.
Set the environment variables for easier use. This can be done by sourcing a pre-made RC file or by exporting each variable entering the needed information as shown. export OS_PROJECT_ID=<Project_ID_Value > export OS_REGION_NAME=nova export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_NAME=<project_Name_The_User_Is_Admin_In > export OS_PASSWORD=<password > export OS_AUTH_URL=https://<VIO_Public_API_IP>:5000/v3 export OS_USERNAME=<UserName >
List out the Host Aggregates. Example: ~# openstack aggregate list +----+-----------------+-------------------+ | ID | Name | Availability Zone | +----+-----------------+-------------------+ | 7 | Lab Aggregate01 | Isolated_Zone | +----+-----------------+-------------------+
Show the details of the aggregate to get the host names.~# openstack aggregate show 7 +-------------------+----------------------------+ | Field | Value | +-------------------+----------------------------+ | availability_zone | Isolated_Zone | | created_at | 2017-03-28T21:44:26.000000 | | deleted | False | | deleted_at | None | | hosts | [u'compute01'] | | id | 7 | | name | Lab Aggregate01 | | properties | | | updated_at | None | +-------------------+----------------------------+
Remove the hosts from the aggregate.~# openstack aggregate remove host 7 compute01 +-------------------+------------------------------------------+ | Field | Value | +-------------------+------------------------------------------+ | availability_zone | Isolated_Zone | | created_at | 2017-03-28T21:44:26.000000 | | deleted | False | | deleted_at | None | | hosts | [] | | id | 7 | | metadata | {u'availability_zone': u'Isolated_Zone'} | | name | Lab Aggregate01 | | updated_at | None | +-------------------+------------------------------------------+
Attempt to delete the aggregate again. There is no return output on success. ~# openstack aggregate delete 7 The delete can be confirmed by listing the aggregates a second time. Note : If there are no remaining host aggregates, the returned output will be empty as shown in the example. Else, the remaining aggregates will be listed without the deleted aggregate. ~# openstack aggregate list
Feedback
thumb_up
Yes
thumb_down
No