[
https://issues.apache.org/jira/browse/MESOS-6340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16408447#comment-16408447
]
michael beisiegel commented on MESOS-6340:
------------------------------------------
I'm using a docker image based on ubuntu:16.04 with vi installed. After 'dcos
task exec ...' into the container I get the following messages.
*on start vi*
{color:#205081}Cannot execute shell /usr/bin/bash{color}
{color:#205081}E79: Cannot expand wildcards{color}
{color:#205081}Cannot execute shell /usr/bin/bash{color}
{color:#205081}E79: Cannot expand wildcards{color}
*on close vi*
{color:#205081}E138: Can't write viminfo file $HOME/.viminfo! {color}
{color:#205081}Press ENTER or type command to continue{color}
The HOME env var is not set. Once I set HOME to /root or $MESOS_SANDBOX the
messages are gone.
> Set HOME for Mesos tasks
> ------------------------
>
> Key: MESOS-6340
> URL: https://issues.apache.org/jira/browse/MESOS-6340
> Project: Mesos
> Issue Type: Bug
> Components: agent, containerization
> Reporter: Cody Maloney
> Priority: Major
> Labels: containerizer
>
> Quite a few programs assume {{$HOME}} points to a user-editable data file
> directory.
> One example is PYTHON, which tries to look up $HOME to find user-installed
> pacakges, and if that fails it tries to look up the user in the passwd
> database which often goes badly (The container is running under the `nobody`
> user):
> {code}
> if i == 1:
> if 'HOME' not in os.environ:
> import pwd
> userhome = pwd.getpwuid(os.getuid()).pw_dir
> else:
> userhome = os.environ['HOME']
> {code}
> Just setting HOME by default to WORK_DIR would enable more software to work
> correctly out of the box. Software which needs to specialize / change it (or
> schedulers with specific preferences), should still be able to set it
> arbitrarily and anything a scheduler explicitly sets should overwrite the
> default value of $WORK_DIR
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)