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:
1 parent
5024270232
commit
15b9b7416a
1 file changed
+5
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user