[node-patches] Change in ovirt-node[master]: ovirt-node-upgrade: catch exceptions that are being skipped ...
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Mon Jun 17 08:30:44 UTC 2013
Fabian Deutsch has posted comments on this change.
Change subject: ovirt-node-upgrade: catch exceptions that are being skipped over
......................................................................
Patch Set 2: (1 inline comment)
Hey,
news on this?
....................................................
File scripts/ovirt-node-upgrade.py
Line 297: self._run_hooks("post-upgrade")
Line 298: if self._options.reboot > 0:
Line 299: self._reboot(self._options.reboot)
Line 300: self._logger.info("Upgrade Completed")
Line 301: sys.exit(0)
this won't work.
sys.exit(0) will be handled like (or it even is!) an exception.
Solution:
try:
... code ...
except ...:
sys.exit(1)
sys.exit(0)
Line 302: except Exception as e:
Line 303: self._logger.exception('Error: Upgrade Failed: %s', e)
Line 304: self._run_hooks("rollback")
Line 305: self._logger.info("Upgrade Failed, Rollback Completed")
--
To view, visit http://gerrit.ovirt.org/14958
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iefde860477dc21ca231d5dc29d8b79ab364b2c3f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Joey Boggs <jboggs at redhat.com>
More information about the node-patches
mailing list