xenserver: Bring up physical devices before configuring local port.
authorBen Pfaff <blp@nicira.com>
Sat, 8 Aug 2009 00:02:34 +0000 (17:02 -0700)
committerBen Pfaff <blp@nicira.com>
Sat, 8 Aug 2009 00:02:34 +0000 (17:02 -0700)
If DHCP is in use, then the physical devices have to be up before we
configure the local port, otherwise the DHCP request will never hit the
wire and we have no hope of getting an IP address.

This problem has been here for a long time, but it was masked until
commit c170afc1 "xenserver: Really take devices down in
interface-reconfigure." actually caused devices to go down and stay down.

Fixes bug #1809 "vswitch upgrade broke the xenserver".

xenserver/opt_xensource_libexec_interface-reconfigure

index 67911f7..1b9f9e6 100755 (executable)
@@ -1015,9 +1015,6 @@ def action_up(pif):
         argv += configure_bond(bond_master)
     modify_config(argv)
 
-    # Configure network devices.
-    configure_netdev(pif)
-
     # Bring up VLAN slave, plus physical devices other than bond
     # slaves (which we brought up earlier).
     if vlan_slave:
@@ -1025,6 +1022,9 @@ def action_up(pif):
     for physdev in set(physdevs) - set(bond_slave_physdevs):
         up_netdev(physdev)
 
+    # Configure network devices.
+    configure_netdev(pif)
+
     # Update /etc/issue (which contains the IP address of the management interface)
     os.system("/sbin/update-issue")