-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gc for error instance's port #975
Add gc for error instance's port #975
Conversation
Welcome @Bo0km4n! |
Hi @Bo0km4n. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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/test-infra repository. |
/ok-to-test |
yes, this is a valid fix , I suggest you create an issue so that we can track the fix ,appreciate the report and fix |
code logic is reasonable to me |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Bo0km4n, jichenjc 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 |
return nil | ||
} | ||
|
||
return s.deletePort(eventObject, portList[0].ID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if we only support a single port per instance I would suggest to loop over the portList
and delete all ports. It does not hurt and it feels more stable.
WDYT?
cc @jichenjc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we don't have to check for if len(portList) < 1
in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tobiasgiese, I agree it and modify code to loop through portList and delete each port.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it. What about it ? @tobiasgiese
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks :)
Please squash your commits. Then I will give my lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I squashed.
56a2f39
to
0b8680a
Compare
/retest |
0b8680a
to
d05a5ee
Compare
/lgtm |
/hold cancel |
What this PR does / why we need it:
When failed to create instance with error state in OpenStack, currently
DeleteInstance
logic didn't delete port of the error instance.Because, error instance's port detached from the instance by OpenStack.
If a port of error instance is still living until deleting managed security group, deleting a security group fails because the port is not deleted and is still associated with the security group.
As a result, OpenStackCluster deletion reconcile loop stuck.
To resolve above problem, I added logic of deleting port of error instance.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #976
Special notes for your reviewer:
TODOs:
/hold