how to delete aggregates
Hello I use
nova service delete *id*
delete compute node,
and then I can delete an aggregates with compute node
root@controller:~# nova aggregate-list
+----+------+-------------------+
| Id | Name | Availability Zone |
+----+------+-------------------+
| 1 | ALL | ALL |
+----+------+-------------------+
root@controller:~# nova aggregate-details 1
+----+------+-------------------+--------------------------+-------------------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+------+-------------------+--------------------------+-------------------------+
| 1 | ALL | ALL | 'compute11', 'compute21' | 'availability_zone=ALL' |
+----+------+-------------------+--------------------------+-------------------------+
root@controller:~# nova aggregate-remove-host ALL compute11
ERROR (NotFound): Cannot remove host compute11 in aggregate 1 (HTTP 404) (Request-ID: req-8e19a2fb-1db3-47d4-bf9e-99c0cc86ce26)
I try to delete it in the database,
MariaDB [nova]> select * from aggregates;
+---------------------+---------------------+------------+----+------+---------+
| created_at | updated_at | deleted_at | id | name | deleted |
+---------------------+---------------------+------------+----+------+---------+
| 2015-07-30 02:59:58 | 2015-08-28 09:20:08 | NULL | 1 | ALL | 0 |
+---------------------+---------------------+------------+----+------+---------+
1 row in set (0.00 sec)
MariaDB [nova]> select * from aggregate_host;
ERROR 1146 (42S02): Table 'nova.aggregate_host' doesn't exist
MariaDB [nova]> select * from aggregate_hosts;
+---------------------+------------+------------+----+-----------+--------------+---------+
| created_at | updated_at | deleted_at | id | host | aggregate_id | deleted |
+---------------------+------------+------------+----+-----------+--------------+---------+
| 2015-07-30 03:00:30 | NULL | NULL | 1 | compute11 | 1 | 0 |
| 2015-07-30 15:00:49 | NULL | NULL | 2 | compute21 | 1 | 0 |
+---------------------+------------+------------+----+-----------+--------------+---------+
2 rows in set (0.00 sec)
MariaDB [nova]> delete from aggregate_host where id=1;
ERROR 1146 (42S02): Table 'nova.aggregate_host' doesn't exist
how can I delete the aggregate.