The nightly service
Nightly health check of the R2lab testbed (faraday), plus a safety net for
the V0 testbed (distrait). The code is in the
r2lab-nightly repo; for its
deployment and development, see
r2lab-nightly.
What it does¶
nightly.pyruns hourly at nn:19 fromr2lab-nightly.timer, and returns at once unless ther2lab-nightlyslice currently holds a lease. When it does, for each node it turns it on, pings it, turns it off, checks it is down, then loads reference image 1 and checks the node, same with image 2. A failing node is marked unavailable in r2labapi, with the reason (this needsadmin_tokenin the[r2labapi]section ofrhubarbe.conf.local); a node that already is marked is left alone. It also sends a mail, and ends withrhubarbe bye --nodes --phones --pdus, which is forked on purpose, for process isolation and a hard timeout.nightmail.pybuilds and sends the report mail; it is imported bynightly.py, so the two have to stay together.book-nightly.pybooks the leases that nightly needs, see Booking leases.turn-off-the-lightsis for distrait only: there is no lease system there, so this daily timer switches off all the nodes regardless. It plays the role of nightly on distrait, and is not suitable in production.
Booking leases¶
The book-nightly.py script books leases en masse for the r2lab-nightly
slice, e.g. every Wednesday and Sunday between two dates. It must be run on
faraday:
# on faraday
cd /root/r2lab-nightly
.venv/bin/python book-nightly.py --from 2027-01-01 --until 2027-03-31 --days wed,sun --dry-runRemove --dry-run to actually book. Use --help for details.