Hetzner: search for not_found code explicitly before returning ErrInstanceNotFound#121
Open
davidhiendl wants to merge 2 commits intodrone:masterfrom
Open
Hetzner: search for not_found code explicitly before returning ErrInstanceNotFound#121davidhiendl wants to merge 2 commits intodrone:masterfrom
davidhiendl wants to merge 2 commits intodrone:masterfrom
Conversation
…ound for HetznerCloud
|
Hi @davidhiendl Thanks for sending the proposal we appreciate it 🚀 We usually review PRs every Tuesday but I will keep you up to date if anything changes. |
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.
When a hetzner cloud instance is deleted externally (not by the autoscaler, for example via GUI/API) the autoscaler fails to correctly remove the instance. This is due to the fact that it does not return ErrInstanceNotFound but a generic one.
Example log:
As you can see the hetzner responsed with code=not_found but the implementation returns a generic error as indicated by the log message "cannot destroy server" (reaper.go#107)
Instead of relying on the generic error response here which seems to have changed it will now check for the string not_found in the hetzner api response and if found return ErrInstanceNotFound allowing the instance to be deleted from the autoscaler.