Problem mount slurm in singularity

592 views
Skip to first unread message

Mirko Pizarro

unread,
Jun 5, 2020, 12:12:55 PM6/5/20
to singularity
Hello

Good afternoon, I am trying to mount slurm in a container, but I have an error:

srun: error: Invalid user for SlurmUser slurm, ignored
srun: fatal: Unable to process configuration file

This is true, since our users work by ldap, the problem is that I don't know how to do it, for  what Singularity not sees user of ldap  which is currently as "slurm" and it's already created in our system.

Could you help me?, How could I mount ldap in singularity? or see a ldap user in singularity?

Thank you!!!.

Mirko Pizarro

unread,
Jun 8, 2020, 4:31:40 PM6/8/20
to singularity
Hello

Please help.

Thank you!.

v

unread,
Jun 8, 2020, 4:53:15 PM6/8/20
to singu...@lbl.gov
Hey Mirko!

I would guess that the team is pretty busy - if you aren't getting a response here I would suggest opening an issue at:

or joining the slack and asking folks that are around. I don't know the answer to your question because I don't do a ton with LDAP, but I suspect someone out there does! Good luck!

Best,

Vanessa

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/c859b393-dbf0-49f7-9d49-9756e2863873o%40lbl.gov.

Mirko Pizarro

unread,
Jun 8, 2020, 5:23:06 PM6/8/20
to singularity
Hello Vanessa

Thank you very much, pose the topic on Github.

Thanks.

El lunes, 8 de junio de 2020, 16:53:15 (UTC-4), vanessa escribió:
Hey Mirko!

I would guess that the team is pretty busy - if you aren't getting a response here I would suggest opening an issue at:

or joining the slack and asking folks that are around. I don't know the answer to your question because I don't do a ton with LDAP, but I suspect someone out there does! Good luck!

Best,

Vanessa

On Mon, Jun 8, 2020 at 2:31 PM Mirko Pizarro <mirko....@gmail.com> wrote:
Hello

Please help.

Thank you!.

El viernes, 5 de junio de 2020, 12:12:55 (UTC-4), Mirko Pizarro escribió:
Hello

Good afternoon, I am trying to mount slurm in a container, but I have an error:

srun: error: Invalid user for SlurmUser slurm, ignored
srun: fatal: Unable to process configuration file

This is true, since our users work by ldap, the problem is that I don't know how to do it, for  what Singularity not sees user of ldap  which is currently as "slurm" and it's already created in our system.

Could you help me?, How could I mount ldap in singularity? or see a ldap user in singularity?

Thank you!!!.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

Mirko Pizarro

unread,
Jun 8, 2020, 5:23:33 PM6/8/20
to singu...@lbl.gov
Hello Vanessa

Thank you very much, pose the topic on Github.

Thanks.

Hugo R Hernandez

unread,
Jun 8, 2020, 9:52:19 PM6/8/20
to singu...@lbl.gov
Hello there, I ran with this same issue and the solution was to create the SLURM and munge users when building the container image. You get LDAP info only from user launching the container all others show UID/GID.

Hope this helps.

--
-- 
Hugo R Hernandez

"Se seus esforços foram vistos com indeferença, não desanime que o sol faze um espectacolo maravilhoso todas as manhãs enquanto a maioria das pessoas ainda estão dormindo"
- Anónimo brasileiro

Mirko Pizarro

unread,
Jun 8, 2020, 10:01:07 PM6/8/20
to singularity
Hello Hugo

Thank you for your answer, but what can be done when the image is from the Internet ?, since we need to use scientific software pre compiled (the image its done ).
We do not want to intervene in the image.


Do you recommend another option?
Thanks!.

El lunes, 8 de junio de 2020, 21:52:19 (UTC-4), Hugo R Hernandez escribió:
Hello there, I ran with this same issue and the solution was to create the SLURM and munge users when building the container image. You get LDAP info only from user launching the container all others show UID/GID.

Hope this helps.
On Mon, Jun 8, 2020 at 4:25 PM Mirko Pizarro <mirko....@gmail.com> wrote:
Hello Vanessa

Thank you very much, pose the topic on Github.

Thanks.

El lun., 8 de jun. de 2020 a la(s) 16:53, v (vso...@gmail.com) escribió:
Hey Mirko!

I would guess that the team is pretty busy - if you aren't getting a response here I would suggest opening an issue at:

or joining the slack and asking folks that are around. I don't know the answer to your question because I don't do a ton with LDAP, but I suspect someone out there does! Good luck!

Best,

Vanessa

On Mon, Jun 8, 2020 at 2:31 PM Mirko Pizarro <mirko....@gmail.com> wrote:
Hello

Please help.

Thank you!.

El viernes, 5 de junio de 2020, 12:12:55 (UTC-4), Mirko Pizarro escribió:
Hello

Good afternoon, I am trying to mount slurm in a container, but I have an error:

srun: error: Invalid user for SlurmUser slurm, ignored
srun: fatal: Unable to process configuration file

This is true, since our users work by ldap, the problem is that I don't know how to do it, for  what Singularity not sees user of ldap  which is currently as "slurm" and it's already created in our system.

Could you help me?, How could I mount ldap in singularity? or see a ldap user in singularity?

Thank you!!!.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

Mirko Pizarro

unread,
Jun 9, 2020, 7:26:50 PM6/9/20
to singularity
Hello Hugo 

Do you recommend another option?
Thanks!!!.


El lunes, 8 de junio de 2020, 21:52:19 (UTC-4), Hugo R Hernandez escribió:
Hello there, I ran with this same issue and the solution was to create the SLURM and munge users when building the container image. You get LDAP info only from user launching the container all others show UID/GID.

Hope this helps.
On Mon, Jun 8, 2020 at 4:25 PM Mirko Pizarro <mirko....@gmail.com> wrote:
Hello Vanessa

Thank you very much, pose the topic on Github.

Thanks.

El lun., 8 de jun. de 2020 a la(s) 16:53, v (vso...@gmail.com) escribió:
Hey Mirko!

I would guess that the team is pretty busy - if you aren't getting a response here I would suggest opening an issue at:

or joining the slack and asking folks that are around. I don't know the answer to your question because I don't do a ton with LDAP, but I suspect someone out there does! Good luck!

Best,

Vanessa

On Mon, Jun 8, 2020 at 2:31 PM Mirko Pizarro <mirko....@gmail.com> wrote:
Hello

Please help.

Thank you!.

El viernes, 5 de junio de 2020, 12:12:55 (UTC-4), Mirko Pizarro escribió:
Hello

Good afternoon, I am trying to mount slurm in a container, but I have an error:

srun: error: Invalid user for SlurmUser slurm, ignored
srun: fatal: Unable to process configuration file

This is true, since our users work by ldap, the problem is that I don't know how to do it, for  what Singularity not sees user of ldap  which is currently as "slurm" and it's already created in our system.

Could you help me?, How could I mount ldap in singularity? or see a ldap user in singularity?

Thank you!!!.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

Hugo R Hernandez

unread,
Jun 9, 2020, 11:03:26 PM6/9/20
to singu...@lbl.gov
The only thing what it comes into my mind is to launch the container in sandbox writable mode as root so you can add the required user accounts for SLURM to work.  

To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/9bf2fdca-389f-460e-80fc-483e042d2891o%40lbl.gov.

Mirko Pizarro

unread,
Jul 7, 2020, 11:13:55 AM7/7/20
to singularity
Hello,

Someone could help me, thank you very much!

El viernes, 5 de junio de 2020, 12:12:55 (UTC-4), Mirko Pizarro escribió:

David Godlove

unread,
Jul 7, 2020, 11:19:42 AM7/7/20
to singularity
Hello,

I recently created a container that executes sbatch commands using slurm on the system.  I also encountered this error.  The solution was to create the SlurmUser within the container.  Check your configuration on the host system to figure out who the slurm user is.  Then run a command like so during the build process (within %post).  

adduser --disabled-password --gecos "" slurmuser

Hope that helps.  

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.

Mirko Pizarro

unread,
Jul 7, 2020, 11:32:02 AM7/7/20
to singularity
Hello David,

Thank you for your answer, but what can be done when the image is from the Internet ?, since we need to use scientific software pre compiled (the image its done ).
We do not want to intervene in the image.


Do you recommend another option?

Thanks!!!.

El martes, 7 de julio de 2020, 11:19:42 (UTC-4), David Godlove escribió:
Hello,

I recently created a container that executes sbatch commands using slurm on the system.  I also encountered this error.  The solution was to create the SlurmUser within the container.  Check your configuration on the host system to figure out who the slurm user is.  Then run a command like so during the build process (within %post).  

adduser --disabled-password --gecos "" slurmuser

Hope that helps.  

On Tue, Jul 7, 2020 at 9:14 AM Mirko Pizarro <mirko....@gmail.com> wrote:
Hello,

Someone could help me, thank you very much!

El viernes, 5 de junio de 2020, 12:12:55 (UTC-4), Mirko Pizarro escribió:
Hello

Good afternoon, I am trying to mount slurm in a container, but I have an error:

srun: error: Invalid user for SlurmUser slurm, ignored
srun: fatal: Unable to process configuration file

This is true, since our users work by ldap, the problem is that I don't know how to do it, for  what Singularity not sees user of ldap  which is currently as "slurm" and it's already created in our system.

Could you help me?, How could I mount ldap in singularity? or see a ldap user in singularity?

Thank you!!!.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

David Godlove

unread,
Jul 7, 2020, 12:02:31 PM7/7/20
to singularity
Hi Mirko,

Sorry, but I think in this case you need to build from the internet image as a source and add the user during the build.  Something like this:

Bootstrap: docker
From: dev/image:tag

%post
    adduser --disabled-password --gecos "" slurmuser

If for some reason you really, really don't want to alter the image at all, you will need to contact the developer of the container and ask them to make the change for you.  (Which they may or may not want to do.)  Singularity imports the calling user into the container by writing an entry to /etc/passwd at runtime.  But I'm unaware of any way that you could write another user in at runtime without running the container as root.  And running the container as root is a really bad idea.  

To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/7c3caa25-f7fe-4f34-8d53-466284100982o%40lbl.gov.

Mirko Pizarro

unread,
Jul 7, 2020, 12:09:19 PM7/7/20
to singularity
Well thank you very much, my idea is to try to mount srun, but unfortunately it is a difficult task.

Thanks again for your help.


El martes, 7 de julio de 2020, 12:02:31 (UTC-4), David Godlove escribió:
Hi Mirko,

Sorry, but I think in this case you need to build from the internet image as a source and add the user during the build.  Something like this:

Bootstrap: docker
From: dev/image:tag

%post
    adduser --disabled-password --gecos "" slurmuser

If for some reason you really, really don't want to alter the image at all, you will need to contact the developer of the container and ask them to make the change for you.  (Which they may or may not want to do.)  Singularity imports the calling user into the container by writing an entry to /etc/passwd at runtime.  But I'm unaware of any way that you could write another user in at runtime without running the container as root.  And running the container as root is a really bad idea.  

Reply all
Reply to author
Forward
0 new messages