Currently, the "nag email" script sends users a separate email for every system they have reserved. This can get very spammy for heavy users, and may make instance admins reluctant to enable the feature.
It would be better to send a single email per user, structured something like the following:
[Beaker] Systems allocated to <username> (<date>)
The following systems have been allocated to you in <Beaker instance FQDN> for more than <X> days and have other recipes queued for execution. Please return them if you are no longer using them.
Duration Waiting FQDN
23 days 3 recipes host.beakerlab.example.com
All systems reserved by you: https://<Beaker instance FQDN>/?systemsearch-0.table=System%2FUser&systemsearch-0.keyvalue=&systemsearch-0.operation=is&systemsearch-0.value=<username>
Duration Waiting FQDN
7 days 1 recipe host2.beakerlab.example.com
All systems loaned to you: https://<Beaker instance FQDN>/?systemsearch-0.table=System%2FLoanedTo&systemsearch-0.keyvalue=&systemsearch-0.operation=is&systemsearch-0.value=<username>
This does a few things:
- tries to limit notifications to cases where returning the systems will do some good
- makes it clear to users how long they've had the system (rather than making them do date arithmetic) and the potential impact of releasing the system
- provides quick links to get to the appropriate place in Beaker (the relevant system pages)
- accounts for the fact users may be using multiple instances of Beaker
If we generated HTML email, we could streamline it even further by providing clickable links to return systems in each entry.
As far as what counts as a "waiting" recipe, I think the way to go there is to find queued recipes that:
1. Are more than an hour old (just to filter out noise)
2. Would be able to run on this system if:
- it was neither Loaned to this user, nor reserved by them
- if it was in Automated state rather than Manual
Vaguely related (but not part of this RFE): we really should offer "Return system, loan and make Automated" as a one-click option in the web UI. I believe there's an existing bug for that somewhere...
Here's a thought: perhaps this email could also suggest cancelling old recipes that technically *could* still run (so they're not dead), but are perhaps no longer relevant?
Another related thought: currently, the "My Systems" view shows the same default columns as the main system list (architecture, CPU, etc).
It may be useful to have an "Allocated Systems" view that shows similar info to that suggested for the nag email, with quick links to return systems (including putting Manual systems back into Automated).
Such a page would also make a good target for links in the nag email.
Regarding comment 2, a possible term to use would be "Delayed Jobs", which would by default list jobs that are more than 2 weeks old, but still Queued.
Note that I expanded further on this idea in the "Time Limited Manual Reservations" design proposal: https://beaker-project.org/dev/proposals/time-limited-manual-reservations.html#beaker-usage-report-emails
That's substantially more detailed than the comments above, but may still require additional changes as implementation highlights aspects that are more trouble than they're worth.
Matt has a design proposal for this which we are currently working through on Gerrit: http://gerrit.beaker-project.org/3083
Note that the "Open Loans for In Demand Systems" is postphoned due to complexity.
Cheers, Matt Jia
Beaker 0.18.0 has been released.