Skip to content

Commit 1376e5a

Browse files
committed
OCPBUGS-2508: Ensure network defs without subnet follow noAllowedAddressPairs
Commit 855a22c introduced a bug that caused network definitions without subnets (the one you would get when setting `additionalNetworkIDs` in your `install-config.yaml`) caused the noAllowedAddressPairs property to be skipped while creating the port. This may in turn caused machine-api to fail creating the port because it does not have the permission to create a port with allowed_address_pair, which is often the case when using provider networks.
1 parent 84a5a49 commit 1376e5a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/cloud/openstack/clients/machineservice.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,9 @@ func (is *InstanceService) InstanceCreate(clusterName string, name string, clust
587587
Profile: net.Profile,
588588
PortSecurity: net.PortSecurity,
589589
})
590+
if net.NoAllowedAddressPairs {
591+
subnetsWithoutAllowedAddressPairs[net.UUID] = struct{}{}
592+
}
590593
}
591594

592595
for _, snetParam := range net.Subnets {

0 commit comments

Comments
 (0)