Ondřej Svoboda has uploaded a new change for review.
Change subject: sourceroute: move exception handling to the respective configurator ......................................................................
sourceroute: move exception handling to the respective configurator
Change-Id: I579b1789522eaed025d1c059bcf7a900e499ef32 Signed-off-by: Ondřej Svoboda osvoboda@redhat.com --- M vdsm/network/configurators/iproute2.py M vdsm/network/sourceroute.py 2 files changed, 16 insertions(+), 19 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/41594/1
diff --git a/vdsm/network/configurators/iproute2.py b/vdsm/network/configurators/iproute2.py index c260bfe..bec32f7 100644 --- a/vdsm/network/configurators/iproute2.py +++ b/vdsm/network/configurators/iproute2.py @@ -201,17 +201,22 @@
@staticmethod def configureSourceRoute(routes, rules, device): - for route in routes: - routeAdd(route) - - for rule in rules: - ruleAdd(rule) + try: + for route in routes: + routeAdd(route) + for rule in rules: + ruleAdd(rule) + except IPRoute2Error as e: + logging.error('Source route configuration failed: %s', e.message)
@staticmethod def removeSourceRoute(routes, rules, device): # Routes are removed automatically when the link goes down. - for rule in rules: - ruleDel(rule) + try: + for rule in rules: + ruleDel(rule) + except IPRoute2Error as e: + logging.error('Source route removal failed: %s' % e.message)
class ConfigApplier(object): diff --git a/vdsm/network/sourceroute.py b/vdsm/network/sourceroute.py index d7916ed..1fb9626 100644 --- a/vdsm/network/sourceroute.py +++ b/vdsm/network/sourceroute.py @@ -74,12 +74,8 @@
def configure(self): self._prepare_configuration() - try: - self._configurator.configureSourceRoute(self.routes, self.rules, - self.device) - except IPRoute2Error as e: - logging.error('ip binary failed during source route configuration' - ': %s', e.message) + self._configurator.configureSourceRoute(self.routes, self.rules, + self.device)
def _prepare_removal(self): self.routes = None @@ -173,12 +169,8 @@ logging.info("Removing gateway - device: %s", self.device) self._prepare_removal() if self.rules and self.table: - try: - self._configurator.removeSourceRoute( - self.routes, self.rules, self.device) - except IPRoute2Error as e: - logging.error('ip binary failed during source route ' - 'removal: %s' % e.message) + self._configurator.removeSourceRoute(self.routes, self.rules, + self.device)
@staticmethod def _isLibvirtInterfaceFallback(device):
automation@ovirt.org has posted comments on this change.
Change subject: sourceroute: move exception handling to the respective configurator ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: sourceroute: move exception handling to the respective configurator ......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: sourceroute: move exception handling to the respective configurator ......................................................................
Patch Set 3:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: sourceroute: move exception handling to the respective configurator ......................................................................
Patch Set 4:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: sourceroute: move exception handling to the respective configurator ......................................................................
Patch Set 5:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Jenkins CI RO has abandoned this change.
Change subject: sourceroute: move exception handling to the respective configurator ......................................................................
Abandoned
Abandoned due to no activity - please restore if still relevant
gerrit-hooks has posted comments on this change.
Change subject: sourceroute: move exception handling to the respective configurator ......................................................................
Patch Set 5:
* Update tracker: IGNORE, no Bug-Url found
vdsm-patches@lists.fedorahosted.org