holgerBerger / hpc-workspace

Automatically exported from code.google.com/p/hpc-workspace
GNU General Public License v3.0
18 stars 13 forks source link

Email Reminder when extending workspace #78

Closed URZ-HD closed 3 years ago

URZ-HD commented 3 years ago

Hi, ws_extend does not support an email reminder. This leads to the following problem/situation when extending:

Info: could not read email from users config ~/.ws_user.conf. Info: reminder email will be sent to local user account

So the reminder should work in principle, but if the workspace was allocated previously with an customized emailaddress (-m ) than this would be overwritten by the local account.

Expected behaviour of ws_allocate -x should be in this case the re-use of -m and/or -r option if available.

best, Sven

holgerBerger commented 3 years ago

Not sure if I understand how to reproduce this.

I do ws_allocate -m mail@address -r 2 TEST

and I can see the mail address with ws_list -v

I do ws_allocate -x TEST 5

and I can still see the address and get no error.

What exactly are you doing?

URZ-HD commented 3 years ago

Hi Holger, sorry for the delay ... i've tested again:

If i have a workspace with reminder settings and i want to extend it (without ~/.ws_user.conf) i got: Original Workspace:

$ ws_list  -v
id: vampir
     workspace directory  : XXX
     remaining time       : 3 days 21 hours
     creation time        : Wed Apr 21 09:38:49 2021
[...]
     reminder             : Sun May 16 09:38:49 2021
     mailaddress          : XXX@YYY
$ ws_allocate -x vampir 10
Info: could not read email from users config ~/.ws_user.conf.
Info: reminder email will be sent to local user account
Info: extending workspace.
Info: changed mail address to <local_accountname>
Info: changed reminder setting.
/gpfs/bwfor/work/ws/XXX-vampir
remaining extensions  : 6
remaining time in days: 10
$ ws_list  -v
id: vampir
     workspace directory  : XXX
     remaining time       : 9 days 23 hours
     creation time        : Mon May 17 11:52:47 2021
[...]   
     reminder             : Sat May 22 11:52:47 2021
     mailaddress          : <local_accountname>

Of course, if i have a valid ~/.ws_user.conf, this address will be used for the extension.

But i think it would be correct, if during a workspace extension (without specifying new reminder email), a previous existing email should be re-used. If no email is specified, the .ws_user.conf should be used.

best, Sven

holgerBerger commented 3 years ago

should be fixed