holgerBerger / hpc-workspace

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

-F needed in ws_release even WS is in default File System #49

Open mflehmig opened 4 years ago

mflehmig commented 4 years ago

Hello Holger,

as far as I can see, the option -F FS is mandatory for ws_release even for workspaces in the default file system. This is inconsistent behavior w.r.t. the other ws-commands, where the default FS is used if the option -F is not provided by the users.

Can this be fixed?

Best regards Martin

holgerBerger commented 4 years ago

I think the idea behind that is to avoid releasing the wrong one in case the name exists in several FS. I can have a look how complex it is to require -F only if the name is not unique.

mflehmig commented 4 years ago

I think the idea behind that is to avoid releasing the wrong one in case the name exists in several FS. Good point. Then, it should be explicitly documented. Furterhmore, ws_allocate -x might print an appropriate error/warning(?) and not "Error: workspace does not exist, can not be extended!".

holgerBerger commented 4 years ago

I think the idea behind that is to avoid releasing the wrong one in case the name exists in several FS. I can have a look how complex it is to require -F only if the name is not unique.

holgerBerger commented 4 years ago

I checked it, one does not need to give -F when the workspace is in default, only if it not in default.

I added debugging option (which was already in the code) to ws_release, and one can see the search process when giving --debug.

It searches if no -F is given (that happens in validation of command line) trough the workspaces, and if nothing is found it uses the default.

debug: no filesystem given, searching...
debug: searching ws1
debug: searching ws10
debug: searching ws2
debug: searching ws3
debug: fallback, using global default, ending search