Change in vdsm[ovirt-3.4]: ifcfg: Put hotplug=no for virtual devices

ybronhei at redhat.com ybronhei at redhat.com
Sun Jun 8 08:30:15 UTC 2014


Yaniv Bronhaim has submitted this change and it was merged.

Change subject: ifcfg: Put hotplug=no for virtual devices
......................................................................


ifcfg: Put hotplug=no for virtual devices

In el6 systems, udev can trigger an ifup call when a device is
created. The issue with the triggering is that when we create a
virtual device, e.g. a vlan, we do so via ifup, so what will
happen is:

we write ethX.Y
initscripts creates the
  vlan device with id Y
  on top of ethX.                      udev detects the new device
        | Process 1                              | Process 2
initscripts finished doing             udev calls initscripts' ifup
ifup, possibly calling dhclient            for the new vlan device
                                       initscripts possibly calls
                                           dhclient

The issue is that the two processes can do the dhclient in whichever
order and one dhclient will prevent the other from succeeding. Only
one ifup should be called for each device, so we need hotplug=no to
prevent Process 2 from succeeding in its ifup.

Our current usage of ifcfg files does not set hotplug=no
so that when the user replaces a physical card by hot-unplugging
and hot-plugging there will be an auto configuration. This behavior
is maintained by the fact that we only set hotplug=no for those
devices for which we control the whole life cycle, i.e., vlans,
bonds and bridges.

Bug-Url: https://bugzilla.redhat.com/1097818
Change-Id: I6a60bb8d461572855c951fff8c991e34e0feb332
Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/27980
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/28438
---
M vdsm/netconf/ifcfg.py
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Antoni Segura Puimedon: Verified
  Dan Kenigsberg: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a60bb8d461572855c951fff8c991e34e0feb332
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list