Fix Hetzner 404 error detection during server destruction#152
Open
cvetkovski98 wants to merge 1 commit into
Open
Fix Hetzner 404 error detection during server destruction#152cvetkovski98 wants to merge 1 commit into
cvetkovski98 wants to merge 1 commit into
Conversation
|
Hi @cvetkovski98 thanks for the contribution. We don’t have a committed timeline for merging this upstream right now. If you need this in the near term, maintaining a fork is the best path forward. We appreciate the work you’ve put into this, and if this area aligns with our roadmap down the line, we’ll revisit it for potential inclusion. |
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.
The Reaper component is unable to properly clean up errored Hetzner servers because 404 errors when destroying non-existent servers are not correctly detected. The current implementation relies on checking human-facing error messages, which are fragile and subject to change.
When the Reaper attempts to destroy an errored server that no longer exists on Hetzner, the 404 response is not recognized as
autoscaler.ErrInstanceNotFound. This prevents the Reaper from correctly marking the server as stopped, causing it to remain in the error state indefinitely.Use the Hetzner Cloud SDK's machine-facing error code detection (
hcloud.IsError(err, hcloud.ErrorCodeNotFound)). The machine facing error code is documented in the Hetzner API reference. This provides a stable, version-independent way to detect not-found errors and properly classify them asautoscaler.ErrInstanceNotFound.This should:
Alternative to: #121
Edit: Improved PR title and description.