X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fopt_xensource_libexec_interface-reconfigure;h=74f06f8c52d3b1e74f3f4bce2508690ca348a81a;hb=ae825abbe74bce987fdeb814f95c0ae99472b5e8;hp=29d79added53d0f4cc1c1fb2e72d14d72523e4f3;hpb=0bb1f43dd8f5e894ed45d158daa5f94f4990c05a;p=openvswitch diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure index 29d79add..74f06f8c 100755 --- a/xenserver/opt_xensource_libexec_interface-reconfigure +++ b/xenserver/opt_xensource_libexec_interface-reconfigure @@ -786,6 +786,10 @@ def action_up(pif): bond_master = pif else: bond_master = None + if bond_master: + bond_slaves = get_bond_slaves_of_pif(bond_master) + else: + bond_slaves = [] bond_masters = get_bond_masters_of_pif(pif) # Support "rpm -e vswitch" gracefully by keeping Centos configuration @@ -872,6 +876,16 @@ def action_up(pif): net = db.get_pif_record(nwpif)['network'] network_uuids += [db.get_network_record(net)['uuid']] + # Bring up bond slaves early, because ovs-vswitchd initially + # enables or disables bond slaves based on whether carrier is + # detected when they are added, and a network device that is down + # always reports "no carrier". + bond_slave_physdevs = [] + for slave in bond_slaves: + bond_slave_physdevs += physdev_names(slave) + for slave_physdev in bond_slave_physdevs: + up_netdev(slave_physdev) + # Now modify the ovs-vswitchd config file. argv = [] for port in set(del_ports): @@ -906,10 +920,11 @@ def action_up(pif): # Configure network devices. configure_netdev(pif) - # Bring up VLAN slave and bond slaves. + # Bring up VLAN slave, plus physical devices other than bond + # slaves (which we brought up earlier). if vlan_slave: up_netdev(ipdev_name(vlan_slave)) - for physdev in physdevs: + for physdev in set(physdevs) - set(bond_slave_physdevs): up_netdev(physdev) # Update /etc/issue (which contains the IP address of the management interface)