Yan Xu created MESOS-7052:
-----------------------------
Summary: os::exists doesn't handle failures.
Key: MESOS-7052
URL: https://issues.apache.org/jira/browse/MESOS-7052
Project: Mesos
Issue Type: Bug
Reporter: Yan Xu
{{os::exists}} in stout currently doesn't check errno at all and just returns
{{false}} upon error:
https://github.com/apache/mesos/blob/8dffd1a471d37c574d2b436dafcd7ed8eac1f949/3rdparty/stout/include/stout/os/posix/exists.hpp#L30.
Lacking further documentation, this is interpreted as "path doesn't not exist"
by some (many?) places in the Mesos codebase which may lead to errors down the
line (confusing logs) or totally masked (possibly even more confusing symptoms).
This is just one of the examples in CNI:
https://github.com/apache/mesos/blob/8dffd1a471d37c574d2b436dafcd7ed8eac1f949/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp#L1460
Perhaps {{os::exists}} should return a Try<bool>?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)