Opened 3 years ago

Closed 3 years ago

#19036 closed enhancement (implemented)

Write v3-status-votes file even when we fail to make a consensus

Reported by: arma Owned by: arma
Priority: Medium Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 029-proposed, 029-nickm-says-yes, review-group-2, TorCoreTeam201605
Cc: sysrqb, dgoulet Actual Points:
Parent ID: Points: 0.1 remaining
Reviewer: sysrqb dgoulet Sponsor:

Description

In dirvote_compute_consensuses(), we have checks for if (n_votes <= n_voters/2) and if (!n_vote_running), which cause us to fail and abort, before we get around to the

  votefile = get_datadir_fname("v3-status-votes");
  write_chunks_to_file(votefile, votestrings, 0, 0);

lines.

We should write the votes out to the file earlier in this process, so operators can read them to see available votes even in the failure case.

Child Tickets

Change History (12)

comment:1 Changed 3 years ago by arma

Cc: sysrqb added
Reviewer: sysrqb
Status: newneeds_review
Type: defectenhancement

See my feature19036 branch.

comment:2 Changed 3 years ago by arma

Cc: dgoulet added
Reviewer: sysrqbsysrqb dgoulet

comment:3 Changed 3 years ago by sysrqb

Status: needs_reviewmerge_ready

looks good to me.

comment:4 Changed 3 years ago by nickm

Keywords: 029-nickm-says-yes added

comment:5 Changed 3 years ago by nickm

Points: 0.1 remaining

comment:6 Changed 3 years ago by nickm

Keywords: review-group-2 added

Create a review-group-2 from (most of the) tickets in 0.2.8 or 0.2.9 or 029-nickm-says-yes listed as needs_review,

comment:7 Changed 3 years ago by nickm

Owner: set to arma
Status: merge_readyassigned

setting owner

comment:8 Changed 3 years ago by nickm

Status: assignedneeds_review

comment:9 Changed 3 years ago by arma

Keywords: TorCoreTeam201605 added

comment:10 Changed 3 years ago by asn

Status: needs_reviewmerge_ready

arma's patch looks good to me.

Since the patch literally moves a block of code around, I couldn't resist the urge to make it into a function. I pushed a commit that does this in my branch feature19036. If you feel that the refactor is not trivial, feel free to merge arma's patch and we can functionify later.

Code: https://gitweb.torproject.org/user/asn/tor.git/commit/?h=feature19036&id=d875101e03680a372fe1ac91dfff0a9bde883dd3

comment:11 Changed 3 years ago by nickm

Milestone: Tor: 0.2.???Tor: 0.2.9.x-final

comment:12 Changed 3 years ago by nickm

Resolution: implemented
Status: merge_readyclosed

lgtm; merged!

Note: See TracTickets for help on using tickets.