Re: [6/6] mesos git commit: Added `linux/devices` isolator whitelist tests.

2018-05-28 Thread James Peach


> On May 28, 2018, at 6:05 AM, Alex R  wrote:
> 
> This commit breaks the build on Ubuntu 14.04 with `gcc (Ubuntu 
> 4.8.4-2ubuntu1~14.04.4) 4.8.4` due to what seems to me a compiler bug, likely 
> this one [1]. Ubuntu 14.04 is officially supported until mid-2019, hence not 
> sure we can ignore this issue.
> 
> James, can you commit a workaround?

Oh it’s the raw strings that break it. I’ll try to come up with something


> 
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57824
> 
>> On 25 May 2018 at 23:12,  wrote:
>> Added `linux/devices` isolator whitelist tests.
>> 
>> Added test to verify that the `linux/devices` isolator supports
>> populating devices that are whitelisted by the `allowed_devices`
>> agent flag.
>> 
>> Review: https://reviews.apache.org/r/67145/
>> 
>> 
>> Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ee6c6cfc
>> Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ee6c6cfc
>> Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ee6c6cfc
>> 
>> Branch: refs/heads/master
>> Commit: ee6c6cfcbe2b91eaf540afa38bab4521d23b747f
>> Parents: 68db3f9
>> Author: James Peach 
>> Authored: Fri May 25 13:38:14 2018 -0700
>> Committer: James Peach 
>> Committed: Fri May 25 13:38:14 2018 -0700
>> 
>> --
>>  src/Makefile.am |   1 +
>>  src/tests/CMakeLists.txt|   1 +
>>  .../linux_devices_isolator_tests.cpp| 231 +++
>>  3 files changed, 233 insertions(+)
>> --
>> 
>> 
>> http://git-wip-us.apache.org/repos/asf/mesos/blob/ee6c6cfc/src/Makefile.am
>> --
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index da0d683..b7184ce 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -2666,6 +2666,7 @@ mesos_tests_SOURCES += 
>>\
>>tests/containerizer/cgroups_tests.cpp\
>>tests/containerizer/cni_isolator_tests.cpp   \
>>tests/containerizer/docker_volume_isolator_tests.cpp \
>> +  tests/containerizer/linux_devices_isolator_tests.cpp \
>>tests/containerizer/linux_filesystem_isolator_tests.cpp  \
>>tests/containerizer/fs_tests.cpp \
>>tests/containerizer/memory_pressure_tests.cpp\
>> 
>> http://git-wip-us.apache.org/repos/asf/mesos/blob/ee6c6cfc/src/tests/CMakeLists.txt
>> --
>> diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
>> index 1fef060..b9c906d 100644
>> --- a/src/tests/CMakeLists.txt
>> +++ b/src/tests/CMakeLists.txt
>> @@ -224,6 +224,7 @@ if (LINUX)
>>  containerizer/docker_volume_isolator_tests.cpp
>>  containerizer/fs_tests.cpp
>>  containerizer/linux_capabilities_isolator_tests.cpp
>> +containerizer/linux_devices_isolator_tests.cpp
>>  containerizer/linux_filesystem_isolator_tests.cpp
>>  containerizer/memory_pressure_tests.cpp
>>  containerizer/nested_mesos_containerizer_tests.cpp
>> 
>> http://git-wip-us.apache.org/repos/asf/mesos/blob/ee6c6cfc/src/tests/containerizer/linux_devices_isolator_tests.cpp
>> --
>> diff --git a/src/tests/containerizer/linux_devices_isolator_tests.cpp 
>> b/src/tests/containerizer/linux_devices_isolator_tests.cpp
>> new file mode 100644
>> index 000..efaa43b
>> --- /dev/null
>> +++ b/src/tests/containerizer/linux_devices_isolator_tests.cpp
>> @@ -0,0 +1,231 @@
>> +// Licensed to the Apache Software Foundation (ASF) under one
>> +// or more contributor license agreements.  See the NOTICE file
>> +// distributed with this work for additional information
>> +// regarding copyright ownership.  The ASF licenses this file
>> +// to you under the Apache License, Version 2.0 (the
>> +// "License"); you may not use this file except in compliance
>> +// with the License.  You may obtain a copy of the License at
>> +//
>> +// http://www.apache.org/licenses/LICENSE-2.0
>> +//
>> +// Unless required by applicable law or agreed to in writing, software
>> +// distributed under the License is distributed on an "AS IS" BASIS,
>> +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>> +// See the License for the specific language governing permissions and
>> +// limitations under the License.
>> +
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#include "common/parse.hpp"
>> +
>> +#include "tests/cluster.hpp"
>> +#include "tests/mesos.hpp"
>> +
>> +#include "slave/containerizer/mesos/containerizer.hpp"
>

Re: [6/6] mesos git commit: Added `linux/devices` isolator whitelist tests.

2018-05-28 Thread Alex R
This commit breaks the build on Ubuntu 14.04 with `gcc (Ubuntu
4.8.4-2ubuntu1~14.04.4) 4.8.4` due to what seems to me a compiler bug,
likely this one [1]. Ubuntu 14.04 is officially supported until mid-2019,
hence not sure we can ignore this issue.

James, can you commit a workaround?

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57824

On 25 May 2018 at 23:12,  wrote:

> Added `linux/devices` isolator whitelist tests.
>
> Added test to verify that the `linux/devices` isolator supports
> populating devices that are whitelisted by the `allowed_devices`
> agent flag.
>
> Review: https://reviews.apache.org/r/67145/
>
>
> Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
> Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ee6c6cfc
> Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ee6c6cfc
> Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ee6c6cfc
>
> Branch: refs/heads/master
> Commit: ee6c6cfcbe2b91eaf540afa38bab4521d23b747f
> Parents: 68db3f9
> Author: James Peach 
> Authored: Fri May 25 13:38:14 2018 -0700
> Committer: James Peach 
> Committed: Fri May 25 13:38:14 2018 -0700
>
> --
>  src/Makefile.am |   1 +
>  src/tests/CMakeLists.txt|   1 +
>  .../linux_devices_isolator_tests.cpp| 231 +++
>  3 files changed, 233 insertions(+)
> --
>
>
> http://git-wip-us.apache.org/repos/asf/mesos/blob/ee6c6cfc/src/Makefile.am
> --
> diff --git a/src/Makefile.am b/src/Makefile.am
> index da0d683..b7184ce 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -2666,6 +2666,7 @@ mesos_tests_SOURCES +=
>   \
>tests/containerizer/cgroups_tests.cpp\
>tests/containerizer/cni_isolator_tests.cpp   \
>tests/containerizer/docker_volume_isolator_tests.cpp \
> +  tests/containerizer/linux_devices_isolator_tests.cpp \
>tests/containerizer/linux_filesystem_isolator_tests.cpp  \
>tests/containerizer/fs_tests.cpp \
>tests/containerizer/memory_pressure_tests.cpp\
>
> http://git-wip-us.apache.org/repos/asf/mesos/blob/ee6c6cfc/
> src/tests/CMakeLists.txt
> --
> diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
> index 1fef060..b9c906d 100644
> --- a/src/tests/CMakeLists.txt
> +++ b/src/tests/CMakeLists.txt
> @@ -224,6 +224,7 @@ if (LINUX)
>  containerizer/docker_volume_isolator_tests.cpp
>  containerizer/fs_tests.cpp
>  containerizer/linux_capabilities_isolator_tests.cpp
> +containerizer/linux_devices_isolator_tests.cpp
>  containerizer/linux_filesystem_isolator_tests.cpp
>  containerizer/memory_pressure_tests.cpp
>  containerizer/nested_mesos_containerizer_tests.cpp
>
> http://git-wip-us.apache.org/repos/asf/mesos/blob/ee6c6cfc/
> src/tests/containerizer/linux_devices_isolator_tests.cpp
> --
> diff --git a/src/tests/containerizer/linux_devices_isolator_tests.cpp
> b/src/tests/containerizer/linux_devices_isolator_tests.cpp
> new file mode 100644
> index 000..efaa43b
> --- /dev/null
> +++ b/src/tests/containerizer/linux_devices_isolator_tests.cpp
> @@ -0,0 +1,231 @@
> +// Licensed to the Apache Software Foundation (ASF) under one
> +// or more contributor license agreements.  See the NOTICE file
> +// distributed with this work for additional information
> +// regarding copyright ownership.  The ASF licenses this file
> +// to you under the Apache License, Version 2.0 (the
> +// "License"); you may not use this file except in compliance
> +// with the License.  You may obtain a copy of the License at
> +//
> +// http://www.apache.org/licenses/LICENSE-2.0
> +//
> +// Unless required by applicable law or agreed to in writing, software
> +// distributed under the License is distributed on an "AS IS" BASIS,
> +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> +// See the License for the specific language governing permissions and
> +// limitations under the License.
> +
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include "common/parse.hpp"
> +
> +#include "tests/cluster.hpp"
> +#include "tests/mesos.hpp"
> +
> +#include "slave/containerizer/mesos/containerizer.hpp"
> +
> +#include "tests/containerizer/docker_archive.hpp"
> +
> +using process::Future;
> +using process::Owned;
> +
> +using std::map;
> +using std::ostream;
> +using std::string;
> +
> +using mesos::internal::slave::Containerizer;
> +using mesos::internal::slave::Fetcher;
> +using mesos::inte