Page MenuHomeSoftware Heritage

Update scheduler metrics every 4 hours
ClosedPublic

Authored by ardumont on Aug 30 2021, 12:12 PM.

Details

Summary

This triggers exactly every 4 hours but not on round timestamps.

Test Plan

octo-diff: on scheduler nodes (saatchi, scheduler0.staging), the period is increased
accordingly:

*******************************************
  Systemd::Timer[swh-scheduler-update-metrics.timer] =>
   parameters =>
     timer_content =>
      @@ -3,6 +3,8 @@
      _
       [Timer]
      -OnCalendar=daily
       Unit=swh-scheduler-update-metrics.service
      +OnCalendar=00/4:00
      +RandomizedDelaySec=1h
      +FixedRandomDelay=true
      _
       [Unit]
*******************************************
  Systemd::Unit_file[swh-scheduler-update-metrics.timer] =>
   parameters =>
     content =>
      @@ -3,6 +3,8 @@
      _
       [Timer]
      -OnCalendar=daily
       Unit=swh-scheduler-update-metrics.service
      +OnCalendar=00/4:00
      +RandomizedDelaySec=1h
      +FixedRandomDelay=true
      _
       [Unit]
*******************************************

Diff Detail

Repository
rSPSITE puppet-swh-site
Branch
staging
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23261
Build 36296: arc lint + arc unit

Event Timeline

ardumont created this revision.

I'll try to randomize this a bit more.

site-modules/profile/templates/swh/deploy/scheduler/swh-scheduler-update-metrics.timer.erb
5

as olasd suggested to me.

Ensure the timer executes roughly every 4h

ardumont retitled this revision from Update scheduler metrics every 4 hours to Update scheduler metrics every ~4 hours.
olasd added a subscriber: olasd.

What about FixedRandomDelay=true ? I think it makes sense to have this running every four hours exactly, rather than every 4 hours +/- 1 hour.

This revision is now accepted and ready to land.Aug 30 2021, 2:41 PM
ardumont edited the test plan for this revision. (Show Details)

Use fixed randomness

ardumont edited the test plan for this revision. (Show Details)

Use correct repository for diffing.

ardumont retitled this revision from Update scheduler metrics every ~4 hours to Update scheduler metrics every 4 hours.Aug 30 2021, 2:59 PM
ardumont edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.