This repository has been archived by the owner on Feb 9, 2022. It is now read-only.
Reconcile network addresses according to VM status #16
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.
MOTIVATION
This fix handles the network addresses reconciliation problems which leads to
mishandling of status and phase reporting and lack of linkage, which causes the
machine to apear in the wrong state.
The main issue is around network reconciliation, and for that a major refactoring been made
to better address this. See [1] below.
RESULT
While the VM is not up it still doesn't have any IP addresses and this should be reported as nil addresses.
If the VM is UP it means we have to report error, and that will trigger a future reconcilliation.
A change in the node object that, that happen when a VM goes down for example, triggers reconciliation
and that should change the list of addresses and state accordingly. When the VM boots a reverse thing
happens - the machine boots with no IP addresses, till the node object is detecting a change because
kubelet starts responding. That triggers a reconcillation that will detect the addresses correctly. If
not that should keep firing reconcillation till it does.
MODIFICATION
[1] structural changes:
Instead of having pile of changes in one or two methods, every change to
the status or spec has its own function.
The high level break down of the any handling now is:
Signed-off-by: Roy Golan rgolan@redhat.com