launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #07644
[Merge] lp:~bac/launchpad/lxc-build into lp:launchpad
Brad Crittenden has proposed merging lp:~bac/launchpad/lxc-build into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~bac/launchpad/lxc-build/+merge/104971
= Summary =
launchpad-lxc-build needs to return a non-zero return code on failure
to inform buildbot of the catastrophe.
== Proposed fix ==
Return -1 on failure.
== Pre-implementation notes ==
None.
== Implementation details ==
This change will also be made in lpsetup.
== Tests ==
None
== Demo and Q/A ==
None
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
utilities/setuplxc.py
--
https://code.launchpad.net/~bac/launchpad/lxc-build/+merge/104971
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~bac/launchpad/lxc-build into lp:launchpad.
=== modified file 'utilities/setuplxc.py'
--- utilities/setuplxc.py 2012-05-04 14:44:13 +0000
+++ utilities/setuplxc.py 2012-05-07 20:04:20 +0000
@@ -801,6 +801,7 @@
lxc-start -n {lxcname} -d
lxc-wait -n {lxcname} -s RUNNING
+ exit_code=0
delay=30
while [ "$delay" -gt 0 -a ! -s {leases1} -a ! -s {leases2} ]
do
@@ -830,10 +831,12 @@
echo "could not get IP address - aborting." >&2
echo "content of $LEASES:" >&2
cat $LEASES >&2
+ exit_code=-1
fi
lxc-stop -n {lxcname}
lxc-wait -n {lxcname} -s STOPPED
+ exit $exit_code
""".format(**mapping)))
os.chmod(build_script_file, 0555)
# We need a script to test launchpad using LXC ephemeral instances.
Follow ups