Merge lp:~nuclearbob/utah/dont-wait-for-booted into lp:utah

Proposed by Max Brustkern
Status: Merged
Merged at revision: 856
Proposed branch: lp:~nuclearbob/utah/dont-wait-for-booted
Merge into: lp:utah
Diff against target: 81 lines (+29/-3)
4 files modified
debian/changelog (+6/-1)
tests/test_rsyslog.py (+14/-0)
utah/provisioning/baremetal/cobbler.py (+3/-1)
utah/provisioning/rsyslog.py (+6/-1)
To merge this branch: bzr merge lp:~nuclearbob/utah/dont-wait-for-booted
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
Max Brustkern (community) Needs Resubmitting
Review via email: mp+157954@code.launchpad.net

Description of the change

This branch temporarily catches exceptions raised when waiting for a system to boot until the associated bugs with this process are fixed.

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) wrote :

looks fine. can you update test_rsyslog.py with a test specific to this?

856. By Max Brustkern

Added test for workaround

Revision history for this message
Max Brustkern (nuclearbob) wrote :

Added a test. Verified that it works with this code but not with the current dev branch.

review: Needs Resubmitting
Revision history for this message
Andy Doan (doanac) :
review: Approve
857. By Max Brustkern

Removed blank line that I think is added in a different merge

858. By Max Brustkern

Adding dummy line that won't match

859. By Max Brustkern

Added changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-04-04 14:58:12 +0000
3+++ debian/changelog 2013-04-10 15:19:26 +0000
4@@ -1,5 +1,6 @@
5 utah (0.10ubuntu1) UNRELEASED; urgency=low
6
7+ [ Javier Collado ]
8 * Return error code on unhandled error (LP: #1160857)
9 * Remove temporary files downloaded based on URL (LP: #1101186)
10 * Stop server on installation failure (LP: #1161855)
11@@ -9,7 +10,11 @@
12 * Use sys.exit when SIGTERM is received (LP: #1160247)
13 * Write syslog pattern matched and timeouts timestamps (LP: #1162862)
14
15- -- Javier Collado <javier.collado@canonical.com> Wed, 27 Mar 2013 13:00:47 +0100
16+ [ Max Brustkern ]
17+ * Temporarily removing exception from wait_for_booted until some
18+ installer bugs are fixed
19+
20+ -- Max Brustkern <max@canonical.com> Wed, 10 Apr 2013 11:17:22 -0400
21
22 utah (0.9.2ubuntu1) quantal; urgency=low
23
24
25=== modified file 'tests/test_rsyslog.py'
26--- tests/test_rsyslog.py 2013-03-29 16:22:16 +0000
27+++ tests/test_rsyslog.py 2013-04-10 15:19:26 +0000
28@@ -202,6 +202,20 @@
29 threading.Thread(target=self.producer, args=(r.port, messages)).start()
30 r.wait_for_booted(steps)
31
32+ def test_booted_workaround(self):
33+ """Test that wait_for_booted doesn't raise an exception on timeout."""
34+ steps = [
35+ {
36+ "message": "test booted",
37+ "pattern": "Wait forever for a line that never comes",
38+ "timeout": 5,
39+ },
40+ ]
41+
42+ r = RSyslog("utah-test", '/tmp')
43+
44+ r.wait_for_booted(steps)
45+
46 def usefile(self, truncate):
47 """
48 minimal test to make sure wait_for_booted works when tailing a file
49
50=== modified file 'utah/provisioning/baremetal/cobbler.py'
51--- utah/provisioning/baremetal/cobbler.py 2013-03-29 15:55:46 +0000
52+++ utah/provisioning/baremetal/cobbler.py 2013-04-10 15:19:26 +0000
53@@ -200,7 +200,9 @@
54 # TODO: wait_for_booted isn't working on d-i installs and
55 # autopilot jobs like:
56 # http://10.97.0.1:8080/view/autopilot/job/ps-unity-autopilot-release-testing/140/label=autopilot-nvidia/
57- # self.rsyslog.wait_for_booted(config.boot_steps)
58+ # For now, it seems to be a problem on all installs, so we're going to
59+ # handle it in rsyslog.py
60+ self.rsyslog.wait_for_booted(config.boot_steps)
61
62 retry(self.sshcheck, logmethod=self.logger.info,
63 retry_timeout=config.checktimeout)
64
65=== modified file 'utah/provisioning/rsyslog.py'
66--- utah/provisioning/rsyslog.py 2013-04-03 09:38:49 +0000
67+++ utah/provisioning/rsyslog.py 2013-04-10 15:19:26 +0000
68@@ -127,7 +127,12 @@
69 """
70 logfile = '{}/{}-boot.log'.format(self._logpath, self._host)
71 callbacks = {}
72- self._wait_for_steps(steps, logfile, callbacks)
73+ # TODO: Resolve the issues around this and get it back to normal
74+ # i.e. LP#1100386
75+ try:
76+ self._wait_for_steps(steps, logfile, callbacks)
77+ except UTAHException as err:
78+ self.logger.warning('Timed out waiting for boot, but continuing')
79
80 def _wait_for_steps(self, steps, logfile, callbacks):
81 with open(logfile, 'w') as f:

Subscribers

People subscribed via source and target branches