Merge lp:~nuclearbob/utah/bug1047366 into lp:utah

Proposed by Max Brustkern
Status: Merged
Merged at revision: 686
Proposed branch: lp:~nuclearbob/utah/bug1047366
Merge into: lp:utah
Diff against target: 14 lines (+3/-1)
1 file modified
utah/provisioning/baremetal/cobbler.py (+3/-1)
To merge this branch: bzr merge lp:~nuclearbob/utah/bug1047366
Reviewer Review Type Date Requested Status
Joe Talbott (community) Approve
Review via email: mp+125315@code.launchpad.net

Description of the change

This branch checks the return code of cobbler commands. If the return code is nonzero, an error will be logged and an exception will be raised. Cobbler often exits with status 0 when a failure has occurred, but this should catch some issues.

To post a comment you must log in.
Revision history for this message
Joe Talbott (joetalbott) wrote :

Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'utah/provisioning/baremetal/cobbler.py'
--- utah/provisioning/baremetal/cobbler.py 2012-08-30 08:34:34 +0000
+++ utah/provisioning/baremetal/cobbler.py 2012-09-19 19:05:34 +0000
@@ -172,7 +172,9 @@
172 Pull out all cobbler commands so that we can later support changing172 Pull out all cobbler commands so that we can later support changing
173 users, remote login, not sudo, etc.173 users, remote login, not sudo, etc.
174 """174 """
175 self._runargs(['sudo', 'cobbler'] + cmd)175 if self._runargs(['sudo', 'cobbler'] + cmd) != 0:
176 self.logger.error('Cobbler command failed: ' + ' '.join(cmd))
177 raise UTAHBMProvisioningException('Cobbler command failed: ' + ' '.join(cmd))
176178
177 def _start(self):179 def _start(self):
178 """180 """

Subscribers

People subscribed via source and target branches