Fixing iface deletion bug when netIds don't match #80
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 project assumes that a DanmNet's NetworkID and ObjectMeta.Name parameters always match.
This is even outlined in the schema descriptor.
However, recently we have introduced some changes which broke this assumption.
First, with the "default" feature, and then lately with the variable static delegate configuration.
The user might not even perceive it, but as a result of these changes interfaces weren't properly cleaned-up during CNI DEL invocations.
Instead of re-writing the whole codebase, we save the real name of the network as well into the interface's DanmEp, and use this parameter when we read the network descriptor during the deletion of the interface.
Meaning of NetworkID parameter left untouched in all the other places, but eventually, we need to revise when to sue which parameter.
Commit contains one more small,, but important change: the first interface of a Pod will be always named "eth0" from now on.
This change will make it impossible for users to accidentally screw-up network naming, and thus kill their own Pod.