Opened 17 months ago

Closed 16 months ago

Last modified 12 months ago

#26740 closed defect (fixed)

Make sbws generate bandwidth files atomically, and document

Reported by: juga Owned by: teor
Priority: Medium Milestone: sbws: 1.0.x-final
Component: Core Tor/sbws Version:
Severity: Normal Keywords: sbws-1.0-must-closed-moved-20181128
Cc: pastly, juga@…, teor Actual Points:
Parent ID: #26851 Points:
Reviewer: Sponsor:

Child Tickets

Change History (17)

comment:1 Changed 17 months ago by pastly

Status: assignedneeds_review

comment:2 Changed 17 months ago by pastly

https://github.com/pastly/simple-bw-scanner/pull/231

Please link to the PR once there is one to help me/us move between Trac and GitHub.

comment:3 Changed 16 months ago by teor

Status: needs_reviewneeds_revision

I completed #26702 and I am about to complete #26694.

While I was writing these tickets, I realised that we only need to avoid the following periods:

  • HH:45-HH:55, because the bandwidth file is read at HH:50
  • HH:15-HH:25, because the bandwidth file is read at HH:20 during a consensus failure

I also suggest that add these times to the sbws generate documentation.

comment:4 Changed 16 months ago by teor

Parent ID: #25925

comment:6 Changed 16 months ago by juga

Crontab file will be created in system packages

comment:7 Changed 16 months ago by juga

Description: modified (diff)
Summary: Add crontab file to generate bandwidth files at valid timesDocument at which times should bandwidth files be generated

Changed title and description

comment:8 Changed 16 months ago by juga

Status: needs_revisionneeds_review

comment:9 in reply to:  5 Changed 16 months ago by teor

Replying to juga:

Documented: https://github.com/pastly/simple-bw-scanner/pull/235

I don't think we need all those words, please see my comment on the pull request.

comment:10 Changed 16 months ago by teor

Status: needs_reviewmerge_ready

Looks good to me, let's merge it.

comment:11 Changed 16 months ago by pastly

Merged as b42a77f8b239071986ff0ef94757cdca901328af..b4bfea6e16a05608a077de6067c058c732800936

comment:12 Changed 16 months ago by pastly

Resolution: implemented
Status: merge_readyclosed

comment:13 Changed 16 months ago by teor

Parent ID: #25925#26851
Resolution: implemented
Status: closedreopened
Summary: Document at which times should bandwidth files be generatedDocument that bandwidth files should be generated atomically

comment:14 Changed 16 months ago by teor

Owner: changed from juga to teor
Status: reopenedassigned

comment:15 Changed 16 months ago by teor

Milestone: sbws 1.0 (MVP nice)sbws 1.0 (MVP must)
Status: assignedneeds_review
Summary: Document that bandwidth files should be generated atomicallyMake sbws generate bandwidth files atomically, and document

sbws was deleting the symlink after generating the file. When the symlink is deleted, reading the path is not atomic, because it can fail with a file not found error.

This change is based on nickm's feedback at:
https://trac.torproject.org/projects/tor/ticket/26702#comment:12

Please see my pull request:
https://github.com/pastly/simple-bw-scanner/pull/237

comment:16 Changed 16 months ago by juga

Resolution: fixed
Status: needs_reviewclosed

merged!

comment:17 Changed 12 months ago by teor

Keywords: sbws-1.0-must-closed-moved-20181128 added
Milestone: sbws 1.0 (MVP must)sbws: 1.0.x-final

Move all closed sbws 1.0 must tickets to sbws 1.0.x-final

Note: See TracTickets for help on using tickets.