Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node/sdn: make /var/lib/cni persistent to ensure IPAM allocations stick around across node restart #13236

Merged

Conversation

dcbw
Copy link
Contributor

@dcbw dcbw commented Mar 3, 2017

With the move to a CNI plugin, docker no longer handles IPAM, but CNI does through
openshift-sdn's usage of the 'host-local' CNI IPAM plugin. That plugin stores
IPAM allocations under /var/lib/cni/.

If the node container gets restarted, without presreving /var/lib/cni, the IPs
currently allocated to running pods get lost and on restart, openshift-sdn
may allocate those IPs to new pods causing duplicate allocations.

This never happened with docker because it has its own persistent IPAM store that
does not get removed when docker restarts. Also because (historically) when docker
restarted, all the containers died and the IP allocations were released by the
daemon.

Fix this by ensuring that IPAM allocations (which are tied to the life of the pod,
not the life of the openshift-node process) persist even if the openshift-node
process restarts.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1427789

@sdodson @eparis @openshift/networking

…ck around across node restart

With the move to a CNI plugin, docker no longer handles IPAM, but CNI does through
openshift-sdn's usage of the 'host-local' CNI IPAM plugin.  That plugin stores
IPAM allocations under /var/lib/cni/.

If the node container gets restarted, without presreving /var/lib/cni, the IPs
currently allocated to running pods get lost and on restart, openshift-sdn
may allocate those IPs to new pods causing duplicate allocations.

This never happened with docker because it has its own persistent IPAM store that
does not get removed when docker restarts.  Also because (historically) when docker
restarted, all the containers died and the IP allocations were released by the
daemon.

Fix this by ensuring that IPAM allocations (which are tied to the life of the pod,
*not* the life of the openshift-node process) persist even if the openshift-node
process restarts.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1427789
@sdodson
Copy link
Member

sdodson commented Mar 3, 2017

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Mar 3, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/825/) (Base Commit: 4f89148) (Image: devenv-rhel7_6038)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to ee0f0cc

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to ee0f0cc

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/825/) (Base Commit: 4f89148)

@openshift-bot openshift-bot merged commit a7dfbda into openshift:release-1.5 Mar 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants