Skip to content

Commit 0490264

Browse files
author
Jing Zhang
committed
Code changes verified for no-trunk OVS deployment.
1 parent e88afe9 commit 0490264

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg/openstack/instances.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,9 @@ func getSubInterfaces(interfaces []attachinterfaces.Interface, network *gophercl
766766
klog.Errorf("It is not expected to see more than one trunk on a single port %s", iface.PortID)
767767
return subports, err
768768
}
769+
if len(allTrunks) == 0 {
770+
continue
771+
}
769772
// Get subports attached to the trunks
770773
trunk := allTrunks[0]
771774
klog.V(5).Infof("Subports for trunk %s: %v", trunk.ID, trunk.Subports)

pkg/openstack/openstack_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ func TestNodeAddressesWithSubports(t *testing.T) {
935935
"OS-EXT-IPS:type": "fixed",
936936
},
937937
},
938-
"mycluster-01-vlan703_network": []interface{}{
938+
"mycluster-01-vlan702_network": []interface{}{
939939
map[string]interface{}{
940940
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:36:b7:8f",
941941
"version": float64(4),

0 commit comments

Comments
 (0)