lxc-start exits success on failure when non-root in daemon mode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
$ sudo lxc-create -t ubuntu -n lv1
$ lxc-start -n lv1 -d
$ echo $?
0
$ lxc-ls
lv1
$ lxc-list
RUNNING
STOPPED
lv1
I would have expected an error message when trying to start a container that I did not have acl to start.
instead, lxc-start exited success (0) and gave no output.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: lxc 0.7.5-3ubuntu5
ProcVersionSign
Uname: Linux 3.2.0-8-virtual x86_64
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Wed Jan 18 18:11:17 2012
Ec2AMI: ami-0000012b
Ec2AMIManifest: FIXME
Ec2Availability
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
summary: |
- lxc-start exits success on failure when non-root + lxc-start exits success on failure when non-root in daemon mode |
Another (likely related) issue, after using sudo to start the container, observe:
$ lxc-ls cgroup/ cpuset/ //lxc: Permission denied
lv1
$ sudo lxc-start -n lv1 -d
$ lxc-ls
lv1
/usr/bin/lxc-ls: line 35: cd: /sys/fs/
ls: cannot access lv1: No such file or directory
$ sudo lxc-ls
lv1
lv1
$ sudo lxc-list
RUNNING
lv1
STOPPED
So, as it is now after starting the container 'sudo lxxc-ls' shows 2 containers, but 'lxc-ls' (without sudo) shows annoying messages.