Change in vdsm[master]: Make nics, vlan and bonding dhcp ifup to be asynchronous.

asegurap at redhat.com asegurap at redhat.com
Tue Oct 2 13:15:41 UTC 2012


Antoni Segura Puimedon has posted comments on this change.

Change subject: Make nics, vlan and bonding dhcp ifup to be asynchronous.
......................................................................


Patch Set 2: (1 inline comment)

....................................................
File vdsm/configNetwork.py
Line 945:                                 bondingOptions=bondingOptions,
Line 946:                                 mtu=max(prevmtu, mtu),
Line 947:                                 ipaddr=ipaddr, netmask=netmask,
Line 948:                                 gateway=gateway, **options)
Line 949:         bondBootproto = options.get('bootproto')
There is the step of setting options['bootproto'] to None after each assignment, so that the dhcp will only be on the topmost interface. Like in this example:

    def foo(options, bridge, vlan, bonding):
        if bridge:
            bridgeB = options.get('boot')
            options['boot'] = None
        if vlan:
            vlanB = options.get('boot')
            options['boot'] = None
        if bonding:
            bondB = options.get('boot')
            options['boot'] = None
        print 'bridge: %s' % bridgeB
        print 'vlan: %s' % vlanB
        print 'bond: %s' % bondB
        print 'nic: %s' % options['boot']

    foo({'boot': 'dhcp'}, True, True, True)

that prints:
  bridge: dhcp
  vlan: None
  bond: None
  nic: None
Line 950:         # reset ip, netmask, gateway and bootproto for lower level devices
Line 951:         ipaddr = netmask = gateway = options['bootproto'] = None
Line 952: 
Line 953:     for nic in nics:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I80f5bbfe5ba4dfcf8f7f29c21a60b0cc2e129cb0
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
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: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list