RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1140215 - systemctl daemon-reload + any service restart wipes libvirt cgroups
Summary: systemctl daemon-reload + any service restart wipes libvirt cgroups
Keywords:
Status: CLOSED DUPLICATE of bug 1139223
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-10 13:52 UTC by Fabrice A. Marie
Modified: 2014-10-17 08:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 08:08:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1139223 0 urgent CLOSED /sys/fs/cgroup/cpu,cpuacct/machine.slice disappears after systemctl daemon-reload 2021-02-22 00:41:40 UTC

Description Fabrice A. Marie 2014-09-10 13:52:21 UTC
Description of problem:
After a 'systemctl daemon-reload' followed by any service 'systemctl restart xxx' the machine.slice cgroup directory disappear from /sys/fs/cgroup/memory and
other cgroup controllers. 

Steps to Reproduce:
1. Create and launch a basic VM
2. Check that the cgroups are mapped properly for example with 'virsh memtune VM_NAME'
3. Execute 'systemctl daemon-reload'
4. Restart _any_ service on your machine

Actual results:
error: Unable to get memory parameters11
error: Unable to read from '/sys/fs/cgroup/memory/machine.slice/machine-qemu\x2dmyvm.scope/memory.limit_in_bytes': No such file or directory


Expected results:
hard_limit     : unlimited
soft_limit     : unlimited
swap_hard_limit: unlimited


Additional info:

1- The cgroup are fine after systemctl daemon-reload (slight difference with bug# 1139223 here)
2- Only when we restart any service do they disappear.
Bellow for example I demonstrate this by restarting rngd and postfix services.


# virsh list
 Id    Name                           State
----------------------------------------------------
 2     myvm                          running

# virsh memtune myvm
hard_limit     : unlimited
soft_limit     : unlimited
swap_hard_limit: unlimited

# systemctl daemon-reload

# systemctl restart rngd.service

# virsh memtune myvm
error: Unable to get memory parameters11
error: Unable to read from '/sys/fs/cgroup/memory/machine.slice/machine-qemu\x2dmyvm.scope/memory.limit_in_bytes': No such file or directory




# virsh destroy myvm
Domain myvm destroyed

# virsh start myvm
Domain myvm started




# virsh memtune myvm
hard_limit     : unlimited
soft_limit     : unlimited
swap_hard_limit: unlimited

# ls -la /sys/fs/cgroup/memory/machine.slice/machine-qemu\\x2dmyvm.scope/memory.limit_in_bytes
-rw-r--r--. 1 root root 0 Sep 10 21:25 /sys/fs/cgroup/memory/machine.slice/machine-qemu\x2dmyvm.scope/memory.limit_in_bytes

# systemctl daemon-reload

# ls -la /sys/fs/cgroup/memory/machine.slice/machine-qemu\\x2dmyvm.scope/memory.limit_in_bytes
-rw-r--r--. 1 root root 0 Sep 10 21:25 /sys/fs/cgroup/memory/machine.slice/machine-qemu\x2dmyvm.scope/memory.limit_in_bytes

# systemctl restart postfix.service

# ls -la /sys/fs/cgroup/memory/machine.slice/machine-qemu\\x2dmyvm.scope/memory.limit_in_bytes
ls: cannot access /sys/fs/cgroup/memory/machine.slice/machine-qemu\x2dmyvm.scope/memory.limit_in_bytes: No such file or directory

# virsh memtune myvm
error: Unable to get memory parameters
error: Unable to read from '/sys/fs/cgroup/memory/machine.slice/machine-qemu\x2dmyvm.scope/memory.limit_in_bytes': No such file or directory

Hope this helps.
-Fabrice.

Comment 2 Lukáš Nykrýn 2014-10-17 08:08:24 UTC

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


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