Browse code

Merge "Delete unused neutron port"

Jenkins authored on 2014/04/14 21:04:12
Showing 1 changed files
... ...
@@ -317,8 +317,13 @@ function enroll_vms {
317 317
     IRONIC_NET_ID=$(neutron net-list | grep private | get_field 1)
318 318
     local idx=0
319 319
 
320
-    # work around; need to know what netns neutron uses for private network
321
-    neutron port-create private
320
+    # work around; need to know what netns neutron uses for private network.
321
+    # Without knowing how to interconnect the networks, PXE won't work properly
322
+    # for fake baremetal instances. The network should be configured prior all
323
+    # the instances operation. If we don't do this, the first port creation
324
+    # only happens in the middle of fake baremetal instance's spawning by nova,
325
+    # so we'll end up with unbootable fake baremetal VM due to broken PXE.
326
+    PORT_ID=$(neutron port-create private | grep " id " | get_field 2)
322 327
 
323 328
     while read MAC; do
324 329
 
... ...
@@ -359,6 +364,10 @@ function enroll_vms {
359 359
 
360 360
     sudo ovs-vsctl -- --if-exists del-port ovs-tap1 -- add-port br-int ovs-tap1 tag=$TAG_ID
361 361
     sudo ovs-vsctl -- --if-exists del-port brbm-tap1 -- add-port $IRONIC_VM_NETWORK_BRIDGE brbm-tap1
362
+
363
+    # Remove the port needed only for workaround. For additional info read the
364
+    # comment at the beginning of this function
365
+    neutron port-delete $PORT_ID
362 366
 }
363 367
 
364 368
 function configure_tftpd {