<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 23, 2020 at 3:19 PM Sean Mooney <<a href="mailto:smooney@redhat.com">smooney@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 2020-09-23 at 14:59 +0200, Massimo Sgaravatto wrote:<br>
> From time to time (in particular where there are problems with the Rabbit<br>
> cluster) I also see this problem. In such cases I "mark" the instance as<br>
> deleted in the database. I don't know if there are cleaner solutions<br>
> <br>
> Cheers, Massimo<br>
> <br>
> [*]<br>
> update instances set deleted=1 where uuid="<vm-uuid>";<br>
this is not how you mark a vm as deleted.<br>
you set deleted=id not 1<br>
<br></blockquote><div><br></div><div>I (wongly) thought that any number different than 0 was fine</div><div>What is the 'id' that should be specified ?</div><div><br></div><div>Thanks, Massimo</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> On Tue, Sep 22, 2020 at 7:35 AM Szabo, Istvan (Agoda) <<br>
> <a href="mailto:Istvan.Szabo@agoda.com" target="_blank">Istvan.Szabo@agoda.com</a>> wrote:<br>
> <br>
> > The problem is that in opestack you can't find this vm if I want to delete:<br>
> > <br>
> > <br>
> > nova reset-state 94ab55d3-3e39-48d3-a9b2-505838ceb6e7 --active<br>
> > Reset state for server 94ab55d3-3e39-48d3-a9b2-505838ceb6e7 failed: No<br>
> > server with a name or ID of '94ab55d3-3e39-48d3-a9b2-505838ceb6e7' exists.<br>
> > ERROR (CommandError): Unable to reset the state for the specified<br>
> > server(s).<br>
> > <br>
> > <br>
> > openstack server delete 94ab55d3-3e39-48d3-a9b2-505838ceb6e7<br>
> > No server with a name or ID of '94ab55d3-3e39-48d3-a9b2-505838ceb6e7'<br>
> > exists.<br>
> > <br>
> > <br>
> > nova force-delete 94ab55d3-3e39-48d3-a9b2-505838ceb6e7<br>
> > ERROR (CommandError): No server with a name or ID of<br>
> > '94ab55d3-3e39-48d3-a9b2-505838ceb6e7' exists.<br>
> > <br>
> > <br>
> > openstack server delete hk-qaciapp-2020<br>
> > No server with a name or ID of 'hk-qaciapp-2020' exists.<br>
> > <br>
> > <br>
> > But if I list it like this can see:<br>
> > <br>
> > openstack server list --all-projects --long --limit -1 | grep<br>
> > 94ab55d3-3e39-48d3-a9b2-505838ceb6e7<br>
> > > 94ab55d3-3e39-48d3-a9b2-505838ceb6e7 | hk-qaciapp-2020<br>
> > <br>
> > | BUILD | scheduling | NOSTATE |<br>
> > | CentOS-7-x86_64-1511 (14.11.2017) |<br>
> > 2caaef01-e2f9-4e93-961a-c2b2d4a6be82 | QA_VLAN62 | None |<br>
> > <br>
> > <br>
> > :/<br>
> > <br>
> > <br>
> > It was created with the api before, maybe should try to delete with the<br>
> > API? Not sure :/<br>
> > <br>
> > ________________________________<br>
> > From: Ignazio Cassano <<a href="mailto:ignaziocassano@gmail.com" target="_blank">ignaziocassano@gmail.com</a>><br>
> > Sent: Tuesday, September 22, 2020 12:21 PM<br>
> > To: Szabo, Istvan (Agoda)<br>
> > Cc: openstack-discuss<br>
> > Subject: Re: Can't delete a vm<br>
> > <br>
> > Email received from outside the company. If in doubt don't click links nor<br>
> > open attachments!<br>
> > ________________________________<br>
> > Hello, before feeling instance, try to use nova reset-state to change the<br>
> > state of in instance to available.<br>
> > Then try to remove.<br>
> > Ignazio<br>
> > <br>
> > Il Mar 22 Set 2020, 06:43 Szabo, Istvan (Agoda) <<a href="mailto:Istvan.Szabo@agoda.com" target="_blank">Istvan.Szabo@agoda.com</a><br>
> > <mailto:<a href="mailto:Istvan.Szabo@agoda.com" target="_blank">Istvan.Szabo@agoda.com</a>>> ha scritto:<br>
> > Hello,<br>
> > <br>
> > <br>
> > I have vm which is stuck in the build phase:<br>
> > <br>
> > <br>
> > openstack server list --all-projects --long --limit -1 | grep<br>
> > 94ab55d3-3e39-48d3-a9b2-505838ceb6e7<br>
> > | 94ab55d3-3e39-48d3-a9b2-505838ceb6e7 |<br>
> > hk-qaciapp-2020 | BUILD | scheduling | NOSTATE<br>
> > | | CentOS-7-x86_64-1511<br>
> > (14.11.2017) | 2caaef01-e2f9-4e93-961a-c2b2d4a6be82 | QA_VLAN62<br>
> > | None<br>
> > <br>
> > <br>
> > I've tried to delete with openstack server delete, nova delete force,<br>
> > restarted the nova services on all management nodes, restarted the nova<br>
> > compute service where it was originally spawned but still visible.<br>
> > <br>
> > <br>
> > I see in the database in couple of places either the id and either the<br>
> > hostname, like in instance mapping table, instances table, nova_cell0<br>
> > database ...<br>
> > <br>
> > <br>
> > I have an idea how to delete, so I'd spawn just a vm and check which<br>
> > tables are created the entries, and I would go through all tables with the<br>
> > problematic one and delete 1 by 1 but this will takes me hours ....<br>
> > <br>
> > Any faster way you might suggest me please?<br>
> > <br>
> > <br>
> > Thank you<br>
> > <br>
> > <br>
> > ________________________________<br>
> > This message is confidential and is for the sole use of the intended<br>
> > recipient(s). It may also be privileged or otherwise protected by copyright<br>
> > or other legal rules. If you have received it by mistake please let us know<br>
> > by reply email and delete it from your system. It is prohibited to copy<br>
> > this message or disclose its content to anyone. Any confidentiality or<br>
> > privilege is not waived or lost by any mistaken delivery or unauthorized<br>
> > disclosure of the message. All messages sent to and from Agoda may be<br>
> > monitored to ensure compliance with company policies, to protect the<br>
> > company's interests and to remove potential malware. Electronic messages<br>
> > may be intercepted, amended, lost or deleted, or contain viruses.<br>
> > <br>
> > <br>
> > <br>
<br>
</blockquote></div></div>