Delete experiment from users no longer at BSC
Hi @dbeltran
I'm trying to delete experiments from a user no longer working in the department (Muhammad Asif/masif/1244) but autosubmit is failing because it can't associate the uid with a real user name:
pbretonn@bscesautosubmit01:~$ autosubmit delete a00t
Do you want to delete a00t ? [y/n]
y
Removing experiment directory...
[CRITICAL] Unhandled exception on Autosubmit: 'getpwuid(): uid not found: 1244'
Traceback (most recent call last):
File "/shared/earth/software/autosubmit/3.11.0-hotfix-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/autosubmit-3.11.0_hotfix-py2.7.egg/autosubmit/autosubmit.py", line 380, in parse_args
return Autosubmit.delete(args.expid, args.force)
File "/shared/earth/software/autosubmit/3.11.0-hotfix-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/autosubmit-3.11.0_hotfix-py2.7.egg/autosubmit/autosubmit.py", line 596, in delete
return Autosubmit._delete_expid(expid)
File "/shared/earth/software/autosubmit/3.11.0-hotfix-foss-2015a-Python-2.7.9/lib/python2.7/site-packages/autosubmit-3.11.0_hotfix-py2.7.egg/autosubmit/autosubmit.py", line 456, in _delete_expid
if pwd.getpwuid(os.stat(os.path.join(BasicConfig.LOCAL_ROOT_DIR, expid_delete)).st_uid).pw_name == os.getlogin():
KeyError: 'getpwuid(): uid not found: 1244'
It's not a major issue because I can delete the experiments by hand from esarchive and the autosubmit database, but if you have time at some point, it could be useful to fix this.
Thanks!