Bug 730428

Summary: libvirt lost SIGHUP reloading behavior
Product: Red Hat Enterprise Linux 6 Reporter: Eric Blake <eblake>
Component: libvirtAssignee: Osier Yang <jyang>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.2CC: dallan, dyuan, mzhan, rwu, veillard, whuang, ydu
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.9.4-4.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 11:26:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Eric Blake 2011-08-12 21:24:38 UTC
Description of problem:
In the rebase to newer virNetServer, the libvirtd daemon accidentally lost its ability to react to SIGHUP as a clue to reload state.

Version-Release number of selected component (if applicable):
libvirt-0.9.4-2.el6

How reproducible:
100%

Steps to Reproduce:
1. killall -SIGHUP libvirtd
2.
3.
  
Actual results:
no state reload

Expected results:
state reload should happen

Additional info:
See upstream bug report:
https://www.redhat.com/archives/libvir-list/2011-August/msg00518.html
regression introduced by upstream commit df0b57a95a.

Comment 1 Daniel Veillard 2011-08-15 07:25:55 UTC
Patch sent upstream:

https://www.redhat.com/archives/libvir-list/2011-August/msg00561.html

Daniel

Comment 2 Daniel Veillard 2011-08-15 07:53:35 UTC
Upstream commit 9e093f0b4cc5a5fc455a4893d73dc0f2c5355161

Daniel

Comment 5 dyuan 2011-08-16 09:55:15 UTC
Test result for libvirt-0.9.4-2.el6
# service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]

# virsh list --all
 Id Name                 State
----------------------------------
  - rhel6                shut off

# kill -SIGHUP `pidof libvirtd`

# ps aux|grep libvirtd

# virsh list --all
error: Failed to reconnect to the hypervisor
error: no valid connection
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused

# service libvirtd status
libvirtd dead but pid file exists


==============
Tested with libvirt-0.9.4-4.el6.

# virsh list --all
 Id Name                 State
----------------------------------
  - dom                  shut off

# ls /var/run/libvirt/qemu/
dom.pid
# ls /etc/libvirt/qemu
dom.xml  networks

# cp dom-create.xml /etc/libvirt/qemu

# kill -SIGHUP `pidof libvirtd`

# virsh list --all
 Id Name                 State
----------------------------------
  - dom                  shut off
  - dom-create           shut off

# ls /etc/libvirt/qemu
dom-create.xml  dom.xml  networks

======
repeat the "kill -SIGHUP"

# virsh list --all
 Id Name                 State
----------------------------------
  - dom                  shut off
  - dom-create           shut off
  - dom-create           shut off

start the dom-create
# virsh start dom-create
Domain dom-create started

# virsh list --all
 Id Name                 State
----------------------------------
  2 dom-create           running
  - dom                  shut off
  - dom-create           running

# ls /var/run/libvirt/qemu/
dom-create.pid  dom-create.xml  dom.pid
# ls /etc/libvirt/qemu
dom-create.xml  dom.xml  networks

======
repeat the "kill -SIGHUP"

# virsh list --all
 Id Name                 State
----------------------------------
  2 dom-create           running
  - dom                  shut off
  - dom-create           running
  - dom-create           running

# ls /var/run/libvirt/qemu/
dom-create.pid  dom-create.xml  dom.pid
# ls /etc/libvirt/qemu
dom-create.xml  dom.xml  networks

Comment 6 Osier Yang 2011-08-16 10:09:00 UTC
> ======
> repeat the "kill -SIGHUP"
> 
> # virsh list --all
>  Id Name                 State
> ----------------------------------
>   2 dom-create           running
>   - dom                  shut off
>   - dom-create           running
>   - dom-create           running
> 
> # ls /var/run/libvirt/qemu/
> dom-create.pid  dom-create.xml  dom.pid
> # ls /etc/libvirt/qemu
> dom-create.xml  dom.xml  networks

Please file a new bug for this, we have problem on virStateReload, regardless of whether the SIGHUP handling is supported or not.

Comment 7 dyuan 2011-08-16 10:15:07 UTC
Verified this bug as SIGHUP can reload the status now.
File a new bug 730937 to track the issue in comment 5.

Comment 8 errata-xmlrpc 2011-12-06 11:26:27 UTC
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-2011-1513.html