lxc-start-ephemeral suppresses command exit status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
Low
|
William Grant | ||
Precise |
Fix Released
|
Low
|
Unassigned |
Bug Description
=======
SRU Justification:
1. Impact: lxc-start-ephemeral return status does not reflect the return status of the command it executed.
2. Development fix: when the child successfully starts, return its return value.
3. Stable fix: same as development fix
4. Test case:
1. sudo lxc-create -t ubuntu -n p1
2. sudo lxc-start-ephemeral -o p1 -- /bin/false
3. echo $? # - this should return 1, not 0.
5. Regression potential: the change is convined to lxc-start-
regressions should not affect any other functionality.
=======
lxc-start-ephemeral supports executing a command directly, but always exits 0 rather than using the command's status, causing errors to go unnoticed when used programmatically.
Related branches
- Ubuntu branches: Pending requested
-
Diff: 69 lines (+12/-13)2 files modifieddebian/changelog (+5/-1)
debian/local/lxc-start-ephemeral (+7/-12)
description: | updated |
Changed in lxc (Ubuntu Precise): | |
importance: | Undecided → High |
status: | New → In Progress |
importance: | High → Low |
This bug was fixed in the package lxc - 0.8.0~rc1-4ubuntu34
--------------- rc1-4ubuntu34) quantal; urgency=low
lxc (0.8.0~
[ Serge Hallyn ] pclose- errno: help debug pclose failures when lxc runs scripts. clone-name- arg: fix incorrect checking for --name argument. kmsg-to- console: link /dev/kmsg to /dev/console so init log clone-fix- fstab: fix check for lxc.mount in lxc-clone shutdown- fix-doublestop: don't call c->stop() when already lxc/$container/ , so that pre-mount hooks can stage mounts
* 0214-give-
* 0215-lxc-
(LP: #1049914)
* 0216-hook-
messages can be seen. (LP: #1049926)
* 0217-lxc-
(LP: #1049987)
* 0218-api-
stopped (LP: #1050001)
* Update lxc-start-container apparmor abstraction to allow ecryptfs mounts
from the pre-mount script. Remove the instruction to add that line from
the example hook.
* Update lxc-start-container apparmor abstraction to allow mounts to paths
under /var/lib/
there. Also update the mountecryptfs example premount hook to use that.
(LP: #1050469)
* debian/rules: remove parsing of apparmor.in files.
[ Stéphane Graber ] ephemeral.
* Update lxc-start-container apparmor abstraction to allow aufs and overlayfs
mounts from the pre-mount scripts. This is required by some hooks and will
be needed by the new lxc-start-
* Remove multi-arch path in lxc-start-container apparmor abstraction and
instead just allow /usr/lib/*/lxc/ so nested containers running on a
different architecture don't get blocked by apparmor.
* Cherry-pick python-lxc fixes from upstream:
- Minor PEP-8 syntax fix
- Return an exception when getting Container instance as non-root
- Automatically convert any state string passed to wait() to its uppercase
equivalent.
- Replace test.py by a full example of the API.
- Remove zombie handler function from C module as it's no longer required
and causes weird bugs when used with the hooks.
[ William Grant ] ephemeral: exit with the command's status, not always 0.
* lxc-start-
(LP: #1050351)
-- Serge Hallyn <email address hidden> Thu, 13 Sep 2012 12:02:45 -0500