Bug 1175234
| Summary: | virDomainGetSchedulerParameters() fails with Unable to read from '/sys/fs/cgroup/cpu,cpuacct/machine.slice/machine-qemu\x2dMic2.scope/cpu.shares': No such file or directory | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Martin Sivák <msivak> | ||||
| Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | urgent | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.0 | CC: | bazulay, berrange, dfediuck, dyuan, ecohen, gklein, ibarkan, iheim, jdenemar, lpeer, lsurette, mburman, mpavlik, oourfali, ovasik, rbalakri, Rhev-m-bugs, sherold, shyu, yeylon | ||||
| Target Milestone: | rc | Keywords: | TestOnly | ||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | sla | ||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | 1156399 | Environment: | |||||
| Last Closed: | 2015-03-05 07:48:18 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: | |||||||
| Bug Depends On: | 1139223 | ||||||
| Bug Blocks: | 1156399 | ||||||
| Attachments: |
|
||||||
|
Description
Martin Sivák
2014-12-17 10:54:35 UTC
mpavlik: Can you please add the versions of libvirt and systemd here? I suspect that it is related to those two components somehow. This is probably just another case of systemd deleting libvirt's cgroups https://bugzilla.redhat.com/show_bug.cgi?id=1139223 libvirt-daemon-1.1.1-29.el7_0.3.x86_64 systemd-python-208-11.el7_0.5.x86_64 Created attachment 970071 [details]
relevant logs
I think comment 3 is right if node was freshly booted vNIC could be linked down and up, after vdsm restart problem occured Thread-19::ERROR::2014-12-17 12:43:12,404::sampling::475::vm.Vm::(collect) vmId=`32752ba3-ee24-4bd8-931c-d7cf5fe361e7`::Stats function failed: <AdvancedStatsFunction _sampleCpu at 0x2e2a720> Traceback (most recent call last): File "/usr/share/vdsm/virt/sampling.py", line 471, in collect statsFunction() File "/usr/share/vdsm/virt/sampling.py", line 346, in __call__ retValue = self._function(*args, **kwargs) File "/usr/share/vdsm/virt/vm.py", line 303, in _sampleCpu cpuStats = self._vm._dom.getCPUStats(True, 0) File "/usr/share/vdsm/virt/vm.py", line 689, in f ret = attr(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 111, in wrapper ret = f(*args, **kwargs) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2016, in getCPUStats if ret is None: raise libvirtError ('virDomainGetCPUStats() failed', dom=self) libvirtError: unable to get cpu account: Operation not permitted [root@dell-r210ii-06 ~]# rpm -qa | grep libvirt libvirt-python-1.1.1-29.el7_0.3.x86_64 libvirt-daemon-driver-secret-1.1.1-29.el7_0.3.x86_64 libvirt-daemon-driver-qemu-1.1.1-29.el7_0.3.x86_64 libvirt-client-1.1.1-29.el7_0.3.x86_64 libvirt-daemon-driver-nwfilter-1.1.1-29.el7_0.3.x86_64 libvirt-daemon-driver-interface-1.1.1-29.el7_0.3.x86_64 libvirt-lock-sanlock-1.1.1-29.el7_0.3.x86_64 libvirt-daemon-config-nwfilter-1.1.1-29.el7_0.3.x86_64 libvirt-daemon-driver-network-1.1.1-29.el7_0.3.x86_64 libvirt-daemon-1.1.1-29.el7_0.3.x86_64 libvirt-daemon-driver-storage-1.1.1-29.el7_0.3.x86_64 libvirt-daemon-driver-nodedev-1.1.1-29.el7_0.3.x86_64 libvirt-daemon-kvm-1.1.1-29.el7_0.3.x86_64 [root@dell-r210ii-06 ~]# rpm -qa | grep systemd systemd-208-11.el7_0.5.x86_64 systemd-libs-208-11.el7_0.5.x86_64 systemd-sysv-208-11.el7_0.5.x86_64 There should be no libvirt work required once the systemd bug 1139223 is fixed. I can reproduce it with systemd-208-12.el7.x86_64 Steps as below: # rpm -qa|grep systemd systemd-python-208-12.el7.x86_64 systemd-208-12.el7.x86_64 systemd-libs-208-12.el7.x86_64 systemd-sysv-208-12.el7.x86_64 systemd-devel-208-12.el7.x86_64 # rpm -q libvirt libvirt-1.2.8-10.el7.x86_64 1. Start a domain # virsh start rh7 Domain rh7 started 2. Check cgroup dir used by libvirtd ## for i in cpuset cpu,cpuacct memory devices freezer net_cls blkio perf_event;do file /sys/fs/cgroup/$i/machine.slice/machine-qemu\\x2drh7.scope;done /sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/cpu,cpuacct/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/memory/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/devices/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/freezer/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/net_cls/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/blkio/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/perf_event/machine.slice/machine-qemu\x2drh7.scope: directory 3. Reload systemd service and restart libvirtd service # systemctl daemon-reload ;systemctl restart libvirtd.service 4. Check sub cgroup dir used by libvirtd # for i in cpuset cpu,cpuacct memory devices freezer net_cls blkio perf_event;do file /sys/fs/cgroup/$i/machine.slice/machine-qemu\\x2drh7.scope;done /sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/cpu,cpuacct/machine.slice/machine-qemu\x2drh7.scope: cannot open (No such file or directory) /sys/fs/cgroup/memory/machine.slice/machine-qemu\x2drh7.scope: cannot open (No such file or directory) /sys/fs/cgroup/devices/machine.slice/machine-qemu\x2drh7.scope: cannot open (No such file or directory) /sys/fs/cgroup/freezer/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/net_cls/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/blkio/machine.slice/machine-qemu\x2drh7.scope: cannot open (No such file or directory) /sys/fs/cgroup/perf_event/machine.slice/machine-qemu\x2drh7.scope: directory So, sub cgroup blkio devices memory cpu,cpuacct used by libvirtd were deleted when reload systemd Verify this with systemd-208-20.el7.x86_64 1. # rpm -q systemd systemd-208-20.el7.x86_64 2. # virsh start rh7 Domain rh7 started 3. # for i in cpuset cpu,cpuacct memory devices freezer net_cls blkio perf_event;do file /sys/fs/cgroup/$i/machine.slice/machine-qemu\\x2drh7.scope;done /sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/cpu,cpuacct/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/memory/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/devices/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/freezer/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/net_cls/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/blkio/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/perf_event/machine.slice/machine-qemu\x2drh7.scope: directory 4. # systemctl daemon-reload ;systemctl restart libvirtd.service # for i in cpuset cpu,cpuacct memory devices freezer net_cls blkio perf_event;do file /sys/fs/cgroup/$i/machine.slice/machine-qemu\\x2drh7.scope;done /sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/cpu,cpuacct/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/memory/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/devices/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/freezer/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/net_cls/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/blkio/machine.slice/machine-qemu\x2drh7.scope: directory /sys/fs/cgroup/perf_event/machine.slice/machine-qemu\x2drh7.scope: directory 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. https://rhn.redhat.com/errata/RHSA-2015-0323.html |