Change in vdsm[master]: hook: after_network_setup_fail
ibarkan at redhat.com
ibarkan at redhat.com
Sun Oct 11 08:11:34 UTC 2015
Ido Barkan has posted comments on this change.
Change subject: hook: after_network_setup_fail
......................................................................
Patch Set 16: Code-Review-1
(3 comments)
https://gerrit.ovirt.org/#/c/45085/16//COMMIT_MSG
Commit Message:
Line 11:
Line 12: This hook point triggers hooks right after setupNetworks fails and
Line 13: finishes its rollback.
Line 14:
Line 15: We need this for Open vSwitch hook.
This might be useful for other case as well, without giving any examples, every other hook might also clean after itself in case of a failure more easily.
Line 16:
Line 17: Change-Id: I8a5d086b15b72c13d2b390c1310c2279446ac14f
https://gerrit.ovirt.org/#/c/45085/16/vdsm/API.py
File vdsm/API.py:
Line 1488: self._cif._netConfigDirty = True
Line 1489: network_setup_failed = False
Line 1490:
Line 1491: with self._rollback() as rollbackCtx:
Line 1492: try:
the try an except won't work here IIUC, since
with self._rollback()
effectively catches most of the failures. you should inspect the rollback value to determine if there was a failure.
Line 1493: supervdsm.getProxy().setupNetworks(networks, bondings,
Line 1494: options)
Line 1495: except:
Line 1496: network_setup_failed = True
Line 1495: except:
Line 1496: network_setup_failed = True
Line 1497: raise
Line 1498:
Line 1499: if network_setup_failed is not None:
how can this be None? you initialized it False
Line 1500: _after_network_setup_fail(networks, bondings, options)
Line 1501: return rollbackCtx
Line 1502: except hooks.HookError as e:
Line 1503: _after_network_setup_fail(networks, bondings, options)
--
To view, visit https://gerrit.ovirt.org/45085
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a5d086b15b72c13d2b390c1310c2279446ac14f
Gerrit-PatchSet: 16
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list