Hotfix: catch a few NoneType exceptions #81
Merged
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.
While turning containers on and off, I noted that federation's heartbeat daemon gets very unhappy if Vault is sealed and keeps throwing exceptions for NoneTypes. These fixes should help.
Before this, you can see what I mean by stopping the vault container. Federation service will start respawning the heartbeat process over and over because servers is None. If you recompose federation at this point, you'll also see more exceptions thrown during initialization.
After pulling this fix and recomposing federation, you should see that it more gracefully handles the sealed vault in both cases.
To get everything working again, start vault again and restart vault-runner. That will unseal the vault. If you wait about a minute for opa-runner and vault-runner to refresh their tokens, you can recompose federation and everything should be as it was.