elotl / kip

Virtual-kubelet provider running pods in cloud instances
Apache License 2.0
223 stars 14 forks source link

Fix setting and caching of node status at startup. #73

Closed justnoise closed 4 years ago

justnoise commented 4 years ago

I think we have a race condition between starting up the node controller and having virtual kubelet call provider.ConfigureNode.

Problem: If kip starts up before virtual kubelet calls provider.ConfigureNode() then the calling NodeStatusController.setNodeStatus will set the nodeReady and networkUnavailable parameters in the controller caching those values. It will then then try to create the node in k8s but will fail since the callback (from virtual-kubelet) doesn't exist yet. Subsequent calls tosetNodeStatus will fail since the controller thinks those values are already set in the node.

Changes: