RE: [openstack] [Nova] Instance automatically got shutdown
Hi, Sorry for mistake. I corrected the subject line. Thanks Rony -----Original Message----- From: Slawomir Kaplonski [mailto:skaplons@redhat.com] Sent: Wednesday, January 30, 2019 2:55 PM To: rony.khan@brilliant.com.bd Cc: openstack-discuss@lists.openstack.org Subject: Re: [openstack] [Neutron] Instance automatically got shutdown Hi, Why You tagged „Neutron” in topic? IMO it’s some issue related to Nova rather than Neutron.
Wiadomość napisana przez Md. Farhad Hasan Khan <rony.khan@brilliant.com.bd> w dniu 30.01.2019, o godz. 05:07:
Hi, we are getting Openstack instance automatically shut down. Instance not shut down from horizon/cli & from inside instance. This is happening randomly in our environment. Please help us to solve this.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cat /etc/nova/nova.conf
[DEFAULT] sync_power_state_interval=-1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is log:
[root@compute2 ~]# cat /var/log/nova/nova-compute.log |grep 4e143f50-49d4-40c9-b80e-c99dfe45d9d4 2019-01-30 08:06:18.750 417615 INFO nova.compute.manager [-] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] VM Stopped (Lifecycle Event) 2019-01-30 08:06:18.855 417615 INFO nova.compute.manager [req-c2b7b111-e124-4aac-8971-59c3f840bacc - - - - -] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] During _sync_instance_power_state the DB power_state (1) does not match the vm_power_state from the hypervisor (4). Updating power_state in the DB to match the hypervisor. 2019-01-30 08:06:19.027 417615 WARNING nova.compute.manager [req-c2b7b111-e124-4aac-8971-59c3f840bacc - - - - -] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] Instance shutdown by itself. Calling the stop API. Current vm_state: active, current task_state: None, original DB power_state: 1, current VM power_state: 4 2019-01-30 08:06:19.376 417615 INFO nova.compute.manager [req-c2b7b111-e124-4aac-8971-59c3f840bacc - - - - -] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] Instance is already powered off in the hypervisor when stop is called. 2019-01-30 08:06:19.441 417615 INFO nova.virt.libvirt.driver [req-c2b7b111-e124-4aac-8971-59c3f840bacc - - - - -] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] Instance already shutdown. 2019-01-30 08:06:19.445 417615 INFO nova.virt.libvirt.driver [-] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] Instance destroyed successfully.
Thanks & B’Rgds, Rony
— Slawek Kaplonski Senior software engineer Red Hat
On Wed, 2019-01-30 at 19:20 +0600, Md. Farhad Hasan Khan wrote:
Hi, Sorry for mistake. I corrected the subject line. dont worry about it :)
have you checked that the instace was not killed by the kernel OOM reaper. the log snipit show that nova recived an instance lifecyle event from libvirt statign the vm was stoped so it just updated the db. the other way this could happen if if the guest just ran sudo poweroff.
Thanks Rony
-----Original Message----- From: Slawomir Kaplonski [mailto:skaplons@redhat.com] Sent: Wednesday, January 30, 2019 2:55 PM To: rony.khan@brilliant.com.bd Cc: openstack-discuss@lists.openstack.org Subject: Re: [openstack] [Neutron] Instance automatically got shutdown
Hi,
Why You tagged „Neutron” in topic? IMO it’s some issue related to Nova rather than Neutron.
Wiadomość napisana przez Md. Farhad Hasan Khan <rony.khan@brilliant.com.bd> w dniu 30.01.2019, o godz. 05:07:
Hi, we are getting Openstack instance automatically shut down. Instance not shut down from horizon/cli & from inside instance. This is happening randomly in our environment. Please help us to solve this.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cat /etc/nova/nova.conf
[DEFAULT] sync_power_state_interval=-1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is log:
[root@compute2 ~]# cat /var/log/nova/nova-compute.log |grep 4e143f50-49d4-40c9-b80e-c99dfe45d9d4 2019-01-30 08:06:18.750 417615 INFO nova.compute.manager [-] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] VM Stopped (Lifecycle Event) 2019-01-30 08:06:18.855 417615 INFO nova.compute.manager [req-c2b7b111-e124-4aac-8971-59c3f840bacc - - - - -] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] During _sync_instance_power_state the DB power_state (1) does not match the vm_power_state from the hypervisor (4). Updating power_state in the DB to match the hypervisor. 2019-01-30 08:06:19.027 417615 WARNING nova.compute.manager [req-c2b7b111-e124-4aac-8971-59c3f840bacc - - - - -] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] Instance shutdown by itself. Calling the stop API. Current vm_state: active, current task_state: None, original DB power_state: 1, current VM power_state: 4 2019-01-30 08:06:19.376 417615 INFO nova.compute.manager [req-c2b7b111-e124-4aac-8971-59c3f840bacc - - - - -] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] Instance is already powered off in the hypervisor when stop is called. 2019-01-30 08:06:19.441 417615 INFO nova.virt.libvirt.driver [req-c2b7b111-e124-4aac-8971-59c3f840bacc - - - - -] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] Instance already shutdown. 2019-01-30 08:06:19.445 417615 INFO nova.virt.libvirt.driver [-] [instance: 4e143f50-49d4-40c9-b80e-c99dfe45d9d4] Instance destroyed successfully.
Thanks & B’Rgds, Rony
— Slawek Kaplonski Senior software engineer Red Hat
On 1/30/2019 7:39 AM, Sean Mooney wrote:
have you checked that the instace was not killed by the kernel OOM reaper.
the log snipit show that nova recived an instance lifecyle event from libvirt statign the vm was stoped so it just updated the db.
the other way this could happen if if the guest just ran sudo poweroff.
Good things to investigate. I see the sync_power_state_interval periodic is already disabled so it has to be something with life cycle events from libvirt. There is another configuration option if you really need to use it to disable handling of life cycle events from libvirt: https://docs.openstack.org/nova/latest/configuration/config.html#workarounds... -- Thanks, Matt
participants (3)
-
Matt Riedemann
-
Md. Farhad Hasan Khan
-
Sean Mooney