Delete persisted data when IPAM range changes

This commit is contained in:
Bryan Boreham committed 2016-05-03 13:20:04 +01:00
1 parent fb3ed9c1a6
commit f6966548eb
2 files changed
+19

No files matched your search

+5
View File
@@ -917,6 +917,11 @@ func (alloc *Allocator) loadPersistedData() bool {
return false
}
if persistedRing.Range() != alloc.universe {
overwritePersisted("Deleting persisted data for IPAM range %s; our range is %s", persistedRing.Range(), alloc.universe)
return false
}
alloc.ring = persistedRing
alloc.space.UpdateRanges(alloc.ring.OwnedRanges())