Ver Fonte

node/sdn: make /var/lib/cni persistent to ensure IPAM allocations stick 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
Dan Williams há 8 anos atrás
pai
commit
77d984eb94

Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
roles/openshift_node/templates/openshift.docker.node.service


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
roles/openshift_node_upgrade/templates/openshift.docker.node.service