8000 Better log and status messages for Paxos observer by bboreham · Pull Request #2134 · weaveworks/weave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Better log and status messages for Paxos observer #2134

Merged
merged 3 commits into from
Apr 8, 2016

Conversation

bboreham
Copy link
Contributor
@bboreham bboreham commented Apr 6, 2016

Fixes #2063

@bboreham bboreham added this to the 1.5.0 milestone Apr 6, 2016
@bboreham bboreham force-pushed the issues/2063-observer-status branch from d69d5c9 to da090bf Compare April 6, 2016 15:47
@@ -887,6 +887,8 @@ func (alloc *Allocator) loadPersistedData() {
if len(alloc.seed) != 0 {
alloc.infof("Initialising with supplied IPAM seed")
alloc.createRing(alloc.seed)
} else if _, ok := alloc.paxos.(*paxos.Observer); ok {
alloc.infof("Observer - awaiting IPAM data from another peer")

This comment was marked as abuse.

@awh awh self-assigned this Apr 7, 2016
@@ -7,6 +7,12 @@ type Participant interface {
Propose()
Think() bool
Consensus() (bool, AcceptedValue)
Status() *Status

This comment was marked as abuse.

@awh
Copy link
Contributor
awh commented Apr 7, 2016

I have an alternative proposal:

  • Add a ParticipantType() method to the Participant interface returning 'elector' or 'observer'
  • Use said type field used to eliminate the ugly type cast checks elsewhere
  • Expose said type in the report JSON (IPAM.ParticipantType ?) so that templates can switch on that rather than inferring via the absence of IPAM.Paxos.Quorum
  • Return the paxos status struct & NewStatus method to paxos.go

Thoughts?

@awh awh assigned bboreham and unassigned awh Apr 7, 2016
@bboreham
Copy link
Contributor Author
bboreham commented Apr 7, 2016

We only really need the type to be a binary IsObserver() or something like IsActive()

@bboreham bboreham force-pushed the issues/2063-observer-status branch from da090bf to aa64bda Compare April 7, 2016 11:29
@bboreham
Copy link
Contributor Author
bboreham commented Apr 7, 2016

I did it differently - PTAL

@bboreham bboreham force-pushed the issues/2063-observer-status branch from aa64bda to 5ad4351 Compare April 7, 2016 11:31
@bboreham bboreham force-pushed the issues/2063-observer-status branch from 5ad4351 to c12a52d Compare April 7, 2016 11:51
@bboreham bboreham assigned awh and unassigned bboreham Apr 7, 2016
@rade
Copy link
Member
rade commented Apr 7, 2016

troubleshooting-ipam.md needs updating.

@awh awh merged commit 9c7b27a into master Apr 8, 2016
@awh awh deleted the issues/2063-observer-status branch April 8, 2016 09:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0