You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Guangya Liu <gy...@gmail.com> on 2016/05/10 12:21:13 UTC

[Unified Container] [Unit Test] Pay attention to your test case when using "alpine" docker image with INTERNET filter

Hi,

We got two JIRA tickets for same issue about test failure on CentOS 7:
1) https://issues.apache.org/jira/browse/MESOS-5351
2) https://issues.apache.org/jira/browse/MESOS-4810

The issue for those two JIRA tickets are the test case will be failed on
CentOS 7, the root cause is that on some linux distribution, '/bin' is not
under $PATH when some shell is used. Since the container image 'alpine'
itself does not specify environment variables, $PATH will be inherit from
the agent. As a result, when we exec, the exec cannot find 'sh' because
it's under /bin in alpine, but '/bin' is not under $PATH.

I see that we are continually adding test cases for unified container with
INTERNET CURL option, so just sending this out as a reminder to avoid such
issue in your test case.

To avoid such issue, please refer to
https://github.com/apache/mesos/blob/master/src/tests/containerizer/provisioner_docker_tests.cpp#L435-L443
as a reference: *Use a non-shell command because 'sh' might not be in the
PATH.*

Thanks,

Guangya