[Bug 1059943] [NEW] lxc-start-ephemeral masks process exit code

Robert Collins 1059943 at bugs.launchpad.net
Tue Oct 2 02:42:57 UTC 2012


*** This bug is a duplicate of bug 1050351 ***
    https://bugs.launchpad.net/bugs/1050351

Public bug reported:

lxc-start-ephemeral command
e.g. lxc-start-ephemeral run-my-tests

does 'exit 0' after running the command - see handle_container.

This masks the exit code the command provides, and makes rnuning commands via fail in hard to programmatically diagnose ways. ssh, the underlying remote-execution tool used, *does* preserve exit code:
robertc at lifeless-64:~$ ssh -n localhost -- 'exit 1'
robertc at lifeless-64:~$ echo $?
1
robertc at lifeless-64:~$ ssh -n localhost -- 'exit 0'
robertc at lifeless-64:~$ echo $?
0

So it should be very straight forward to capture the exit code and
propogate it out of the script. IIRC our prototype versions did this
implicitly, and its been lost since.

This bugs affects the robustness of the Launchpad test suite under lxc.

** Affects: lxc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1059943

Title:
  lxc-start-ephemeral masks process exit code

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1059943/+subscriptions



More information about the Ubuntu-server-bugs mailing list