Re-read peers ConfigMap from Kubernetes at start of every reclaim

A previous reclaim may have left the map set to nil.
This commit is contained in:
Bryan Boreham committed 2019-03-26 17:25:34 +00:00
1 parent 5024270232
commit 15b9b7416a
1 file changed
+5
+5
View File
@@ -140,6 +140,11 @@ func reclaimPeer(weave weaveClient, cml *configMapAnnotations, storedPeerList *p
okToRemove := false
nonExistentPeer := false
// Re-read status from Kubernetes; speculative updates may leave it un-set
if err := cml.Init(); err != nil {
return false, err
}
// 3. Check if there is an existing annotation with key X
existingAnnotation, found := cml.GetAnnotation(KubePeersPrefix + peerName)
if found {