kops icon indicating copy to clipboard operation
kops copied to clipboard

fix(openstack): determine ports to delete based on tags

Open ederst opened this issue 1 year ago • 8 comments

This will determine the ports to delete when deleting an InstanceGroup in OpenStack based on the tags, rather than comparing the prefix of the name of the port to a pattern.

The current approach for deleting ports associated with an InstanceGroup in OpenStack can be problematic.

For example, when creating an InstanceGroup called worker and another one called worker-2. Some of the ports kOps creates for those groups will look like this:

  • port-worker-2-1-<clusterName>
  • port-worker-2-2-<clusterName>
  • port-worker-1-<clusterName>
  • port-worker-2-<clusterName>
  • port-worker-20-<clusterName>

Deleting the worker-2 IG will ultimately delete all the ports prefixed with port-worker-2, which means that kOps will also delete ports of the worker IG.

TODO:

  • [x] Write tests

ederst avatar Nov 26 '24 17:11 ederst

Hi @ederst. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Nov 26 '24 17:11 k8s-ci-robot

/ok-to-test

hakman avatar Nov 27 '24 06:11 hakman

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Apr 20 '25 03:04 k8s-triage-robot

/remove-lifecycle stale

ederst avatar Apr 24 '25 09:04 ederst

@ederst: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kops-e2e-cni-flannel 33c6fd3d0906667577288af6274f91900d8d1eff link true /test pull-kops-e2e-cni-flannel
pull-kops-e2e-gce-cni-calico 33c6fd3d0906667577288af6274f91900d8d1eff link true /test pull-kops-e2e-gce-cni-calico
pull-kops-e2e-gce-cni-kindnet 33c6fd3d0906667577288af6274f91900d8d1eff link true /test pull-kops-e2e-gce-cni-kindnet
pull-kops-e2e-k8s-aws-amazonvpc-u2404 33c6fd3d0906667577288af6274f91900d8d1eff link true /test pull-kops-e2e-k8s-aws-amazonvpc-u2404

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

k8s-ci-robot avatar Apr 24 '25 10:04 k8s-ci-robot

/retest

ederst avatar Apr 29 '25 08:04 ederst

@hakman @zetaab friendly bump (took me some time to finish)

ederst avatar May 23 '25 11:05 ederst

Thanks for the effort @ederst, and sorry for the delay. /lgtm /approve

hakman avatar Jul 04 '25 18:07 hakman

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Jul 04 '25 18:07 k8s-ci-robot