<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 20 févr. 2023, 11:33, Eugen Block <<a href="mailto:eblock@nde.ag">eblock@nde.ag</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
we had a network issue two weeks ago in a HA Victoria cloud resulting  <br>
in a couple of stale resources (in pending state). Most of them I  <br>
could cleanup relatively easy, but two instances are left in  <br>
"building" state, but not yet in the nova database so I can't just  <br>
remove them via 'openstack server delete <UUID>'. I've been looking  <br>
through the various nova databases where traces have been left to get  <br>
an impression where I could intervene (although I don't like  <br>
manipulating the database).<br>
The VMs are two amphora instances:<br>
<br>
<br>
control01:~ # openstack server list --project service | grep -v ACTIVE<br>
+--------------------------------------+----------------------------------------------+--------+-------------------------------------------------------------------------------------+---------------------------+---------+<br>
| ID                                   | Name                           <br>
                | Status | Networks                                     <br>
                                         | Image                     |  <br>
Flavor  |<br>
+--------------------------------------+----------------------------------------------+--------+-------------------------------------------------------------------------------------+---------------------------+---------+<br>
| 0453a7e5-e4f9-419b-ad71-d837a20ef6bb |  <br>
amphora-0ee32901-0c59-4752-8253-35b66da176ea | BUILD  |                 <br>
<br>
| amphora-x64-haproxy_1.0.0 | amphora |<br>
| dc8cdc3a-f6b2-469b-af6f-ba2aa130ea9b |  <br>
amphora-4990a47b-fe8a-431a-90ec-5ac2368a5251 | BUILD  |                 <br>
<br>
| amphora-x64-haproxy_1.0.0 | amphora  <br>
|+--------------------------------------+----------------------------------------------+--------+-------------------------------------------------------------------------------------+---------------------------+---------+<br>
<br>
The database tables referring to the UUID  <br>
0453a7e5-e4f9-419b-ad71-d837a20ef6bb are these:<br>
<br>
nova_cell0/instance_id_mappings.ibd<br>
nova_cell0/instance_info_caches.ibd<br>
nova_cell0/instance_extra.ibd<br>
nova_cell0/instances.ibd<br>
nova_cell0/instance_system_metadata.ibd<br>
octavia/amphora.ibd<br>
nova_api/instance_mappings.ibd<br>
nova_api/request_specs.ibd<br>
<br>
My first approach would be to update the nova_cell0.instances table  <br>
and edit the fields 'vm_state' and 'task_state', or even remove the  <br>
intire row. But I don't know about the implications this would have on  <br>
the other tables, so I'd like to know how you would recommend to deal  <br>
with these orphans. Any comment is appreciated!<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Just a simple thing : reset their states.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
Eugen<br>
<br>
<br>
</blockquote></div></div></div>