Giuseppe Vallarelli has posted comments on this change.
Change subject: WIP: Multiple Gateways[3/2]: Re-did comms between dhclient and
vdsm
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(5 inline comments)
Mostly questions and a few hints.
....................................................
File vdsm/sourceRoute.sh
Line 2:
Line 3: timeStamp=`date +%s`
Line 4:
Line 5: sourceRoute_config() {
Line 6: echo "configure" $new_ip_address $new_subnet_mask $new_routers \
You should add quotes to the variables: new_ip_addresses and so on.
Line 7: $interface > /var/run/vdsm/sourceRoutes/$timeStamp
Line 8: }
Line 9:
Line 10: sourceRoute_restore() {
....................................................
File vdsm/sourceRouteThread.py
Line 1: import logging
Line 2: import os
Line 3:
Line 4: import pyinotify
Is there a specific reason or impediment for not having DHClient communicating
directly with VDSM ? What are the advantages of communicating via filesystem
events instead of using a direct communication ?
Line 5:
Line 6: from netconf.iproute2 import Iproute2
Line 7: from sourceRoute import DynamicSourceRoute
Line 8:
Line 10: SOURCE_ROUTES_FOLDER = '/var/run/vdsm/sourceRoutes'
Line 11: configurator = Iproute2()
Line 12:
Line 13:
Line 14: class DHClientEventHandler(pyinotify.ProcessEvent):
I'm a little concerned about the usage of a 2KLOC+ of untested yet documented
library.
Line 15: def process_IN_CREATE(self, event):
Line 16: logging.debug("Responding to DHCP response in %s" %
event.pathname)
Line 17: with open(event.pathname, 'r') as sourceRouteFile:
Line 18: sourceRouteContents = sourceRouteFile.read().split()
Line 32: sourceRoute.configure(ip, mask, gateway)
Line 33: else:
Line 34: sourceRoute.remove()
Line 35:
Line 36: os.remove(event.pathname)
Why do we need to remove the source route file at the end?
Line 37:
Line 38:
Line 39: def onSuperVDSMStart():
Line 40: logging.debug("sourceRouteThread.onSuperVDSMStart started")
....................................................
File vdsm/supervdsmServer.py
Line 52: import tc
Line 53: import ksm
Line 54: import mkimage
Line 55: from storage.multipath import MPATH_CONF
Line 56: import sourceRouteThread
I don't like much this name it's the Thread ending mostly.
Line 57:
Line 58: _UDEV_RULE_FILE_DIR = "/etc/udev/rules.d/"
Line 59: _UDEV_RULE_FILE_PREFIX = "99-vdsm-"
Line 60: _UDEV_RULE_FILE_EXT = ".rules"
--
To view, visit http://gerrit.ovirt.org/16461
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib7a47a680bfbfe285f708290de97e8f08714695a
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Assaf Muller <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches