Bug 994325 - [RFE] Redesign "nag email" system to be user based
[RFE] Redesign "nag email" system to be user based
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: general (Show other bugs)
0.14
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.18
: ---
Assigned To: matt jia
tools-bugs
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-07 00:24 EDT by Nick Coghlan
Modified: 2014-09-04 01:41 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-04 01:41:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nick Coghlan 2013-08-07 00:24:33 EDT
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>)
=========
Hi <name>,

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.

System Reservations

  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>

System Loans

  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.
Comment 1 Nick Coghlan 2013-08-07 00:34:59 EDT
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...
Comment 2 Nick Coghlan 2013-08-07 03:43:03 EDT
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?
Comment 3 Nick Coghlan 2013-08-10 15:43:17 EDT
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.
Comment 4 Nick Coghlan 2013-09-02 03:00:48 EDT
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.
Comment 6 Nick Coghlan 2014-05-14 00:17:10 EDT
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.
Comment 7 Dan Callaghan 2014-05-16 03:24:49 EDT
Matt has a design proposal for this which we are currently working through on Gerrit: http://gerrit.beaker-project.org/3083
Comment 8 matt jia 2014-06-02 02:55:26 EDT
On gerrit:

http://gerrit.beaker-project.org/#/c/3109/

Note that the "Open Loans for In Demand Systems" is postphoned due to complexity.

Cheers,Matt Jia
Comment 11 matt jia 2014-07-06 21:39:36 EDT
On gerrit:

http://gerrit.beaker-project.org/#/c/3185/

Cheers, Matt Jia
Comment 14 Dan Callaghan 2014-09-04 01:41:12 EDT
Beaker 0.18.0 has been released.

Note You need to log in before you can comment on or make changes to this bug.