Change in vdsm[master]: Don't down bonds and nics when adding vlan or resizing

asegurap at redhat.com asegurap at redhat.com
Fri Aug 9 21:33:13 UTC 2013


Antoni Segura Puimedon has posted comments on this change.

Change subject: Don't down bonds and nics when adding vlan or resizing
......................................................................


Patch Set 7: Verified+1

Ran the usual tests plus:

having an ipython session running:

    from pyroute2 import IPDB
    ip = IPDB()
    def monitor(dev)
        status = ip.dev.operstate
        while True:
            new_status = ip.dev.operstate
            if new_status != status:
                print 'Flags changed: Before(%s), After(%s)' % (status, new_status)
                status = new_status

so that on a terminal session we can see when the dev goes down or up.

I did monitor(ip.em2) and on another ipython session I tested it with:
    c = vdscli.connect()
    print c.setupNetworks({'foo': {'nic': 'em2', 'vlan': '3'}}, {}, {'connectivityCheck': False})
    print c.setupNetworks({'bar': {'nic': 'em2', 'vlan': '5'}}, {}, {'connectivityCheck': False})

And checked that there was no message whatsoever for this interaction on the
ipython session. There wasn't.

After that, I stopped the em2 monitoring, started monitor(ip.bond0) and on the
other ipython session I did:
        print c.setupNetworks({'moo': {'bonding': 'bond0', 'vlan': '3'}}, {'bond0':{'nics': ['em2'], 'options': 'mode=3 miimon=250'}}, {'connectivityCheck': False})
        print c.setupNetworks({'moore': {'bonding': 'bond0', 'vlan': '2'}}, {'bond0':{'nics': ['em2'], 'options': 'mode=3 miimon=250'}}, {'connectivityCheck': False})
        print c.setupNetworks({'yeah': {'bonding': 'bond0', 'vlan': '4'}}, {'bond0':{'nics': ['em2', 'p1p3'], 'options': 'mode=3 miimon=250'}}, {'connectivityCheck': False})
        print c.setupNetworks({'ohyeah': {'bonding': 'bond0', 'vlan': '5'}}, {'bond0':{'nics': ['em2', 'p1p4'], 'options': 'mode=3 miimon=250'}}, {'connectivityCheck': False})

And saw that there was only one message:
    Flags changed: Before(DOWN), After(UP)

Which is the initial addition of em2 to bond0.

Last, I checked that if I change the bond opts the bond is correctly taken down
and up. And it is.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id3075a2e65f06416c840c6a98689b77555b22e5d
Gerrit-PatchSet: 7
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: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Petr Ĺ ebek <psebek at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No


More information about the vdsm-patches mailing list