Change in vdsm[master]: Multiple Gateways[6/2]: Swapped libvirt network & netEnt cre...

danken at redhat.com danken at redhat.com
Mon Jul 15 08:54:48 UTC 2013


Dan Kenigsberg has submitted this change and it was merged.

Change subject: Multiple Gateways[6/2]: Swapped libvirt network & netEnt creation
......................................................................


Multiple Gateways[6/2]: Swapped libvirt network & netEnt creation

During source routing configuraton for DHCP interfaces we wanted
to know if we're dealing with an interface that's 'owned' by
VDSM. Because of that we swapped the order in which we ifup
or ifdown an interface and create its libvirt network,
so that first we create the libvirt network and then the
top level device, that way when we ifupifdown and get a DHCP
response we can check if the interface is known to libvirt.
That introduced a bug when deleting a network that was on top
of a bridgeless-bond. Additionally, because of patches 3+4
in the Multiple Gateways series the original swap created a
race condition.

This patch reverses the libvirt network creation / deletion
and net entitiy creation / deletion to the original order,
and uses an alternative / additional method to check if an
interface is owned by VDSM.

Patch Set 3:
* Added /var/run/vdsm/trackedInterfaces to spec/make files

Patch Set 4:
* Added comment so that future generations know why we must
  first remove the libvirt network and then the network entity
  during delNetwork
* Moved interface tracking files add/delete to
  DynamicSourceRoute. Moved libvirt/vdsm interface checks
  from static to dynamic as well
* Added a helper method to get a tracking file path, using
  os.path.join

Patch Set 5:
* Fixed pep8 issue

Patch Set 6:
* Removed debugging log output

Patch Set 7:
* Use util.rmFile to remove tracking files
* Open and then close files instead of using the touch binary
  for creating tracking files

Change-Id: Ic5af431909427dc7488875f0cb14fe4361657a83
Signed-off-by: Assaf Muller <amuller at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/16692
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm.spec.in
M vdsm/Makefile.am
M vdsm/configNetwork.py
M vdsm/netconf/__init__.py
M vdsm/netconf/ifcfg.py
M vdsm/sourceRoute.py
M vdsm/sourceRouteThread.py
7 files changed, 75 insertions(+), 40 deletions(-)

Approvals:
  Assaf Muller: Verified
  Dan Kenigsberg: Looks good to me, approved


-- 
To view, visit http://gerrit.ovirt.org/16692
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5af431909427dc7488875f0cb14fe4361657a83
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list