Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stimela without user #156

Closed
NicolaMalavasi opened this issue May 8, 2023 · 3 comments
Closed

Stimela without user #156

NicolaMalavasi opened this issue May 8, 2023 · 3 comments

Comments

@NicolaMalavasi
Copy link

Hello, I would like to report an issue and ask for possible solutions.

I am trying to use caracal (and therefore stimela) on a new infrastructure. By design, on this cluster the user caracal gets run with is "nobody". Not sure this is the correct terminology, but when I try to launch a caracal task I get a stimela error. Cabs are pre-pulled to a local folder and accessed through singularity.

  File "/usr/local/bin/caracal", line 4, in <module>
    import caracal.main as main
  File "/usr/local/lib/python3.8/site-packages/caracal/__init__.py", line 8, in <module>
    import stimela
  File "/usr/local/lib/python3.8/site-packages/stimela/__init__.py", line 17, in <module>
    USER = os.environ["USER"]
  File "/usr/local/lib/python3.8/os.py", line 675, in __getitem__
    raise KeyError(key) from None
KeyError: 'USER'

I do seem to understand that stimela requests from the system some user information and this does not exist for user "nobody". How is this information used by stimela? Is it necessary or can the lines in the stamina __init__.py file be commented out without risk? Is there a way to circumvent this and run caracal/stimela as user "nobody"?

@o-smirnov
Copy link
Member

Hi @NicolaMalavasi, sorry I missed this... wrong repo actually (but I realize we've created the confusion ourselves with our naming eh @SpheMakh?), this repo is for Stimela2, whereas caracal uses Stimela classic. So I copied this to ratt-ru/Stimela-classic#784

@o-smirnov
Copy link
Member

@NicolaMalavasi can you please replace

    USER = os.environ["USER"]

with

    USER = os.getlogin()

and see if that works? I think the latter is the "correct" way to get the username.

@SpheMakh
Copy link
Collaborator

Fixed in stimela-classic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants