Ask Your Question
0

OCATA- Unable to delete host aggregate

asked 2017-08-30 08:55:30 -0500

nubber gravatar image

After creating a host aggregate, I removed all hosts from compute and deleted the compute node as well. However I am not able to delete the host aggregate using Horizon Database. I am suspecting a possible corruption in DB. Is there a table I could use to delete the hostaggregate from DB? (OCATA Release.)

"Error: Unable to delete host aggregate:"

Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-08-30 15:45:13 -0500

nubber gravatar image

Figured out the tables.. DB is nova_api and tables are aggregates and aggregate_metadata.. due to foreign key need to delete from aggregate_metadate before deleting from aggregates.

MariaDB [(none)]> use nova_api;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

MariaDB [nova_api]> select * from aggregates;
+---------------------+---------------------+----+--------------------------------------+----------+
| created_at          | updated_at          | id | uuid                                 | name     |
+---------------------+---------------------+----+--------------------------------------+----------+
| 2017-08-22 01:46:32 | 2017-08-30 14:02:31 |  1 | e4a4a16e-7513-42fc-9808-32eab5ce6077 | compute  |
| 2017-08-30 17:41:34 | NULL                |  2 | 6caa9100-012a-40fa-81fd-3b9de6554789 | allnodes |
+---------------------+---------------------+----+--------------------------------------+----------+


MariaDB [nova_api]> delete from aggregate_hosts where aggregate_id=1

MariaDB [nova_api]> select * from aggregate_metadata;
+---------------------+------------+----+--------------+-------------------+----------+
| created_at          | updated_at | id | aggregate_id | key               | value    |
+---------------------+------------+----+--------------+-------------------+----------+
| 2017-08-22 01:47:14 | NULL       |  1 |            1 | availability_zone | nova2    |
| 2017-08-30 17:41:34 | NULL       |  2 |            2 | availability_zone | allnodes |
+---------------------+------------+----+--------------+-------------------+----------+
2 rows in set (0.00 sec)

MariaDB [nova_api]> delete from aggregate_metadata where id =1;

MariaDB [nova_api]> delete from aggregates where id =1;
Query OK, 1 row affected (0.02 sec)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-08-30 08:55:30 -0500

Seen: 248 times

Last updated: Aug 30 '17