Bug 1238570
Summary: | Libvirt cannot get resource info after restart libvirtd if use custom partitions | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Pei Zhang <pzhang> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | dyuan, mzhan, rbalakri, shyu, xuzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.17-3.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 06:47:52 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
Pei Zhang
2015-07-02 07:48:33 UTC
Fixed upstream with: commit 88f6c007c3fb4324396ec397de57c8a80ba7b31d Author: Peter Krempa <pkrempa> Date: Thu Jul 16 15:35:05 2015 +0200 cgroup: Drop resource partition from virSystemdMakeScopeName The scope name, even according to our docs is "machine-$DRIVER\x2d$VMNAME.scope" virSystemdMakeScopeName would use the resource partition name instead of "machine-" if it was specified thus creating invalid scope paths. This makes libvirt drop cgroups for a VM that uses custom resource partition upon reconnecting since the detected scope name would not match the expected name generated by virSystemdMakeScopeName. The error is exposed by the following log entry: debug : virCgroupValidateMachineGroup:302 : Name 'machine-qemu\x2dtestvm.scope' for controller 'cpu' does not match 'testvm', 'testvm.libvirt-qemu' or 'machine-test-qemu\x2dtestvm.scope' for a "/machine/test" resource and "testvm" vm. v1.2.17-144-g88f6c00 Verified version : libvirt-1.2.17-8.el7.x86_64 qemu-kvm-rhev-2.3.0-22.el7.x86_64 steps: 1.define and start a guest using custome resource partition # virsh dumpxml r70820 | grep resource -A 3 <resource> <partition>/machine/mytest</partition> </resource> 2.get/set resource info set cputune here. # virsh schedinfo r70820 Scheduler : posix cpu_shares : 1024 vcpu_period : 100000 vcpu_quota : -1 emulator_period: 100000 emulator_quota : -1 # virsh schedinfo r70820 --set cpu_shares=2048 Scheduler : posix cpu_shares : 2048 vcpu_period : 100000 vcpu_quota : -1 emulator_period: 100000 emulator_quota : -1 check in cgroup: # cat /sys/fs/cgroup/cpu\,cpuacct/machine.slice/machine-mytest.slice/machine-qemu\\x2dr70820.scope/cpu.shares 2048 3.restart libvirtd ,check value again # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh dumpxml r70820 | grep cputune -A 3 <cputune> <shares>2048</shares> </cputune> <resource> <partition>/machine/mytest</partition> </resource> # virsh schedinfo r70820 Scheduler : posix cpu_shares : 2048 vcpu_period : 100000 vcpu_quota : -1 emulator_period: 100000 emulator_quota : -1 It can get resource value after restart libvirtd. moving to verified. 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/RHBA-2015-2202.html |