Bug 1350139 - No valid cgroup for LXC container due to machine name mismatch
Summary: No valid cgroup for LXC container due to machine name mismatch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-26 00:13 UTC by Gregorio Gervasio
Modified: 2016-07-22 15:57 UTC (History)
11 users (show)

Fixed In Version: libvirt-1.3.3.2-1.fc24
Clone Of:
Environment:
Last Closed: 2016-07-22 15:57:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Gregorio Gervasio 2016-06-26 00:13:17 UTC
Description of problem:

After upgrading from F23 to F24, starting an LXC container always results in an error:

# virsh -c lxc:// start --console lallor
error: Failed to start domain lallor
error: internal error: No valid cgroup for machine lallor

Running libvirtd with logging at level 1 shows the following:

2016-06-25 22:12:23.654+0000: 8766: debug : virCgroupValidateMachineGroup:317 : Name 'lxc-8828-lallor.libvirt-lxc' for controller 'cpu' does not match 'lallor', 'lxc-8828-lallor', 'lallor.libvirt-lxc', 'machine-lxc\x2dlallor.scope' or 'machine-lxc\x2d8828\x2dlallor.scope'
2016-06-25 22:12:23.654+0000: 8766: debug : virCgroupNewDetectMachine:1501 : Failed to validate machine name for 'lallor' driver 'lxc'
2016-06-25 22:12:23.654+0000: 8766: error : virLXCProcessStart:1501 : internal error: No valid cgroup for machine lallor


The error goes away when the patch in this message is applied:

https://www.redhat.com/archives/libvir-list/2016-May/msg00401.html


Version-Release number of selected component (if applicable):

libvirt-1.3.3.1-3.fc24.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Start LXC container

Actual results:
Error occurs

Expected results:
No error


Additional info:

Comment 1 Cole Robinson 2016-06-27 18:46:21 UTC
I pushed the commit to the upstream v1.3.3-maint branch now. I'll do a fedora build soon:

commit 7e20f44d8da1634aabec68437854a8810bc28f44
Author: Michal Privoznik <mprivozn>
Date:   Thu May 5 17:35:38 2016 +0200

    virCgroupValidateMachineGroup: Reflect change in CGroup struct naming
    
    Fron c3bd0019c0e on instead of creating the following path for
    cgroups:
    
      /sys/fs/cgroupX/$name.libvirt-$driver
    
    we generate rather more verbose one:
    
      /sys/fs/cgroupX/$driver-$id-$name.libvirt-$driver
    
    where $name is optional and included iff contains allowed chars.
    See original commit for more reasoning. Now, problem with the
    original commit is that we are unable to start any LXC domain
    after it. Because when starting LXC container, the CGroup layout
    is created by our lxc_controller process and then detected and
    validated by libvirtd. The validation is done by trying to match
    detected layout against all the possible patterns for cgroup
    paths that we've ever had. And the commit in question forgot to
    update this part of the code.
    
    Signed-off-by: Michal Privoznik <mprivozn>
    (cherry picked from commit fb377701f253559268e903377707ed3d265823cd)

Comment 2 Fedora Update System 2016-07-19 11:25:07 UTC
libvirt-1.3.3.2-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-65cc608ebe

Comment 3 Fedora Update System 2016-07-20 01:53:36 UTC
libvirt-1.3.3.2-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-65cc608ebe

Comment 4 Fedora Update System 2016-07-22 15:56:47 UTC
libvirt-1.3.3.2-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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