Change in vdsm[master]: Source routes files now deleted on non-VDSM interfaces
amuller at redhat.com
amuller at redhat.com
Sun Jul 21 15:18:52 UTC 2013
Assaf Muller has uploaded a new change for review.
Change subject: Source routes files now deleted on non-VDSM interfaces
......................................................................
Source routes files now deleted on non-VDSM interfaces
Files in /var/run/vdsm/sourceRoutes are created by a VDSM DHCP
hook for all interfaces that release or get a DHCP configuration.
sourceRouteThread.py configures source routing on those interfaces.
However, first it checks that the interface in question is known
to VDSM. Previously the files weren't deleted in such a case.
Change-Id: I7bb4f4859cc6a8e8427d655de2a54fdc61e67430
Signed-off-by: Assaf Muller <amuller at redhat.com>
---
M vdsm/sourceRouteThread.py
1 file changed, 9 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/17174/1
diff --git a/vdsm/sourceRouteThread.py b/vdsm/sourceRouteThread.py
index 446614f..c913220 100644
--- a/vdsm/sourceRouteThread.py
+++ b/vdsm/sourceRouteThread.py
@@ -22,18 +22,17 @@
device = sourceRouteContents[-1]
sourceRoute = DynamicSourceRoute(device, configurator)
- if not sourceRoute.isVDSMInterface():
+ if sourceRoute.isVDSMInterface():
+ if action == 'configure':
+ ip = sourceRouteContents[1]
+ mask = sourceRouteContents[2]
+ gateway = sourceRouteContents[3]
+ sourceRoute.configure(ip, mask, gateway)
+ else:
+ sourceRoute.remove()
+ else:
logging.info("interface %s is not a libvirt interface" %
sourceRoute.device)
- return
-
- if action == 'configure':
- ip = sourceRouteContents[1]
- mask = sourceRouteContents[2]
- gateway = sourceRouteContents[3]
- sourceRoute.configure(ip, mask, gateway)
- else:
- sourceRoute.remove()
DynamicSourceRoute.removeInterfaceTracking(device)
--
To view, visit http://gerrit.ovirt.org/17174
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7bb4f4859cc6a8e8427d655de2a54fdc61e67430
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller at redhat.com>
More information about the vdsm-patches
mailing list