Bug 863931

Summary: The lxc guest was hang when stopped the cgconfig service
Product: Red Hat Enterprise Linux 6 Reporter: zhenfeng wang <zhwang>
Component: libvirtAssignee: Daniel Berrangé <berrange>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: acathrow, ajia, dallan, dyasny, dyuan, gsun, mzhan, rwu, yupzhang
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-10 14:38:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhenfeng wang 2012-10-08 06:03:22 UTC
Description of problem:
The guest was hang when stopped the cgconfig service
 
Version-Release number of selected component (if applicable):
libvirt-0.10.2-1.el6.x86_64
qemu-kvm-0.12.1.2-2.316.el6.x86_64
kernel-2.6.32-309.el6.x86_64

How reproducible:
100%
1 prepare the domain xml
# cat lxc.xml
<domain type='lxc'>
  <name>toy</name>
  <uuid>d1f4798b-bebf-d93c-1d97-fe1c1cb7c780</uuid>
  <memory>500000</memory>
  <currentMemory>500000</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64'>exe</type>
    <init>/bin/sh</init>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/libvirt_lxc</emulator>
    <interface type='network'>
      <mac address='52:54:00:25:bf:e9'/>
      <source network='default'/>
    </interface>
    <console type='pty'>
      <target type='lxc' port='0'/>
    </console>
  </devices>
</domain>

2 Define and start lxc guest.
# virsh -c lxc:/// define lxc.xml
# virsh -c lxc:/// start toy
# virsh -c lxc:/// list --all
 Id    Name                           State
----------------------------------------------------
 24294 toy                            running

3 Unmount cgroup 

  # /etc/init.d/cgconfig stop
  # /etc/init.d/cgconfig status
    Stopped
  # lscgroup

4 Then destoy the guest and found that the guest was hang
 # virsh -c lxc:/// destroy toy

5 Restart the libvirtd service and found that the guest was in "shut off" state 
  # /etc/init.d/libvirtd restart
  # virsh -c lxc:/// list --all
  Id    Name                           State
 ----------------------------------------------------
 -     toy                            shut off


Actual results:
The guest was hang when stopped the cgconfig service ,besides the guest was shutoff when restart the libvirtd service

Expected results:
the guest shouldn't be hang when stopped the cgconfig service and the guest should be still in "running"states when restart the libvirtd service 

Additional info

Comment 1 zhenfeng wang 2012-10-08 06:05:08 UTC
As it works on libvirt-0.9.10-21.el6.x86_64, so mark this bug a regression bug.

Comment 4 Jiri Denemark 2012-10-08 12:38:45 UTC
IIUC, it looks like virsh destroy actually destroy the domain (in which case it's just ok to see the domain shut off after restarting libvirtd) but hung in a followup cleanup phase. Could you provide libvirtd debug logs?

Comment 5 Daniel Berrangé 2012-10-10 14:38:43 UTC
I'm pretty certain this is a duplicate of 864336, so closing it

*** This bug has been marked as a duplicate of bug 864336 ***