You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running an analysis that needs to obtain the user uname using the getpass Python library (pwd under the hood), the reana user that gets plugged by the workflow controller just before executing the desired workflow step, is not available neither within the /etc/passwd nor the /etc/shadow files.
I was designing a workflow that uses MLFlow to send information to a server to track specific information across multiple runs. When running the workflow, I encounter the following error:
...
File "/usr/local/lib/python3.8/dist-packages/mlflow/tracking/context/default_context.py", line 19, in _get_user
return getpass.getuser()
File "/usr/lib/python3.8/getpass.py", line 169, in getuser
return pwd.getpwuid(os.getuid())[0]
KeyError: 'getpwuid(): uid not found: 1000'
Possible solution
When looking for similar problems online, I found a couple of GitHub discussions about:
Problem
When running an analysis that needs to obtain the user uname using the getpass Python library (pwd under the hood), the
reana
user that gets plugged by the workflow controller just before executing the desired workflow step, is not available neither within the/etc/passwd
nor the/etc/shadow
files.Code snipped plugging
reana
user:reana-workflow-controller/reana_workflow_controller/workflow_run_manager.py
Lines 560 to 579 in 4c59ec8
How I ran into the issue
I was designing a workflow that uses MLFlow to send information to a server to track specific information across multiple runs. When running the workflow, I encounter the following error:
Possible solution
When looking for similar problems online, I found a couple of GitHub discussions about:
useradd
works on Alpine / Ubuntu.I think the issue could be solved by using the
-r/--sytem
flag on theuseradd
command, as the Linux manual describes.I am not that familiar with the
reana-workflow-controller
, but I think it is a good guess.Any feedback will be welcome 😄
The text was updated successfully, but these errors were encountered: