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
=== modified file 'debian/changelog'
--- debian/changelog 2013-04-04 14:58:12 +0000
+++ debian/changelog 2013-04-10 15:19:26 +0000
@@ -1,5 +1,6 @@
1utah (0.10ubuntu1) UNRELEASED; urgency=low1utah (0.10ubuntu1) UNRELEASED; urgency=low
22
3 [ Javier Collado ]
3 * Return error code on unhandled error (LP: #1160857)4 * Return error code on unhandled error (LP: #1160857)
4 * Remove temporary files downloaded based on URL (LP: #1101186)5 * Remove temporary files downloaded based on URL (LP: #1101186)
5 * Stop server on installation failure (LP: #1161855)6 * Stop server on installation failure (LP: #1161855)
@@ -9,7 +10,11 @@
9 * Use sys.exit when SIGTERM is received (LP: #1160247)10 * Use sys.exit when SIGTERM is received (LP: #1160247)
10 * Write syslog pattern matched and timeouts timestamps (LP: #1162862)11 * Write syslog pattern matched and timeouts timestamps (LP: #1162862)
1112
12 -- Javier Collado <javier.collado@canonical.com> Wed, 27 Mar 2013 13:00:47 +010013 [ Max Brustkern ]
14 * Temporarily removing exception from wait_for_booted until some
15 installer bugs are fixed
16
17 -- Max Brustkern <max@canonical.com> Wed, 10 Apr 2013 11:17:22 -0400
1318
14utah (0.9.2ubuntu1) quantal; urgency=low19utah (0.9.2ubuntu1) quantal; urgency=low
1520
1621
=== modified file 'tests/test_rsyslog.py'
--- tests/test_rsyslog.py 2013-03-29 16:22:16 +0000
+++ tests/test_rsyslog.py 2013-04-10 15:19:26 +0000
@@ -202,6 +202,20 @@
202 threading.Thread(target=self.producer, args=(r.port, messages)).start()202 threading.Thread(target=self.producer, args=(r.port, messages)).start()
203 r.wait_for_booted(steps)203 r.wait_for_booted(steps)
204204
205 def test_booted_workaround(self):
206 """Test that wait_for_booted doesn't raise an exception on timeout."""
207 steps = [
208 {
209 "message": "test booted",
210 "pattern": "Wait forever for a line that never comes",
211 "timeout": 5,
212 },
213 ]
214
215 r = RSyslog("utah-test", '/tmp')
216
217 r.wait_for_booted(steps)
218
205 def usefile(self, truncate):219 def usefile(self, truncate):
206 """220 """
207 minimal test to make sure wait_for_booted works when tailing a file221 minimal test to make sure wait_for_booted works when tailing a file
208222
=== modified file 'utah/provisioning/baremetal/cobbler.py'
--- utah/provisioning/baremetal/cobbler.py 2013-03-29 15:55:46 +0000
+++ utah/provisioning/baremetal/cobbler.py 2013-04-10 15:19:26 +0000
@@ -200,7 +200,9 @@
200 # TODO: wait_for_booted isn't working on d-i installs and200 # TODO: wait_for_booted isn't working on d-i installs and
201 # autopilot jobs like:201 # autopilot jobs like:
202 # http://10.97.0.1:8080/view/autopilot/job/ps-unity-autopilot-release-testing/140/label=autopilot-nvidia/202 # http://10.97.0.1:8080/view/autopilot/job/ps-unity-autopilot-release-testing/140/label=autopilot-nvidia/
203 # self.rsyslog.wait_for_booted(config.boot_steps)203 # For now, it seems to be a problem on all installs, so we're going to
204 # handle it in rsyslog.py
205 self.rsyslog.wait_for_booted(config.boot_steps)
204206
205 retry(self.sshcheck, logmethod=self.logger.info,207 retry(self.sshcheck, logmethod=self.logger.info,
206 retry_timeout=config.checktimeout)208 retry_timeout=config.checktimeout)
207209
=== modified file 'utah/provisioning/rsyslog.py'
--- utah/provisioning/rsyslog.py 2013-04-03 09:38:49 +0000
+++ utah/provisioning/rsyslog.py 2013-04-10 15:19:26 +0000
@@ -127,7 +127,12 @@
127 """127 """
128 logfile = '{}/{}-boot.log'.format(self._logpath, self._host)128 logfile = '{}/{}-boot.log'.format(self._logpath, self._host)
129 callbacks = {}129 callbacks = {}
130 self._wait_for_steps(steps, logfile, callbacks)130 # TODO: Resolve the issues around this and get it back to normal
131 # i.e. LP#1100386
132 try:
133 self._wait_for_steps(steps, logfile, callbacks)
134 except UTAHException as err:
135 self.logger.warning('Timed out waiting for boot, but continuing')
131136
132 def _wait_for_steps(self, steps, logfile, callbacks):137 def _wait_for_steps(self, steps, logfile, callbacks):
133 with open(logfile, 'w') as f:138 with open(logfile, 'w') as f:

Subscribers

People subscribed via source and target branches