Support non-electing peers via --observer

This commit is contained in:
Adam Harrison committed 2016-03-03 17:48:50 +00:00
1 parent 29674b7780
commit b84ef98de8
5 files changed
+137 -52

No files matched your search

+4 -2
View File
@@ -36,8 +36,10 @@ func NewStatus(allocator *Allocator, defaultSubnet address.CIDR) *Status {
}
var paxosStatus *paxos.Status
if allocator.paxosActive {
paxosStatus = paxos.NewStatus(allocator.paxos)
if allocator.awaitingConsensus && allocator.paxos != nil {
if node, ok := allocator.paxos.(*paxos.Node); ok {
paxosStatus = paxos.NewStatus(node)
}
}
resultChan := make(chan *Status)