Greg Mann created MESOS-5924:
--------------------------------
Summary: Fetcher may print logging error when run as unprivileged
user
Key: MESOS-5924
URL: https://issues.apache.org/jira/browse/MESOS-5924
Project: Mesos
Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Greg Mann
Now that the fetcher performs its fetching as the framework's/task's user when
one is specified, it prints an error message when its user does not have
permissions to create the default glog logging file:
{code}
I0728 17:29:39.337363 25464 logging.cpp:194] INFO level logging started!
I0728 17:29:39.337628 25464 fetcher.cpp:498] Fetcher Info:
{"cache_directory":"\/tmp\/mesos\/fetch\/slaves\/57c21e0d-487d-4668-8da6-005f13401598-S0\/centos","items":[{"action":"BYPASS_CACHE","uri":{"cache":false,"executable":false,"extract":true,"value":"file:\/\/\/nonrootdir\/nonroottest"}}],"sandbox_directory":"\/var\/lib\/mesos\/slave\/slaves\/57c21e0d-487d-4668-8da6-005f13401598-S0\/frameworks\/57c21e0d-487d-4668-8da6-005f13401598-0001\/executors\/non-root-success.dc9e820d-54e8-11e6-b082-70b3d5120001\/runs\/3cae229f-8c6d-439e-8116-78bf06ac3731","user":"centos"}
I0728 17:29:39.339738 25464 fetcher.cpp:409] Fetching URI
'file:///nonrootdir/nonroottest'
I0728 17:29:39.339758 25464 fetcher.cpp:250] Fetching directly into the sandbox
directory
I0728 17:29:39.339777 25464 fetcher.cpp:187] Fetching URI
'file:///nonrootdir/nonroottest'
I0728 17:29:39.339792 25464 fetcher.cpp:167] Copying resource with command:cp
'/nonrootdir/nonroottest'
'/var/lib/mesos/slave/slaves/57c21e0d-487d-4668-8da6-005f13401598-S0/frameworks/57c21e0d-487d-4668-8da6-005f13401598-0001/executors/non-root-success.dc9e820d-54e8-11e6-b082-70b3d5120001/runs/3cae229f-8c6d-439e-8116-78bf06ac3731/nonroottest'
Could not create logging file: Permission denied
COULD NOT CREATE A LOGGINGFILE 20160728-172939.25464!W0728 17:29:39.342435
25464 fetcher.cpp:289] Copying instead of extracting resource from URI with
'extract' flag, because it does not seem to be an archive:
file:///nonrootdir/nonroottest
I0728 17:29:39.342511 25464 fetcher.cpp:547] Fetched
'file:///nonrootdir/nonroottest' to
'/var/lib/mesos/slave/slaves/57c21e0d-487d-4668-8da6-005f13401598-S0/frameworks/57c21e0d-487d-4668-8da6-005f13401598-0001/executors/non-root-success.dc9e820d-54e8-11e6-b082-70b3d5120001/runs/3cae229f-8c6d-439e-8116-78bf06ac3731/nonroottest'
+
/opt/mesosphere/packages/mesos--6c64154890d6c22595d7d047193773cda8de6a7c/libexec/mesos/mesos-containerizer
mount --help=false --operation=make-rslave --path=/
I0728 17:29:39.603394 25433 exec.cpp:161] Version: 1.0.0
I0728 17:29:39.699053 25490 exec.cpp:236] Executor registered on agent
57c21e0d-487d-4668-8da6-005f13401598-S0
{code}
It seems that the fetcher binary is unable to create the default logging file
due to a permissions issue. However, when I set the relevant
{{GLOG_logtostderr=true}} flag, which should prevent the creation of this
default file, it had no effect.
Note that the fetcher's logging output was piped to stdout/stderr as expected,
and the task ran and completed successfully, so these errors do not seem to
affect the execution of the task.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)