Enable toggling tagged flavors/images and small fixes #282
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.
This commit fixes a couple of issues:
Catch case where all the faulty computes are dumping
In case all the stale_computes are kdumping we want to make sure
the check_kdump function returns an empty list, otherwise they may
be evacuated without waiting the dump to be collected.
Wrap reverse dns lookup in try/except block
If DNS is broken calling socket.gethostbyaddr() could result in
an unexpected pod crash.
Let's wrap the call in try/except with the expectation that a
reverse dns lookup failure should not prevent evacuation,
worst case scenario we would not capture the memory dump and
the user will have a "ERROR Could not perform reverse dns lookup for: X"
in the logs hinting at resolution not working.
It also introduces two new config options:
TAGGED_IMAGES (default=true)
TAGGED_FLAVORS (default=true)
Setting any of these to false will exclude respectively tagged
images or flavors from being considered when deciding which vm
needs to be evacuated, essentially allowing operators to decide
if they want to use either tagged images or flavors, or both.