Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OVS 2011-02-14 #18

Merged
4 commits merged into from
Feb 14, 2011
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
xenserver: Kill bond slaves' dhclients when bringing up bond master.
This fixes the converse of the problem addressed by commit fe19e820
"xenserver: Kill bond master's dhclient when bringing up bond slave".  In
that commit's log message, I claimed that the converse was not a problem,
but I was wrong.  I must have screwed up in testing, because it really is
a problem.  This commit fixes it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
CC: Dominic Curran <dominic.curran@citrix.com>
Reported-by: Michael Mao <mmao@nicira.com>
Bug #2668.
  • Loading branch information
blp authored and dcurran committed Feb 14, 2011
commit ce1168aff10de1a1172563dad6fb48ababbe9e58
18 changes: 13 additions & 5 deletions scripts/InterfaceReconfigureVswitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,17 +431,25 @@ def preconfigure(self, parent):
def bring_down_existing(self):
# interface-reconfigure is never explicitly called to down a
# bond master. However, when we are called to up a slave it
# is implicit that we are destroying the master.
# is implicit that we are destroying the master. Conversely,
# when we are called to up a bond is is implicit that we are
# taking down the slaves.
#
# This is (only) important in the case where the bond master
# uses DHCP. We need to kill the dhclient process, otherwise
# bringing the bond master back up later will fail because
# ifup will refuse to start a duplicate dhclient.
# This is (only) important in the case where the device being
# implicitly taken down uses DHCP. We need to kill the
# dhclient process, otherwise performing the inverse operation
# later later will fail because ifup will refuse to start a
# duplicate dhclient.
bond_masters = pif_get_bond_masters(self._pif)
for master in bond_masters:
log("action_up: bring down bond master %s" % (pif_netdev_name(master)))
run_command(["/sbin/ifdown", pif_bridge_name(master)])

bond_slaves = pif_get_bond_slaves(self._pif)
for slave in bond_slaves:
log("action_up: bring down bond slave %s" % (pif_netdev_name(slave)))
run_command(["/sbin/ifdown", pif_bridge_name(slave)])

def configure(self):
# Bring up physical devices. ovs-vswitchd initially enables or
# disables bond slaves based on whether carrier is detected
Expand Down