Bug 770082 - Guest name icon disappear for lxc running guest when remount cgroup filesystem.
Summary: Guest name icon disappear for lxc running guest when remount cgroup filesystem.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-23 10:21 UTC by Daisy Wu
Modified: 2014-07-06 19:31 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 22:03:16 UTC


Attachments (Terms of Use)

Description Daisy Wu 2011-12-23 10:21:04 UTC
Description of problem:
Guest name icon disappear for lxc running guest when remount cgroup filesystem.

Version-Release number of selected component (if applicable):
libvirt-0.9.4-23.el6.x86_64
qemu-kvm-0.12.1.2-2.211.el6.x86_64

# uname -a
Linux wjw.redhat.com 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
100%

Steps to Reproduce:
1. Prepare a application container guest.
# virsh -c lxc:///
virsh # dumpxml demo
<domain type='lxc'>
  <name>demo</name>
  <uuid>66c3867f-9603-daac-0d1e-48707d549823</uuid>
  <memory>1048576</memory>
  <currentMemory>819200</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>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/libvirt_lxc</emulator>
    <interface type='bridge'>
      <mac address='00:16:3e:ec:b3:7f'/>
      <source bridge='br0'/>
      <target dev='veth0'/>
    </interface>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
  </devices>
</domain>

2. Launch virt-manager and run the guest by virt-manager.
#virt-manager --debug

3. Check the guest status:
#virsh -c lxc:///
virsh # dominfo demo
Id:             17425
Name:           demo
UUID:           66c3867f-9603-daac-0d1e-48707d549823
OS Type:        exe
State:          running
CPU(s):         1
CPU time:       0.0s
Max memory:     1048576 kB
Used memory:    432 kB
Persistent:     yes
Autostart:      disable
Managed save:   unknown

4. Umount the cgroup filesystem:
# /etc/init.d/cgconfig stop
Stopping cgconfig service:                                 [  OK  ]
# /etc/init.d/libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]
# lscgroup
cgroups can't be listed: Cgroup is not mounted

5. Check the guest again:
# virsh -c lxc:///
virsh # dominfo demo
Id:             17425
Name:           demo
UUID:           66c3867f-9603-daac-0d1e-48707d549823
OS Type:        exe
State:          running
CPU(s):         1
Max memory:     1048576 kB
Used memory:    819200 kB
Persistent:     yes
Autostart:      disable
Managed save:   unknown

6. Remount the cgroup filesystem:
# /etc/init.d/cgconfig start
Starting cgconfig service:                                 [  OK  ]
# /etc/init.d/libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]
# lscgroup
cpuset:/
cpuset:/libvirt
cpuset:/libvirt/lxc
cpuset:/libvirt/qemu
cpu:/
cpu:/libvirt
cpu:/libvirt/lxc
cpu:/libvirt/qemu
cpuacct:/
cpuacct:/libvirt
cpuacct:/libvirt/lxc
cpuacct:/libvirt/qemu
memory:/
memory:/libvirt
memory:/libvirt/lxc
memory:/libvirt/qemu
devices:/
devices:/libvirt
devices:/libvirt/lxc
devices:/libvirt/qemu
freezer:/
freezer:/libvirt
freezer:/libvirt/lxc
freezer:/libvirt/qemu
net_cls:/
blkio:/
blkio:/libvirt
blkio:/libvirt/lxc
blkio:/libvirt/qemu

virsh # dominfo demo
Id:             17425
Name:           demo
UUID:           66c3867f-9603-daac-0d1e-48707d549823
OS Type:        exe
Persistent:     yes
Autostart:      disable
Managed save:   unknown

7. Check the guest status by virt-manager, the guest "demo" icon disappear in virt-manager and got the error log:
2011-12-23 18:13:22,776 (connection:1385): Couldn't fetch domain id '17425'
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 1383, in _update_vms
    check_new(vm, uuid)
  File "/usr/share/virt-manager/virtManager/connection.py", line 1367, in check_new
    vm = vmmDomain(self, rawvm, uuid)
  File "/usr/share/virt-manager/virtManager/domain.py", line 175, in __init__
    self._libvirt_init()
  File "/usr/share/virt-manager/virtManager/domain.py", line 216, in _libvirt_init
    self.force_update_status()
  File "/usr/share/virt-manager/virtManager/domain.py", line 1393, in force_update_status
    info = self._backend.info()
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1407, in info
    if ret is None: raise libvirtError ('virDomainGetInfo() failed', dom=self)
libvirtError: internal error Unable to get cgroup for demo


Actual results:
As step7 results.

Expected results:
Guest name icon should not disappear in virt-manager.

Additional info:
If change the guest to under qemu, it works well.

Comment 2 Cole Robinson 2012-02-07 22:03:16 UTC
I think this is basically a won't fix. cgroups are pretty much required for lxc guests: stopping cgroups behind libvirt's back are going to cause problems. And all things considered the error message is fairly descriptive.


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