kubernetes-sigs / cluster-api-provider-ibmcloud

Cluster API Provider for IBM Cloud
https://cluster-api-ibmcloud.sigs.k8s.io
Apache License 2.0
60 stars 76 forks source link

Enhance deletion logic #1805

Closed Amulyam24 closed 2 weeks ago

Amulyam24 commented 1 month ago

/kind feature /area provider/ibmcloud

Describe the solution you'd like We are currently fetching the resource and checking against a text phrase if it is successfully deleted(eg: VPC), leverage using http status codes instead. This is applicable to

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Amulyam24 commented 1 month ago

/good-first-issue

k8s-ci-robot commented 1 month ago

@Amulyam24: This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/issues/1805): >/good-first-issue Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
dharaneeshvrd commented 1 month ago

/assign

dharaneeshvrd commented 1 month ago

Planning to fix couple of issues along with this

  1. Observed that when DHCP server deletion throws error it did nt get logged and powervs deletion is also stuck with waiting for dhcp server to get deleted.
  2. Usually powervs instance deletion will not get deleted in first attempt, need to retry after sometime. So need to add requeue logic to Retrying the delete, until it succeeds.
dharaneeshvrd commented 1 month ago

@Amulyam24 Is it ok to address the above issues also in this issue, or is it better to create a separate issue? wdyt?

Amulyam24 commented 1 month ago

Sure, we can handle it as a part of this issue with detailed description and separate commits in PR if needed as it comes under the umbrella of enhancing the deletion logic.

  1. Usually powervs instance deletion will not get deleted in first attempt, need to retry after sometime. So need to add requeue logic to Retrying the delete, until it succeeds.

For this, I recently added a change in the PR. If additional checks are required, feel free to add the enhancements in your PR.