/usr/people... home directory masks /usr in Singularity image

158 views
Skip to first unread message

Peter van Heusden

unread,
Jan 19, 2017, 8:37:40 AM1/19/17
to singu...@lbl.gov
Hi there

The home directories on our cluster are /usr/people/<username>. This causes chaos with Singularity images, as /usr ends up containing simply /usr/people/<username> and /usr/bin, /usr/local, etc go missing.

I cannot seem to change this behaviour, no matter what combination of -c, -H and other flags I use. This is with singularity 2.2.

Any ideas how to work around this?

Thanks,
Peter

Gregory M. Kurtzer

unread,
Jan 19, 2017, 11:01:11 AM1/19/17
to singu...@lbl.gov
Hi Peter,

There is a workaround you can do in 2.2 (but we will need to come up with a better fix for that for 2.3). 

Try the option:

 -H /usr/people/username:/home/username 

And if that works export that out in an environment variable in /etc/singularity/init as:

SINGULARITY_HOME=...
export SINGULARITY_HOME

Hopefully that works! Good luck. 

Greg


--


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.


Peter van Heusden

unread,
Jan 19, 2017, 11:47:32 PM1/19/17
to singu...@lbl.gov
Hi Greg

Thanks, this works, but only with "sudo singularity". Otherwise I get:

ERROR  : Home directory ownership incorrect: /usr/people/pvh:/home/pvh
ABORT  : Retval = 255

And here is partial debug output:

DEBUG   [U=1124,P=542]     mount-util.c:42:check_mounted()            : Opening /proc/mounts
DEBUG   [U=1124,P=542]     mount-util.c:48:check_mounted()            : Iterating through /proc/mounts
DEBUG   [U=1124,P=542]     util/util.c:102:envar_path()               : Checking environment variable is valid path: 'SINGULARITY_HOME'
VERBOSE [U=1124,P=542]     util/util.c:50:envar()                     : Checking input from environment: 'SINGULARITY_HOME'
DEBUG   [U=1124,P=542]     util/util.c:52:envar()                     : Checking environment variable is defined: SINGULARITY_HOME
DEBUG   [U=1124,P=542]     util/util.c:58:envar()                     : Checking environment variable length (<= 4096): SINGULARITY_HOME
DEBUG   [U=1124,P=542]     util/util.c:64:envar()                     : Checking environment variable has allowed characters: SINGULARITY_HOME
VERBOSE [U=1124,P=542]     util/util.c:87:envar()                     : Obtained input from environment 'SINGULARITY_HOME' = '/usr/people/pvh:/home/pvh'
DEBUG   [U=1124,P=542]     config_parser.c:62:singularity_config_rewind(): Rewinding configuration file
DEBUG   [U=1124,P=542]     config_parser.c:107:singularity_config_get_bool(): Called singularity_config_get_bool(user bind control, 1)
DEBUG   [U=1124,P=542]     config_parser.c:80:singularity_config_get_value(): Called singularity_config_get_value(user bind control)
VERBOSE [U=1124,P=542]     config_parser.c:91:singularity_config_get_value(): Got config key user bind control (= 'yes')
DEBUG   [U=1124,P=542]     config_parser.c:113:singularity_config_get_bool(): Return singularity_config_get_bool(user bind control, 1) = 1
VERBOSE [U=1124,P=542]     home.c:86:singularity_mount_home()         : Set the home directory source (via envar) to: /usr/people/pvh:/home/pvh
DEBUG   [U=1124,P=542]     util/file.c:247:s_mkpath()                 : Creating directory: /tmp/.singularity-session-1124.2050.8814447/usr
DEBUG   [U=1124,P=542]     util/file.c:247:s_mkpath()                 : Creating directory: /tmp/.singularity-session-1124.2050.8814447/usr/people
DEBUG   [U=1124,P=542]     util/file.c:247:s_mkpath()                 : Creating directory: /tmp/.singularity-session-1124.2050.8814447/usr/people/pvh
DEBUG   [U=1124,P=542]     home.c:129:singularity_mount_home()        : Checking permissions on home directory: /usr/people/pvh:/home/pvh
DEBUG   [U=1124,P=542]     util/file.c:180:is_owner()                 : Checking ownership on /usr/people/pvh:/home/pvh
ERROR   [U=1124,P=542]     home.c:131:singularity_mount_home()        : Home directory ownership incorrect: /usr/people/pvh:/home/pvh
ABORT   [U=1124,P=542]     home.c:132:singularity_mount_home()        : Retval = 255

That "Checking ownership on" message is an extra debug message I put in is_owner. It looks like it is checking ownership on the whole /usr/people/pvh:/home/pvh thing rather than /usr/people/pvh ? I might be reading this wrong though.

Peter

Gregory M. Kurtzer

unread,
Jan 20, 2017, 1:11:05 PM1/20/17
to singularity
I think this was fixed in the 2.2 branch of Github. Will you test that, and confirm?

Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@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 singularity+unsubscribe@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 singularity+unsubscribe@lbl.gov.



--
Gregory M. Kurtzer
HPC Systems Architect and Technology Developer
Lawrence Berkeley National Laboratory HPCS
University of California Berkeley Research IT
Singularity Linux Containers (http://singularity.lbl.gov/)
Warewulf Cluster Management (http://warewulf.lbl.gov/)

Nekel-Seyew

unread,
Jan 20, 2017, 2:35:47 PM1/20/17
to singularity
I've tried this, using the released 2.2, but it still says that the /real/path in  --home /real/path:/container_path has permission denied.

-Kyle
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@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 singularity...@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 singularity...@lbl.gov.

Gregory M. Kurtzer

unread,
Jan 20, 2017, 3:45:20 PM1/20/17
to singularity
Hi Kyle,

Opps, I meant the 2.x branch in github. Sorry for the confusion.

Greg

To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.
Reply all
Reply to author
Forward
0 new messages