This isn't the case on main, which has a completely different code path for this. On main we always adopt ports, and will always clean them up, along with trunks.
We will also panic if the port doesn't exist because we don't check for an empty port list.
/kind bug
In v0.9, if the instance is in error state we call
GarbageCollectErrorInstancesPort
, which doesn't support trunk ports: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/4042fc614c8b06be42032b2c94a970670f6288b7/pkg/cloud/services/compute/instance.go#L677-L687This isn't the case on main, which has a completely different code path for this. On main we always adopt ports, and will always clean them up, along with trunks.
We will also panic if the port doesn't exist because we don't check for an empty port list.