Opened 10 days ago

Last modified 3 days ago

#26740 needs_review defect

Make sbws generate bandwidth files atomically, and document

Reported by: juga Owned by: teor
Priority: Medium Milestone: sbws 1.0 (MVP must)
Component: Core Tor/sbws Version:
Severity: Normal Keywords:
Cc: pastly, juga@…, teor Actual Points:
Parent ID: #26851 Points:
Reviewer: Sponsor:

Child Tickets

Change History (15)

comment:1 Changed 10 days ago by pastly

Status: assignedneeds_review

comment:2 Changed 9 days 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 5 days 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 5 days ago by teor

Parent ID: #25925

comment:6 Changed 5 days ago by juga

Crontab file will be created in system packages

comment:7 Changed 5 days 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 5 days ago by juga

Status: needs_revisionneeds_review

comment:9 in reply to:  5 Changed 5 days 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 5 days ago by teor

Status: needs_reviewmerge_ready

Looks good to me, let's merge it.

comment:11 Changed 4 days ago by pastly

Merged as b42a77f8b239071986ff0ef94757cdca901328af..b4bfea6e16a05608a077de6067c058c732800936

comment:12 Changed 4 days ago by pastly

Resolution: implemented
Status: merge_readyclosed

comment:13 Changed 3 days 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 3 days ago by teor

Owner: changed from juga to teor
Status: reopenedassigned

comment:15 Changed 3 days 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

Note: See TracTickets for help on using tickets.