Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675540 - app-emulation/lxc-3.1.0 init script does not report correct status on start
Summary: app-emulation/lxc-3.1.0 init script does not report correct status on start
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Virgil Dupras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-15 19:15 UTC by Daniel M. Weeks
Modified: 2019-04-22 14:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix using lxc-info (file_675540.txt,3.71 KB, text/plain)
2019-01-29 17:33 UTC, stefan00
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel M. Weeks 2019-01-15 19:15:52 UTC
With lxc-3.1.0 and kernel 4.14.83-gentoo:

Starting an lxc container always reports that it was not started even it was successful. This comes down to these checks in the init script:

[ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]
eend $?

On this system the lxc directory is not present and instead is split into lxc.payload and lxc.monitor.

Reproducible: Always
Comment 1 stefan00 2019-01-29 16:24:54 UTC
confirmed here. init script is unusable with lxc 3.1
Comment 2 stefan00 2019-01-29 17:33:48 UTC
Created attachment 563238 [details]
fix using lxc-info

Using LXC-INFO instead of looking up the proc dir works.

Also, please note the changed -t (time out) value for LXC-STOP. The initial gentoo value of 1 second is to short for maybe large / busy containers. LXC-STOP will anyway return immediately after successful shutdown. The "-t " option adds a timeout and after that, SIGKILL is send to the container.
Comment 3 Larry the Git Cow gentoo-dev 2019-04-22 14:49:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=681c0364b0b3877c811e0db49bf4c55d7103d1cd

commit 681c0364b0b3877c811e0db49bf4c55d7103d1cd
Author:     Alexey Shvetsov <alexxy@gentoo.org>
AuthorDate: 2019-04-22 14:48:41 +0000
Commit:     Alexey Shvetsov <alexxy@gentoo.org>
CommitDate: 2019-04-22 14:48:41 +0000

    app-emulation/lxc: Fix init.d
    
    Closes: https://bugs.gentoo.org/675540
    Package-Manager: Portage-2.3.64, Repoman-2.3.12
    Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>

 app-emulation/lxc/files/lxc.initd.8                | 131 +++++++++++++++++++++
 .../lxc/{lxc-3.1.0.ebuild => lxc-3.1.0-r1.ebuild}  |   4 +-
 2 files changed, 133 insertions(+), 2 deletions(-)