From 69225c23eba51803a0f39176c87992949671dcba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Wed, 2 Feb 2022 15:36:17 +0100 Subject: [PATCH] Bug 2033862: Ensure subnets belong to the queried network There is a known issue with Cisco ACI [1] that causes the query to return subnets that don't belong to the specified network. We can workaround it and ensure the subnets really belong to the network. [1] https://bugzilla.redhat.com/show_bug.cgi?id=2027305 --- pkg/cloud/openstack/clients/machineservice.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/cloud/openstack/clients/machineservice.go b/pkg/cloud/openstack/clients/machineservice.go index d557f27d57..41d5858609 100644 --- a/pkg/cloud/openstack/clients/machineservice.go +++ b/pkg/cloud/openstack/clients/machineservice.go @@ -545,6 +545,11 @@ func (is *InstanceService) InstanceCreate(clusterName string, name string, clust return nil, err } for _, snet := range snetResults { + // Under some circumstances the filter ignores the NetworkID + // See https://bugzilla.redhat.com/show_bug.cgi?id=2033862 + if snet.NetworkID != netID { + continue + } nets = append(nets, openstackconfigv1.PortOpts{ NetworkID: snet.NetworkID, NameSuffix: snet.ID,