Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 958367 - [vdsm] prepareForShutdown is not called when connection to libvirt is broken [with no running vms]
[vdsm] prepareForShutdown is not called when connection to libvirt is broken ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm (Show other bugs)
3.1.3
x86_64 Unspecified
unspecified Severity high
: ---
: 3.3.0
Assigned To: Mooli Tayer
Martin Pavlik
infra
: Triaged
: 1022021 (view as bug list)
Depends On: 981974
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-01 03:47 EDT by Elad
Modified: 2016-02-10 14:31 EST (History)
11 users (show)

See Also:
Fixed In Version: is8
Doc Type: Bug Fix
Doc Text:
When VDSM's connection to libvirt was broken, VDSM did not initiate the shutting down of the hosts when there were no running virtual machines. This update removes the clientIF instance dependency from libvirtconnection, and sends a SIGTERM to the VDSM process which triggers the host shutdown.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-21 11:06:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
vdsm.log and libvirtd.log (822.33 KB, application/x-gzip)
2013-05-01 03:47 EDT, Elad
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 16393 None None None Never
Red Hat Product Errata RHBA-2014:0040 normal SHIPPED_LIVE vdsm bug fix and enhancement update 2014-01-21 15:26:21 EST

  None (edit)
Description Elad 2013-05-01 03:47:15 EDT
Created attachment 742108 [details]
vdsm.log and libvirtd.log

Description of problem:

When connection to libvirt is broken, vdsm do not initiate prepareForShutdown. This happens when there are no running vms on that host.

Version-Release number of selected component (if applicable):

vdsm-4.10.2-16.0.el6ev.x86_64
libvirt-0.10.2-18.el6_4.4.x86_64


How reproducible:
100%

Steps to Reproduce:

on host that do not run any vms:

1. kill libvirt with sig abort:      #kill -6 (libvirt_pid)
2. run 'vdsClient -s 0 getVdsCaps' 
  
Actual results:

host answers to with getVdsCaps with 'unexpected exception'
vdsm still answer to getVdsStats, which implies that he won't enter 'non-responsive' and will not initiate prepareForShutdown.  


Expected results:

host should initiate prepareForShutdown as he does with running vms.


Additional info: see logs attached
Comment 1 Dan Kenigsberg 2013-05-01 08:02:25 EDT
This issue has been with us since rhev-3.0. rhev-3.2 is now closed for such improvements. requesting rhev-3.3.
Comment 3 Mooli Tayer 2013-07-03 07:38:57 EDT
I Created a patch that makes sure prepareForShutdown is called whenever libvirt connection is broken, this is done by killing the vdsm process.

However there is still a problem with the above scenario:
vdsm coming after prepareForShutdown does not restart libvirt.

It seems that in our service we take for-granted that once we start libvirt service it should respawn itsel which it does not. this could be due to a libvirt bug, change or behaviour or mybe our assumption is wrong.

Will investigate further.
Comment 4 Mooli Tayer 2013-07-03 09:23:16 EDT
Tested downstream - libvirt re-spawns just fine.  
(libvirt version:0.10.2, vdsm version:4.10.2)
Comment 5 Martin Pavlik 2013-10-22 10:10:04 EDT
*** Bug 1022021 has been marked as a duplicate of this bug. ***
Comment 7 Martin Pavlik 2013-10-22 11:00:26 EDT
works in is20

[root@dell-r210ii-06 ~]# rpm -q vdsm
vdsm-4.13.0-0.3.beta1.el6ev.x86_64

[root@dell-r210ii-06 ~]# rpm -q libvirt
libvirt-0.10.2-29.el6.x86_64

[root@dell-r210ii-06 ~]# date && pgrep libvirt && pkill -6 libvirt && sleep 5 && date && pgrep libvirt 
Tue Oct 22 16:42:45 CEST 2013
15092
Tue Oct 22 16:42:50 CEST 2013
15174

[root@dell-r210ii-06 ~]# vdsClient -s 0 getVdsCapsUnexpected exception

[root@dell-r210ii-06 ~]# date
Tue Oct 22 16:43:10 CEST 2013

[root@dell-r210ii-06 ~]# vdsClient -s 0 getVdsCaps
	HBAInventory = {'FC': [], 'iSCSI': [{'InitiatorName': 'iqn.1994-05.com.redhat:d5e5b4cb74d'}]}
	ISCSIInitiatorName = 'iqn.1994-05.com.redhat:d5e5b4cb74d'
	bondings = {'bond0': {'addr': '',
....
Comment 8 Charlie 2013-11-27 19:33:50 EST
This bug is currently attached to errata RHBA-2013:15291. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to 
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.
Comment 9 errata-xmlrpc 2014-01-21 11:06:54 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0040.html

Note You need to log in before you can comment on or make changes to this bug.