Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Fix ipam reclaim #3192

Merged
merged 3 commits into from
Dec 1, 2017
Merged

Fix ipam reclaim #3192

merged 3 commits into from
Dec 1, 2017

Conversation

bboreham
Copy link
Contributor

@bboreham bboreham commented Dec 1, 2017

There was a subtle problem with copying a map by reference, so the copy actually changed the data in the original so it looked like the operation succeeded.

This problem was masking another problem, that the keys used for annotations to mark a peer as 'currently being removed' contained : characters which are not allowed by Kubernetes.

The big improvement is to use the updated data that comes back from Update(), even after an error.

Fixes #3190

I have tested this by creating a 10-node cluster using kops, then scaling down to 5 nodes, then scaling back up to 10 nodes, finally using the nettest image to check that 30 pods can all talk to each other.

@bboreham bboreham added this to the 2.1.3 milestone Dec 1, 2017
if err == nil {
cml.cm = cm
}
cml.cm = cm

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@bboreham bboreham changed the base branch from master to 2.1 December 1, 2017 14:13
@bboreham bboreham force-pushed the issues/3190-deepcopy-configmaps branch from 444f13a to 47aba94 Compare December 1, 2017 14:13
e.g. if we get a clash because someone else has updated the data, it
returns the new data so we should work off that next time.

Also re-fetch the Annotations every time round the main loop for safety.
E.g. replace "26:c6:0b:ba:fd:31" with "26_c6_0b_ba_fd_31"
@bboreham bboreham force-pushed the issues/3190-deepcopy-configmaps branch from 47aba94 to d2ed91c Compare December 1, 2017 14:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants