fix infra provider: add goroutine to handle remotemachine deletion when provisioning…#1303
Merged
apedriza merged 1 commit intok0sproject:mainfrom Nov 28, 2025
Merged
Conversation
apedriza
commented
Nov 24, 2025
Comment on lines
+143
to
+145
| // +kubebuilder:printcolumn:name="Address",type=string,JSONPath=".spec.machine.address",description="IP address or DNS name of the remote machine" | ||
| // +kubebuilder:printcolumn:name="Reserved",type=string,JSONPath=".status.reserved",description="Indicates if the machine is reserved" | ||
| // +kubebuilder:printcolumn:name="Remote Machine",type=string,JSONPath=".status.machineRef.name",description="Reference to the RemoteMachine" |
Contributor
Author
There was a problem hiding this comment.
I think it is useful to display this info related to the pool for debugging propuses
4494fe9 to
b594cd4
Compare
makhov
approved these changes
Nov 28, 2025
| // the bootstrap process hangs and the controller needs to be able to delete the RemoteMachine. Controller-runtime | ||
| // only runs one Reconcile at a time per object, so we need to monitor deletion in a separate goroutine. | ||
| go func() { | ||
| for { |
Contributor
There was a problem hiding this comment.
nit: I would rather prefer time.Ticker since it's exactly for this purpose.
… hangs Signed-off-by: apedriza <adripedriza@gmail.com>
b594cd4 to
69442e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… hangs
If a provisioning command hangs, another reconcile cycle for the same resource cannot run (for example triggered by the MHC). This prevents to reconcile the deletion and thus to release back a VM to the pool.
Remediation e2e covers this case, I will try to add e2e working with k0smotron infra provider soon