File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
pkg/cloud/services/networking Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,10 @@ func (s *Service) DeleteClusterPorts(openStackCluster *infrav1.OpenStackCluster)
350350 }
351351
352352 for _ , port := range portList {
353- if strings .HasPrefix (port .Name , openStackCluster .Name ) {
353+ // The bastion port in 0.10 was prefixed with the namespace and then the current port name
354+ // so in order to cleanup the old bastion port we need to check for the old format.
355+ bastionLegacyPortPrefix := fmt .Sprintf ("%s-%s" , openStackCluster .Namespace , openStackCluster .Name )
356+ if strings .HasPrefix (port .Name , openStackCluster .Name ) || strings .HasPrefix (port .Name , bastionLegacyPortPrefix ) {
354357 if err := s .DeletePort (openStackCluster , port .ID ); err != nil {
355358 return fmt .Errorf ("error deleting port %s: %v" , port .ID , err )
356359 }
You can’t perform that action at this time.
0 commit comments