mesos-site git commit: Updated the website built from mesos SHA: be2ee83.
Repository: mesos-site Updated Branches: refs/heads/asf-site 33d26065d -> e5950137b Updated the website built from mesos SHA: be2ee83. Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/e5950137 Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/e5950137 Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/e5950137 Branch: refs/heads/asf-site Commit: e5950137ba4e6e1d7e9195fe52be21fe869dcd0d Parents: 33d2606 Author: jenkins Authored: Thu Jul 12 03:26:14 2018 + Committer: jenkins Committed: Thu Jul 12 03:26:14 2018 + -- .../app-framework-development-guide/index.html | 361 ++- .../app-framework-development-guide/index.html | 361 ++- 2 files changed, 52 insertions(+), 670 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos-site/blob/e5950137/content/documentation/app-framework-development-guide/index.html -- diff --git a/content/documentation/app-framework-development-guide/index.html b/content/documentation/app-framework-development-guide/index.html index 9dd6aff..fb3db8e 100644 --- a/content/documentation/app-framework-development-guide/index.html +++ b/content/documentation/app-framework-development-guide/index.html @@ -119,276 +119,29 @@ and Scala. Create your Framework Scheduler +API + If you are writing a scheduler against Mesos 1.0 or newer, it is recommended to use the new HTTP API to talk to Mesos. -If your framework needs to talk to Mesos 0.28.0 or older, you can write the -scheduler in C++, Java/Scala, or Python. Your framework scheduler should inherit -from the Scheduler class (see API below). Your scheduler should create a SchedulerDriver +If your framework needs to talk to Mesos 0.28.0 or older, or you have not updated to the +HTTP API, you can write the scheduler in C++, Java/Scala, or Python. +Your framework scheduler should inherit from the Scheduler class +(see: https://github.com/apache/mesos/blob/1.6.0/include/mesos/scheduler.hpp#L58-L177;>C++, +http://mesos.apache.org/api/latest/java/org/apache/mesos/Scheduler.html;>Java, +https://github.com/apache/mesos/blob/1.6.0/src/python/interface/src/mesos/interface/__init__.py#L34-L137;>Python). Your scheduler should create a SchedulerDriver (which will mediate +communication between your scheduler and the Mesos master) and then call SchedulerDriver.run() +(see: https://github.com/apache/mesos/blob/1.6.0/include/mesos/scheduler.hpp#L180-L317;>C++, +http://mesos.apache.org/api/latest/java/org/apache/mesos/SchedulerDriver.html;>Java, +https://github.com/apache/mesos/blob/1.6.0/src/python/interface/src/mesos/interface/__init__.py#L140-L278;>Python). + +Your scheduler should create a SchedulerDriver (which will mediate communication between your scheduler and the Mesos master) and then call -SchedulerDriver.run(). - -Scheduler API - -Callback interface to be implemented by framework schedulers. - -Declared in MESOS_HOME/include/mesos/scheduler.hpp - -/* - * Invoked when the scheduler successfully registers with a Mesos - * master. A unique ID (generated by the master) used for - * distinguishing this framework from others and `MasterInfo` - * with the ip and port of the current master are provided as arguments. - */ -virtual void registered( -SchedulerDriver* driver, -const FrameworkID frameworkId, -const MasterInfo masterInfo); - -/* - * Invoked when the scheduler reregisters with a newly elected Mesos master. - * This is only called when the scheduler has previously been registered. - * `MasterInfo` containing the updated information about the elected master - * is provided as an argument. - */ -virtual void reregistered( -SchedulerDriver* driver, -const MasterInfo masterInfo); - -/* - * Invoked when the scheduler becomes "disconnected" from the master - * (e.g., the master fails and another is taking over). - */ -virtual void disconnected(SchedulerDriver* driver); - -/* - * Invoked when resources have been offered to this framework. A - * single offer will only contain resources from a single slave. - * Resources associated with an offer will not be re-offered to - * _this_ framework until either (a) this framework has rejected - * those resources (see SchedulerDriver::launchTasks) or (b) those - * resources have been rescinded (see Scheduler::offerRescinded). - * Note that resources may be concurrently offered to more than one - * framework at a time (depending on the allocator being used). In - * that case, the first framework to launch tasks using those - * resources will be able to use them while the other frameworks - * will have those resources rescinded (or if a framework has - * already launched tasks with those resources then those tasks will
mesos git commit: Removed embedded interfaces from the framework development guide.
Repository: mesos Updated Branches: refs/heads/master 2915a80bd -> be2ee8366 Removed embedded interfaces from the framework development guide. This replaces embedded interfaces in the document to links to the actual interfaces. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/be2ee836 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/be2ee836 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/be2ee836 Branch: refs/heads/master Commit: be2ee83663226e145ef323400edb3aeaa6fbe0a5 Parents: 2915a80 Author: Benjamin Mahler Authored: Wed Jul 11 20:01:43 2018 -0700 Committer: Benjamin Mahler Committed: Wed Jul 11 20:01:43 2018 -0700 -- docs/app-framework-development-guide.md | 362 ++- 1 file changed, 25 insertions(+), 337 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/be2ee836/docs/app-framework-development-guide.md -- diff --git a/docs/app-framework-development-guide.md b/docs/app-framework-development-guide.md index 835757e..035ac1f 100644 --- a/docs/app-framework-development-guide.md +++ b/docs/app-framework-development-guide.md @@ -15,277 +15,28 @@ and Scala. ## Create your Framework Scheduler +### API If you are writing a scheduler against Mesos 1.0 or newer, it is recommended to use the new [HTTP API](scheduler-http-api.md) to talk to Mesos. -If your framework needs to talk to Mesos 0.28.0 or older, you can write the -scheduler in C++, Java/Scala, or Python. Your framework scheduler should inherit -from the `Scheduler` class (see API below). Your scheduler should create a SchedulerDriver +If your framework needs to talk to Mesos 0.28.0 or older, or you have not updated to the +[HTTP API](scheduler-http-api.md), you can write the scheduler in C++, Java/Scala, or Python. +Your framework scheduler should inherit from the `Scheduler` class +(see: [C++](https://github.com/apache/mesos/blob/1.6.0/include/mesos/scheduler.hpp#L58-L177), +[Java](http://mesos.apache.org/api/latest/java/org/apache/mesos/Scheduler.html), +[Python](https://github.com/apache/mesos/blob/1.6.0/src/python/interface/src/mesos/interface/__init__.py#L34-L137)). Your scheduler should create a SchedulerDriver (which will mediate +communication between your scheduler and the Mesos master) and then call `SchedulerDriver.run()` +(see: [C++](https://github.com/apache/mesos/blob/1.6.0/include/mesos/scheduler.hpp#L180-L317), +[Java](http://mesos.apache.org/api/latest/java/org/apache/mesos/SchedulerDriver.html), +[Python](https://github.com/apache/mesos/blob/1.6.0/src/python/interface/src/mesos/interface/__init__.py#L140-L278)). + +Your scheduler should create a SchedulerDriver (which will mediate communication between your scheduler and the Mesos master) and then call -`SchedulerDriver.run()`. +`SchedulerDriver.run()`: -### Scheduler API +### High Availability -Callback interface to be implemented by framework schedulers. - -Declared in `MESOS_HOME/include/mesos/scheduler.hpp` - -~~~{.cpp} -/* - * Invoked when the scheduler successfully registers with a Mesos - * master. A unique ID (generated by the master) used for - * distinguishing this framework from others and `MasterInfo` - * with the ip and port of the current master are provided as arguments. - */ -virtual void registered( -SchedulerDriver* driver, -const FrameworkID& frameworkId, -const MasterInfo& masterInfo); - -/* - * Invoked when the scheduler reregisters with a newly elected Mesos master. - * This is only called when the scheduler has previously been registered. - * `MasterInfo` containing the updated information about the elected master - * is provided as an argument. - */ -virtual void reregistered( -SchedulerDriver* driver, -const MasterInfo& masterInfo); - -/* - * Invoked when the scheduler becomes "disconnected" from the master - * (e.g., the master fails and another is taking over). - */ -virtual void disconnected(SchedulerDriver* driver); - -/* - * Invoked when resources have been offered to this framework. A - * single offer will only contain resources from a single slave. - * Resources associated with an offer will not be re-offered to - * _this_ framework until either (a) this framework has rejected - * those resources (see SchedulerDriver::launchTasks) or (b) those - * resources have been rescinded (see Scheduler::offerRescinded). - * Note that resources may be concurrently offered to more than one - * framework at a time (depending on the allocator being used). In - * that case, the first framework to launch tasks using those - * resources will be able to use them while the other frameworks - * will have those resources rescinded (or if a framework has - * already launched tasks with those
svn commit: r28066 - in /dev/mesos/1.6.1-rc2: ./ mesos-1.6.1.tar.gz mesos-1.6.1.tar.gz.asc mesos-1.6.1.tar.gz.sha512
Author: grag Date: Thu Jul 12 01:08:32 2018 New Revision: 28066 Log: Adding mesos-1.6.1-rc2. Added: dev/mesos/1.6.1-rc2/ dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz (with props) dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz.asc dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz.sha512 Added: dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz == Binary file - no diff available. Propchange: dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz -- svn:mime-type = application/octet-stream Added: dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz.asc == --- dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz.asc (added) +++ dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz.asc Thu Jul 12 01:08:32 2018 @@ -0,0 +1,17 @@ +-BEGIN PGP SIGNATURE- +Version: GnuPG v2.0.22 (GNU/Linux) + +iQIcBAABAgAGBQJbRqn7AAoJEEPsLr7bUMMbnDUP/As8o4N9/pQTmiBunkYGO/iF +9VwrrhTHhF5wxsl1wBRX3KlAVSO3w3hI4yd8LsZzGakeuWKo682OcVY9exK3fz4k +KZcV/Auh2xby39GZ8YWrJzAR65byeFu0FaIkNvf1ZpwAlABnYCjBvs0nPVNPkG6I +Lbjz5fausRgc081PqqdUaA/0foKVjX1d1dXm85jVSWX5sdy0mbeQiabLeApfKVFq +aPt7CZxiARHoiWrQwgl8lBElhTCEnUieB6o4scvZnbbaCn1k4ZkK74aP+InmuKjJ +w+SnBfM/8Nl/9lBJ3LrUK1W0MCYR06eYgAfSYQ3EZIZCsXFU/oLc+5oU9tHgaGbT ++Hzr8L85n0Q28TzM57zcazV1GbcRBX4Xk+E2KXXngEP7H2W+nckT6xQOIQ8ESDsq +mmrv/CLJk5lCdyJ48y7hzXeVodlTmlvGsJDPsb8h7dqiiPmaSW1HjKBW3+QIjsV8 +1sQHGKkk9LUtIkfxB7PvJVbYcQ5w1pXYdqQ0JWE7Ubli8iLiOlVGqtuU03Wez+Hd +RJgP56RCwJPgQzMRHXi9M2G8zjLfiq+p2nLMle7xK1T2Nw2v6ZdGZ6Wxk9mtZWzf +Wq3LKvXy+RNUSJ93wWvfWETHBWNitOw6b3KFtKfECh0Mbwv37nBcUg6E2RmSRqCa +CAuNmHpZY79UPEek3/Ve +=N/Wu +-END PGP SIGNATURE- Added: dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz.sha512 == --- dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz.sha512 (added) +++ dev/mesos/1.6.1-rc2/mesos-1.6.1.tar.gz.sha512 Thu Jul 12 01:08:32 2018 @@ -0,0 +1 @@ +4d28e705a7ed3adbb2205cf404133e8cf0292456f899771f6e1c7a22c47e82bde76d761c525878543d118f4f4d81239f5ed704e2b7a6f854bf7b35a7159fa709 mesos-1.6.1.tar.gz
[mesos] Git Push Summary
Repository: mesos Updated Tags: refs/tags/1.6.1-rc2 [created] 81b8755a7
[4/4] mesos-site git commit: Updated the website built from mesos SHA: 2915a80.
Updated the website built from mesos SHA: 2915a80. Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/33d26065 Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/33d26065 Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/33d26065 Branch: refs/heads/asf-site Commit: 33d26065d287e9b0203f8f3b1e282ff47af3b6da Parents: c251209 Author: jenkins Authored: Thu Jul 12 00:33:38 2018 + Committer: jenkins Committed: Thu Jul 12 00:33:38 2018 + -- ...nclude_2stout_2tests_2utils_8hpp_source.html |2 +- .../latest/c++/docker__archive_8hpp_source.html |2 +- .../latest/c++/docker__common_8hpp_source.html |2 +- content/api/latest/c++/posix_2rmdir_8hpp.html |1 - .../latest/c++/posix_2rmdir_8hpp_source.html|6 +- .../latest/c++/windows_2rmdir_8hpp_source.html |2 +- content/sitemap.xml | 9338 +- 7 files changed, 4675 insertions(+), 4678 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos-site/blob/33d26065/content/api/latest/c++/3rdparty_2stout_2include_2stout_2tests_2utils_8hpp_source.html -- diff --git a/content/api/latest/c++/3rdparty_2stout_2include_2stout_2tests_2utils_8hpp_source.html b/content/api/latest/c++/3rdparty_2stout_2include_2stout_2tests_2utils_8hpp_source.html index 601e895..16f2fbb 100644 --- a/content/api/latest/c++/3rdparty_2stout_2include_2stout_2tests_2utils_8hpp_source.html +++ b/content/api/latest/c++/3rdparty_2stout_2include_2stout_2tests_2utils_8hpp_source.html @@ -53,7 +53,7 @@ Go to the documentation of this file.1// Licensed under the Apache License, Version 2.0 (the License);2// you may not use this file except in compliance with the License.3// You may obtain a copy of the License at4//5// http://www.apache.org/licenses/LICENSE-2.06//7// Unless required by applicable law or agreed to in writing, software8// distributed under the License is distributed on an AS IS BASIS,9// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10// See the License for the specific language governing permissions and 11// limitations under the License. 12 13#ifndef __STOUT_TESTS_UTILS_HPP__ 14#define __STOUT_TESTS_UTILS_HPP__ 15 16#include string 17 18#include gtest/gtest.h 19 20#include stout/gtest.hpp 21#include stout/try.hpp 22 23#include stout/os/chdir.hpp 24#include stout/os/getcwd.hpp 25#include stout/os/mkdtemp.hpp 26#include stout/os/realpath.hpp 27#include stout/os/rmdir.hpp 28 29#if __FreeBSD__ 30#include stout/os/sysctl.hpp 31#endif 32 33class TemporaryDirectoryTest : public ::testing::Test 34{ 35protected: 36 virtual void SetUp() 37 { 38// Save the current working directory. 39cwd = os::getcwd(); 40 41// Create a temporary directory for the test. 42Trystd::string directory = os::mkdtemp(); 43 ASSERT_SOME(directory) t; Failed to mkdtemp; 44 45// We get the `realpath` of the temporary directory because some 46// platforms, like macOS, symlink `/tmp` to `/private/var`, but 47// return the symlink name when creating temporary directories. 48// This is problematic because a lot of tests compare the 49// `realpath` of a temporary file. 50Resultstd::string realpath = os::realpath(directory.get()); 51ASSERT_SOME(realpath) Failed to get realpath of directory.get() 52 :53 (realpath.isError() ? realpath.error() 54 : No such directory); 55sandbox = realpath.get(); 56 57 // Run the test out of the temporary directory we created. 58ASSERT_SOME(os::chdir(sandbox.get())) 59 Failed to chdir into sandbox.get() ; 60 } 61 62 virtual void TearDown() 63 { 64// Return to previous working directory and cleanup the sandbox. 65ASSERT_SOME(os::chdir(cwd)); 66 67if (sandbox.isSome()) { 68 ASSERT_SOME(os::rmdir(sandbox.get())); 69} 70 } 71 72 // A temporary directory for test purposes. 73 // Not to be confused with the sandbox that tasks are run in. 74 Optionstd::string sandbox; 75 76private: 77 std::string cwd; 78}; 79 80 81#ifdef __FreeBSD__ 82inline bool isJailed() { 83 int mib[4]; 84 size_t len = 4; 85 ::sysctlnametomib(security.jail.jailed, mib, len); 86 Tryint jailed = os::sysctl(mib[0], mib[1], mib[2]).integer(); 87 if (jailed.isSome()) { 88 return jailed.get() == 1; 89 } 90 91 return false; 92} 93#endif
[3/4] mesos-site git commit: Updated the website built from mesos SHA: 2915a80.
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/33d26065/content/api/latest/c++/docker__common_8hpp_source.html -- diff --git a/content/api/latest/c++/docker__common_8hpp_source.html b/content/api/latest/c++/docker__common_8hpp_source.html index 41b47ea..7cc541d 100644 --- a/content/api/latest/c++/docker__common_8hpp_source.html +++ b/content/api/latest/c++/docker__common_8hpp_source.html @@ -52,7 +52,7 @@ docker_common.hpp -Go to the documentation of this file.1// Licensed to the Apache Software Foundation (ASF) under one2// or more contributor license agreements. See the NOTICE file 3// distributed with this work for additional information4// regarding copyright ownership. The ASF licenses this file5// to you under the Apache License, Version 2.0 (the6// License); you may not use this file except in compliance7// with the License. You may obtain a copy of the License at8//9// http://www.apache.org/licenses/LICENSE-2.0 10// 11// Unless required by applicable law or agreed to in writing, software 12// di stributed under the License is distributed on an AS IS BASIS, 13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14// See the License for the specific language governing permissions and 15// limitations under the License. 16 17#ifndef __TEST_DOCKER_COMMON_HPP__ 18#define __TEST_DOCKER_COMMON_HPP__ 19 20#include string 21 22#include process/future.hpp 23#include process/gtest.hpp 24#include process/io.hpp 25#include process/owned.hpp 26#include process/subprocess.hpp 27 28#include stout/format.hpp 29#include stout/gtest.hpp 30#include stout/lambda.hpp 31#include stout/nothing.hpp 32#include stout/option.hpp 33#include stout/try.hpp 34 35#include stout/os/mkdtemp.hpp 3 6 37#include docker/docker.hpp 38 39#include tests/flags.hpp 40 41namespace mesos { 42namespace internal { 43namespace tests { 44 45#ifdef __WINDOWS__ 46// The following image is the microsoft/nanoserver image with 47// ContainerAdministrator as the default user. There are some permission bugs 48// with accessing volume mounts in process (but not Hyper-V) isolation as 49// the regular ContainerUser user, but accesing them as ContainerAdministrator 50// works fine. 51static constexpr char DOCKER_TEST_IMAGE[] = akagup/nano-admin; 52 53// We use a custom HTTP(S) server here, because the official `microsoft/iis` 54// HTTP server image is ~20x larger than this one, so pulling it takes too 55// long. This server supports HTTP and HTTPS listening on port 80 and 443. 56// For more information, see https://github.com/gupta-ak/https-server. 57static constexpr char DOCKER_HTTP_IMAGE[] = akagup/https-server; 58static constexpr char DOCKER_HTTP_COMMAND[] = http.exe; 59static constexpr char DOCKER_HTTPS_IMAGE[] = uot;akagup/https-server; 60static constexpr char DOCKER_HTTPS_COMMAND[] = http.exe; 61#else 62static constexpr char DOCKER_TEST_IMAGE[] = alpine; 63 64// The HTTP server is netcat running on alpine. 65static constexpr char DOCKER_HTTP_IMAGE[] = alpine; 66static constexpr char DOCKER_HTTP_COMMAND[] = 67 nc -lk -p 80 -e echo -e \HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\; 68 69// Refer to https://github.com/qianzhangxa/https-server for 70// how the Docker image `zhq527725/https-server` works. 71static constexpr char DOCKER_HTTPS_IMAGE[] = zhq527725/https-server; 72static constexpr char DOCKER_HTTPS_COMMAND[] = python https_server.py 443; 73#endif // __WINDOWS__ 74 75constexpr char DOCKER_IPv6_NETWORK[] = mesos-docker-ip6-test; 76 77 78inline process::FutureNothing pullDockerImage(const std::string imageName) 79{ 80 Tryprocess::OwnedDocker docker = 81Docker::create(tests::flags.docker, tests::flags.docker_socket, false); 82 83 if (docker.isError()) { 84 return process::Failure(docker.error()); 85 } 86 87 const Trystd::string directory = os::mkdtemp(); 88 if (directory.isError()) { 89 return process::Failure(docker.error()); 90 }< span class="lineno"> 91 92 return docker.get()-pull(directory.get(), imageName) 93.then([]() { 94 // `Docker::pull` returns a `FutureDocker::Image`, but we only really 95 // if the pull was successful, so we just return `Nothing` to match the 96 // return type of `pullDockerImage`. 97 return Nothing(); 98}) 99 .onAny([directory]() - process::FutureNothing { 100 TryNothing rmdir = os::rmdir(directory.get()); 101 if (rmdir.isError()) { 102 return process::Failure(rmdir.error()); 103 } 104 return Nothing(); 105}); 106} 107 108 109inline void createDockerIPv6UserNetwork() 110{ 111 // Docker IPv6 is not supported on
[2/4] mesos-site git commit: Updated the website built from mesos SHA: 2915a80.
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/33d26065/content/api/latest/c++/posix_2rmdir_8hpp_source.html -- diff --git a/content/api/latest/c++/posix_2rmdir_8hpp_source.html b/content/api/latest/c++/posix_2rmdir_8hpp_source.html index 9a3c189..2e5d48d 100644 --- a/content/api/latest/c++/posix_2rmdir_8hpp_source.html +++ b/content/api/latest/c++/posix_2rmdir_8hpp_source.html @@ -52,8 +52,8 @@ rmdir.hpp -Go to the documentation of this file. 1// Licensed under the Apache License, Version 2.0 (the License);2// you may not use this file except in compliance with the License.3// You may obtain a copy of the License at4//5// http://www.apache.org/licenses/LICENSE-2.06//< /span> 7// Unless required by applicable law or agreed to in writing, software8// distributed under the License is distributed on an AS IS BASIS,9// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10// See the License for the specific language governing permissions and 11// limitations under the License. 12 13#ifndef __STOUT_OS_POSIX_RMDIR_HPP__ 14#define __STOUT_OS_POSIX_RMDIR_HPP__ 15 16#include fts.h 17#include unistd.h 18#include string 19 20#i nclude glog/logging.h 21 22#include stout/error.hpp 23#include stout/nothing.hpp 24#include stout/path.hpp 25#include stout/stringify.hpp 26#include stout/try.hpp 27 28#include stout/os/exists.hpp 29 30 31namespace os { 32 33// By default, recursively deletes a directory akin to: rm -r. If 34// `recursive` is false, it deletes a directory akin to: rmdir. In 35// recursive mode, `removeRoot` can be set to false to enable removing 36// all the files and directories beneath the given root directory, but 37// not the root directory itself. 38// Note that this function expects an absolute path. 39// By default rmdir aborts when an error occurs during the deletion of 40// any file but if continueOnError is set to true, rmdir logs the error 41// and continues with the next file. 42#ifndef __sun // FTS is not available on Solaris. 43inline TryNothing rmdir( 44 const std::string directory, 45bool recursive = true, 46bool removeRoot = true, 47bool continueOnError = false) 48{ 49 unsigned int errorCount = 0; 50 51 if (!recursive) {class="line"> 52 >if (::href="namespaceos.html#a84298b990ad52dfd353358427b04ff3f">rmdir(directory.c_str()) > 0) { > 53 return href="classErrnoError.html">ErrnoError();name="l00054"> 54}class="line"> 55 } >else {name="l00056"> 56class="comment">// NOTE: `fts_open` will not always return `nullptr` if the >path does notclass="lineno"> 57// exist. We manually induce an error here to indicate that we cant remove 58// a directory that does not exist. 59if (!os::exists(directory)) { 60 return ErrnoError(ENOENT); 61} 62 63char* paths[] = {const_castchar*(directory.c_str()), nullptr}; 64 65 // Using `FTS_PHYSICAL` here because we need `FTSENT` for the 66// symbolic link in the directory and not the target it links to. 67FTS* tree = fts_open(paths, (FTS_NOCHDIR | FTS_PHYSICAL), nullptr); 68if (tree == nullptr) { 69 return ErrnoError(); 70} 71 72FTSENT* node; 73while ((node = fts_read(tree)) != nullptr) { 74 switch (node-fts_info) { 75 case FTS_D P: 76 // Dont remove the root of the traversal of `removeRoot` 77 // is false. 78 if (!removeRoot node-fts_level == FTS_ROOTLEVEL) { 79continue; 80 } 81 82 if (::rmdir(node-fts_path) 0 errno != ENOENT) { 83if (continueOnError) { 84 LOG(ERROR) Failed to delete directory85 path::join(directory, node-fts_path) 86 : os::strerror(errno); 87 ++errorCount; 88} else { 89 Error error = ErrnoError(); 90 fts_close(tree); 91 return error; 92}class="lineno"> 93 }name="l00094"> 94 class="keywordflow">break;name="l00095"> 95class="comment">// `FTS_DEFAULT` would include any file type which is >not > 96// explicitly described by any >of the other `fts_info` values.name="l00097"> 97class="keywordflow">case FTS_DEFAULT:name="l00098"> 98class="keywordflow">case FTS_F:name="l00099"> 99class="keywo rdflow">case FTS_SL: 100// `FTS_SLNONE` should never be the case as we dont set 101// `FTS_COMFOLLOW` or `FTS_LOGICAL`. Adding here for completion. 102case FTS_SLNONE: 103 if (::unlink(node-fts_path) 0 errno != ENOENT) { 104 if (continueOnError) { 105
[1/4] mesos-site git commit: Updated the website built from mesos SHA: 2915a80.
Repository: mesos-site Updated Branches: refs/heads/asf-site c2512090e -> 33d26065d http://git-wip-us.apache.org/repos/asf/mesos-site/blob/33d26065/content/sitemap.xml -- diff --git a/content/sitemap.xml b/content/sitemap.xml index 8327aea..b8fad45 100644 --- a/content/sitemap.xml +++ b/content/sitemap.xml @@ -2,18678 +2,18678 @@ http://www.sitemaps.org/schemas/sitemap/0.9;> http://mesos.apache.org/downloads/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/fetcher-cache-internals/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/allocation-module/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/api-client-libraries/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/attributes-resources/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/reconciliation/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/architecture/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/operator-http-api/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/advanced-contribution/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/mesos-containerizer/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/fault-domains/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/versioning/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/framework-rate-limiting/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/containerizers/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/shared-resources/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/oversubscription/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/maintenance/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/developer-guide/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/markdown-style-guide/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/operational-guide/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/fetcher/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/frameworks/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/reporting-an-issue/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/resource-provider/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/configuration/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/cmake/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/upgrades/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/scheduler-http-api/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/task-state-reasons/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/nested-container-and-task-group/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/secrets/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00 http://mesos.apache.org/documentation/latest/authentication/ -2018-07-11T00:00:00+00:00 +2018-07-12T00:00:00+00:00
mesos git commit: Fixed the error log in POSIX `os::rmdir`.
Repository: mesos Updated Branches: refs/heads/master 4bcfefe21 -> 2915a80bd Fixed the error log in POSIX `os::rmdir`. The POSIX implementation of `os::rmdir` uses FTS functions to walk through all paths under a given directory. According to the manpage, the `fts_path` field "contains the path specified to fts_open() as a prefix," so should not be joined with the given directory again. See: http://man7.org/linux/man-pages/man3/fts.3.html Review: https://reviews.apache.org/r/67881 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2915a80b Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2915a80b Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2915a80b Branch: refs/heads/master Commit: 2915a80bd348b364d463f2e4c581ad2d996e51a0 Parents: 4bcfefe Author: Chun-Hung Hsiao Authored: Tue Jul 10 16:07:43 2018 -0700 Committer: Chun-Hung Hsiao Committed: Wed Jul 11 17:05:20 2018 -0700 -- 3rdparty/stout/include/stout/os/posix/rmdir.hpp | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/2915a80b/3rdparty/stout/include/stout/os/posix/rmdir.hpp -- diff --git a/3rdparty/stout/include/stout/os/posix/rmdir.hpp b/3rdparty/stout/include/stout/os/posix/rmdir.hpp index 947bb24..8283ac6 100644 --- a/3rdparty/stout/include/stout/os/posix/rmdir.hpp +++ b/3rdparty/stout/include/stout/os/posix/rmdir.hpp @@ -21,7 +21,6 @@ #include #include -#include #include #include @@ -81,9 +80,8 @@ inline Try rmdir( if (::rmdir(node->fts_path) < 0 && errno != ENOENT) { if (continueOnError) { - LOG(ERROR) << "Failed to delete directory " - << path::join(directory, node->fts_path) - << ": " << os::strerror(errno); + LOG(ERROR) << "Failed to delete directory '" << node->fts_path + << "': " << os::strerror(errno); ++errorCount; } else { Error error = ErrnoError(); @@ -102,9 +100,8 @@ inline Try rmdir( case FTS_SLNONE: if (::unlink(node->fts_path) < 0 && errno != ENOENT) { if (continueOnError) { - LOG(ERROR) << "Failed to delete path " - << path::join(directory, node->fts_path) - << ": " << os::strerror(errno); + LOG(ERROR) << "Failed to delete path '" << node->fts_path + << "': " << os::strerror(errno); ++errorCount; } else { Error error = ErrnoError();
mesos git commit: Added MESOS-8987 to the 1.5.2 CHANGELOG.
Repository: mesos Updated Branches: refs/heads/master 648b73ec2 -> 4bcfefe21 Added MESOS-8987 to the 1.5.2 CHANGELOG. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4bcfefe2 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4bcfefe2 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4bcfefe2 Branch: refs/heads/master Commit: 4bcfefe219a3195f26f33f9cad49d79c0dfea3ef Parents: 648b73e Author: Greg Mann Authored: Wed Jul 11 12:26:39 2018 -0700 Committer: Greg Mann Committed: Wed Jul 11 13:10:26 2018 -0700 -- CHANGELOG | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/4bcfefe2/CHANGELOG -- diff --git a/CHANGELOG b/CHANGELOG index 98a5f19..8e28b51 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -436,6 +436,7 @@ Release Notes - Mesos - Version 1.5.2 (WIP) * [MESOS-8963] - Executor crash trying to print container ID. * [MESOS-8980] - mesos-slave can deadlock with docker pull. * [MESOS-8986] - `slave.available()` in the allocator is expensive and drags down allocation performance. + * [MESOS-8987] - Master asks agent to shutdown upon auth errors. * [MESOS-9024] - Mesos master segfaults with stack overflow under load. * [MESOS-9049] - Agent GC could unmount a dangling persistent volume multiple times.
[1/2] mesos git commit: Prevented master from asking agents to shutdown on auth failures.
Repository: mesos Updated Branches: refs/heads/1.5.x 2440c7310 -> eee8f2124 Prevented master from asking agents to shutdown on auth failures. The Mesos master sends a `ShutdownMessage` to an agent if there is an authentication or an authorization error during agent (re)registration. Upon receipt of this message, the agent kills alls its tasks and commits suicide. This means that transient auth errors can lead to whole agents being killed along with its tasks. This patch prevents the master from sending a `ShutdownMessage` in these cases. Review: https://reviews.apache.org/r/67791/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b8bbe0d4 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b8bbe0d4 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b8bbe0d4 Branch: refs/heads/1.5.x Commit: b8bbe0d49d68932e36a76c36e4357ac3fdb5d244 Parents: 2440c73 Author: Gastón Kleiman Authored: Tue Jul 10 08:04:15 2018 -0700 Committer: Greg Mann Committed: Tue Jul 10 09:07:27 2018 -0700 -- src/master/master.cpp| 14 --- src/tests/authentication_tests.cpp | 33 +--- src/tests/master_authorization_tests.cpp | 55 --- 3 files changed, 69 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/b8bbe0d4/src/master/master.cpp -- diff --git a/src/master/master.cpp b/src/master/master.cpp index 15893a7..05724f1 100644 --- a/src/master/master.cpp +++ b/src/master/master.cpp @@ -6123,9 +6123,6 @@ void Master::registerSlave( // without authentication. LOG(WARNING) << "Refusing registration of agent at " << from << " because it is not authenticated"; -ShutdownMessage message; -message.set_message("Agent is not authenticated"); -send(from, message); return; } @@ -6200,10 +6197,6 @@ void Master::_registerSlave( << " (" << slaveInfo.hostname() << ")" << ": " << authorizationError.get(); -ShutdownMessage message; -message.set_message(authorizationError.get()); -send(pid, message); - slaves.registering.erase(pid); return; } @@ -6447,9 +6440,6 @@ void Master::reregisterSlave( // re-register without authentication. LOG(WARNING) << "Refusing re-registration of agent at " << from << " because it is not authenticated"; -ShutdownMessage message; -message.set_message("Agent is not authenticated"); -send(from, message); return; } @@ -6552,10 +6542,6 @@ void Master::_reregisterSlave( << " at " << pid << " (" << slaveInfo.hostname() << ")" << ": " << authorizationError.get(); -ShutdownMessage message; -message.set_message(authorizationError.get()); -send(pid, message); - slaves.reregistering.erase(slaveInfo.id()); return; } http://git-wip-us.apache.org/repos/asf/mesos/blob/b8bbe0d4/src/tests/authentication_tests.cpp -- diff --git a/src/tests/authentication_tests.cpp b/src/tests/authentication_tests.cpp index 3c6124f..36944bc 100644 --- a/src/tests/authentication_tests.cpp +++ b/src/tests/authentication_tests.cpp @@ -79,14 +79,21 @@ TEST_F(AuthenticationTest, UnauthenticatedFramework) // This test verifies that an unauthenticated slave is -// denied registration by the master. +// denied registration by the master, but not shut down. TEST_F(AuthenticationTest, UnauthenticatedSlave) { Try> master = StartMaster(); ASSERT_SOME(master); - Future shutdownMessage = -FUTURE_PROTOBUF(ShutdownMessage(), _, _); + // Previously, agents were shut down when registration failed due to + // authorization. We verify that this no longer occurs. + EXPECT_NO_FUTURE_PROTOBUFS(ShutdownMessage(), _, _); + + // We verify that the agent isn't allowed to register. + EXPECT_NO_FUTURE_PROTOBUFS(SlaveRegisteredMessage(), _, _); + + Future registerSlaveMessage1 = +FUTURE_PROTOBUF(RegisterSlaveMessage(), _, _); // Start the slave without credentials. slave::Flags flags = CreateSlaveFlags(); @@ -96,9 +103,23 @@ TEST_F(AuthenticationTest, UnauthenticatedSlave) Try> slave = StartSlave(detector.get(), flags); ASSERT_SOME(slave); - // Slave should get error message from the master. - AWAIT_READY(shutdownMessage); - ASSERT_NE("", shutdownMessage->message()); + AWAIT_READY(registerSlaveMessage1); + + Future registerSlaveMessage2 = +FUTURE_PROTOBUF(RegisterSlaveMessage(), _, _); + + // Advance the clock to trigger another registration attempt. + Clock::pause(); + Clock::advance(slave::REGISTER_RETRY_INTERVAL_MAX); + Clock::settle(); +
[2/2] mesos git commit: Added MESOS-8987 to the 1.5.2 CHANGELOG.
Added MESOS-8987 to the 1.5.2 CHANGELOG. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/eee8f212 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/eee8f212 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/eee8f212 Branch: refs/heads/1.5.x Commit: eee8f212445fb924cc80b6b70e4edc88488a398a Parents: b8bbe0d Author: Greg Mann Authored: Wed Jul 11 12:26:39 2018 -0700 Committer: Greg Mann Committed: Wed Jul 11 12:26:39 2018 -0700 -- CHANGELOG | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/eee8f212/CHANGELOG -- diff --git a/CHANGELOG b/CHANGELOG index 4d97a61..79ae07b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,7 @@ Release Notes - Mesos - Version 1.5.2 (WIP) * [MESOS-8963] - Executor crash trying to print container ID. * [MESOS-8980] - mesos-slave can deadlock with docker pull. * [MESOS-8986] - `slave.available()` in the allocator is expensive and drags down allocation performance. + * [MESOS-8987] - Master asks agent to shutdown upon auth errors. * [MESOS-9024] - Mesos master segfaults with stack overflow under load. * [MESOS-9049] - Agent GC could unmount a dangling persistent volume multiple times.
mesos git commit: Added MESOS-8987 to the 1.6.1 CHANGELOG.
Repository: mesos Updated Branches: refs/heads/master 01475ec28 -> 648b73ec2 Added MESOS-8987 to the 1.6.1 CHANGELOG. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/648b73ec Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/648b73ec Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/648b73ec Branch: refs/heads/master Commit: 648b73ec22df131405efde87747f0269c13f93b5 Parents: 01475ec Author: Greg Mann Authored: Wed Jul 11 12:08:34 2018 -0700 Committer: Greg Mann Committed: Wed Jul 11 12:24:32 2018 -0700 -- CHANGELOG | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/648b73ec/CHANGELOG -- diff --git a/CHANGELOG b/CHANGELOG index 63ea41b..98a5f19 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -57,6 +57,7 @@ Release Notes - Mesos - Version 1.6.1 * [MESOS-8963] - Executor crash trying to print container ID. * [MESOS-8980] - mesos-slave can deadlock with docker pull. * [MESOS-8986] - `slave.available()` in the allocator is expensive and drags down allocation performance. + * [MESOS-8987] - Master asks agent to shutdown upon auth errors. * [MESOS-9002] - GCC 8.1 build failure in os::Fork::Tree. * [MESOS-9024] - Mesos master segfaults with stack overflow under load. * [MESOS-9025] - The container which joins CNI network and has checkpoint enabled will be mistakenly destroyed by agent.
[1/2] mesos git commit: Prevented master from asking agents to shutdown on auth failures.
Repository: mesos Updated Branches: refs/heads/1.6.x 052af588c -> ae82dd5cc Prevented master from asking agents to shutdown on auth failures. The Mesos master sends a `ShutdownMessage` to an agent if there is an authentication or an authorization error during agent (re)registration. Upon receipt of this message, the agent kills alls its tasks and commits suicide. This means that transient auth errors can lead to whole agents being killed along with its tasks. This patch prevents the master from sending a `ShutdownMessage` in these cases. Review: https://reviews.apache.org/r/67791/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/778430e1 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/778430e1 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/778430e1 Branch: refs/heads/1.6.x Commit: 778430e1368f22e3038a1de02b17f099ce0dab1d Parents: 052af58 Author: Gastón Kleiman Authored: Tue Jul 10 08:04:15 2018 -0700 Committer: Greg Mann Committed: Tue Jul 10 09:02:57 2018 -0700 -- src/master/master.cpp| 16 src/tests/authentication_tests.cpp | 33 ++-- src/tests/master_authorization_tests.cpp | 105 -- 3 files changed, 111 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/778430e1/src/master/master.cpp -- diff --git a/src/master/master.cpp b/src/master/master.cpp index 69411b5..42d64d1 100644 --- a/src/master/master.cpp +++ b/src/master/master.cpp @@ -6571,10 +6571,6 @@ void Master::registerSlave( // without authentication. LOG(WARNING) << "Refusing registration of agent at " << from << " because it is not authenticated"; - -ShutdownMessage message; -message.set_message("Agent is not authenticated"); -send(from, message); return; } @@ -6660,10 +6656,6 @@ void Master::_registerSlave( << " (" << slaveInfo.hostname() << ")" << ": " << authorizationError.get(); -ShutdownMessage message; -message.set_message(authorizationError.get()); -send(pid, message); - slaves.registering.erase(pid); return; } @@ -6907,10 +6899,6 @@ void Master::reregisterSlave( // reregister without authentication. LOG(WARNING) << "Refusing re-registration of agent at " << from << " because it is not authenticated"; - -ShutdownMessage message; -message.set_message("Agent is not authenticated"); -send(from, message); return; } @@ -7025,10 +7013,6 @@ void Master::_reregisterSlave( << " at " << pid << " (" << slaveInfo.hostname() << ")" << ": " << authorizationError.get(); -ShutdownMessage message; -message.set_message(authorizationError.get()); -send(pid, message); - slaves.reregistering.erase(slaveInfo.id()); return; } http://git-wip-us.apache.org/repos/asf/mesos/blob/778430e1/src/tests/authentication_tests.cpp -- diff --git a/src/tests/authentication_tests.cpp b/src/tests/authentication_tests.cpp index bd46cbc..c9a8f85 100644 --- a/src/tests/authentication_tests.cpp +++ b/src/tests/authentication_tests.cpp @@ -79,14 +79,21 @@ TEST_F(AuthenticationTest, UnauthenticatedFramework) // This test verifies that an unauthenticated slave is -// denied registration by the master. +// denied registration by the master, but not shut down. TEST_F(AuthenticationTest, UnauthenticatedSlave) { Try> master = StartMaster(); ASSERT_SOME(master); - Future shutdownMessage = -FUTURE_PROTOBUF(ShutdownMessage(), _, _); + // Previously, agents were shut down when registration failed due to + // authorization. We verify that this no longer occurs. + EXPECT_NO_FUTURE_PROTOBUFS(ShutdownMessage(), _, _); + + // We verify that the agent isn't allowed to register. + EXPECT_NO_FUTURE_PROTOBUFS(SlaveRegisteredMessage(), _, _); + + Future registerSlaveMessage1 = +FUTURE_PROTOBUF(RegisterSlaveMessage(), _, _); // Start the slave without credentials. slave::Flags flags = CreateSlaveFlags(); @@ -96,9 +103,23 @@ TEST_F(AuthenticationTest, UnauthenticatedSlave) Try> slave = StartSlave(detector.get(), flags); ASSERT_SOME(slave); - // Slave should get error message from the master. - AWAIT_READY(shutdownMessage); - ASSERT_NE("", shutdownMessage->message()); + AWAIT_READY(registerSlaveMessage1); + + Future registerSlaveMessage2 = +FUTURE_PROTOBUF(RegisterSlaveMessage(), _, _); + + // Advance the clock to trigger another registration attempt. + Clock::pause(); + Clock::advance(slave::REGISTER_RETRY_INTERVAL_MAX); + Clock::settle(); + Clock::resume(); +
[2/2] mesos git commit: Added MESOS-8987 to the 1.6.1 CHANGELOG.
Added MESOS-8987 to the 1.6.1 CHANGELOG. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ae82dd5c Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ae82dd5c Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ae82dd5c Branch: refs/heads/1.6.x Commit: ae82dd5cc6f415916702897acfd3085b6387b118 Parents: 778430e Author: Greg Mann Authored: Wed Jul 11 12:08:34 2018 -0700 Committer: Greg Mann Committed: Wed Jul 11 12:08:34 2018 -0700 -- CHANGELOG | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/ae82dd5c/CHANGELOG -- diff --git a/CHANGELOG b/CHANGELOG index 9939def..5253b20 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -24,6 +24,7 @@ Release Notes - Mesos - Version 1.6.1 * [MESOS-8963] - Executor crash trying to print container ID. * [MESOS-8980] - mesos-slave can deadlock with docker pull. * [MESOS-8986] - `slave.available()` in the allocator is expensive and drags down allocation performance. + * [MESOS-8987] - Master asks agent to shutdown upon auth errors. * [MESOS-9002] - GCC 8.1 build failure in os::Fork::Tree. * [MESOS-9024] - Mesos master segfaults with stack overflow under load. * [MESOS-9025] - The container which joins CNI network and has checkpoint enabled will be mistakenly destroyed by agent.
mesos-site git commit: Updated the website built from mesos SHA: 01475ec.
Repository: mesos-site Updated Branches: refs/heads/asf-site 7756eb655 -> c2512090e Updated the website built from mesos SHA: 01475ec. Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/c2512090 Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/c2512090 Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/c2512090 Branch: refs/heads/asf-site Commit: c2512090e8d6448d31bd3a2d83326323f5f37828 Parents: 7756eb6 Author: jenkins Authored: Wed Jul 11 18:54:08 2018 + Committer: jenkins Committed: Wed Jul 11 18:54:08 2018 + -- content/documentation/latest/windows/index.html | 8 +--- content/documentation/windows/index.html| 8 +--- 2 files changed, 2 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos-site/blob/c2512090/content/documentation/latest/windows/index.html -- diff --git a/content/documentation/latest/windows/index.html b/content/documentation/latest/windows/index.html index 7807160..316cff9 100644 --- a/content/documentation/latest/windows/index.html +++ b/content/documentation/latest/windows/index.html @@ -122,13 +122,7 @@ During installation, choose the Desktop development with C++ workl Install https://cmake.org/download/;>CMake 3.8.0 or later. During installation, choose to Add CMake to the system PATH for all users. Install http://gnuwin32.sourceforge.net/packages/patch.htm;>GNU patch for Windows. -If building from source, install https://git-scm.com/download/win;>Git. -During installation, keep the defaults to Use Git from the Windows -Command Prompt, and Checkout Windows-style, commit Unix-style -line endings (i.e. git config --global core.autocrlf true). The -last part is very important, because GNU patch will crash with -Assertion failed, hunk, file patch.c, line 343 if the patch files -on Windows are Unix-style (LF) instead of Windows-style (CRLF). +If building from source, install https://git-scm.com/download/win;>Git. Make sure there are no spaces in your build directory. For example, C:/Program Files (x86)/mesos is an invalid build directory. If developing Mesos, install https://www.python.org/downloads/;>Python 3 http://git-wip-us.apache.org/repos/asf/mesos-site/blob/c2512090/content/documentation/windows/index.html -- diff --git a/content/documentation/windows/index.html b/content/documentation/windows/index.html index 780fd66..88a2eb6 100644 --- a/content/documentation/windows/index.html +++ b/content/documentation/windows/index.html @@ -122,13 +122,7 @@ During installation, choose the Desktop development with C++ workl Install https://cmake.org/download/;>CMake 3.8.0 or later. During installation, choose to Add CMake to the system PATH for all users. Install http://gnuwin32.sourceforge.net/packages/patch.htm;>GNU patch for Windows. -If building from source, install https://git-scm.com/download/win;>Git. -During installation, keep the defaults to Use Git from the Windows -Command Prompt, and Checkout Windows-style, commit Unix-style -line endings (i.e. git config --global core.autocrlf true). The -last part is very important, because GNU patch will crash with -Assertion failed, hunk, file patch.c, line 343 if the patch files -on Windows are Unix-style (LF) instead of Windows-style (CRLF). +If building from source, install https://git-scm.com/download/win;>Git. Make sure there are no spaces in your build directory. For example, C:/Program Files (x86)/mesos is an invalid build directory. If developing Mesos, install https://www.python.org/downloads/;>Python 3
[1/2] mesos git commit: Cleaned up whitespace in `site/doap.rdf`.
Repository: mesos Updated Branches: refs/heads/master 14c68199c -> 01475ec28 Cleaned up whitespace in `site/doap.rdf`. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5076bab4 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5076bab4 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5076bab4 Branch: refs/heads/master Commit: 5076bab4d57e907071d45686b6968bc5077f Parents: 14c6819 Author: Andrew Schwartzmeyer Authored: Wed Jul 11 11:25:08 2018 -0700 Committer: Andrew Schwartzmeyer Committed: Wed Jul 11 11:25:08 2018 -0700 -- site/doap.rdf | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/5076bab4/site/doap.rdf -- diff --git a/site/doap.rdf b/site/doap.rdf index ce23184..e85ff0e 100644 --- a/site/doap.rdf +++ b/site/doap.rdf @@ -1,8 +1,8 @@ http://usefulinc.com/ns/doap#; - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; + xmlns="http://usefulinc.com/ns/doap#; + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns:asfext="http://projects.apache.org/ns/asfext#; xmlns:foaf="http://xmlns.com/foaf/0.1/;>
[2/2] mesos git commit: Made Git normalize all line endings automatically.
Made Git normalize all line endings automatically. Instead of relying on the user to `core.autocrlf = true` before cloning, we now set this in `.gitattributes` for all files. Only one file needed normalization via `git add --renormalize .`, it was `site/doap.rdf`. The Windows instructions were updated to remove the note about setting autocrlf globally, as it is no longer necessary, and could conflict with user desired settings. Review: https://reviews.apache.org/r/67730/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/01475ec2 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/01475ec2 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/01475ec2 Branch: refs/heads/master Commit: 01475ec287e34f6077bbef1299fda0619872feea Parents: 5076bab Author: Andrew Schwartzmeyer Authored: Mon Jun 25 12:02:40 2018 -0700 Committer: Andrew Schwartzmeyer Committed: Wed Jul 11 11:30:14 2018 -0700 -- .gitattributes | 5 + docs/windows.md | 6 -- site/doap.rdf | 10 +- 3 files changed, 10 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/01475ec2/.gitattributes -- diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000..c05b4ff --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Set `core.autocrlf = true` for this repo. +* text=auto + +# Treat patch files as text. +*.patch text http://git-wip-us.apache.org/repos/asf/mesos/blob/01475ec2/docs/windows.md -- diff --git a/docs/windows.md b/docs/windows.md index 86b9fe3..1e4deaf 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -21,12 +21,6 @@ Mesos 1.0.0 introduced experimental support for Windows. 3. Install [GNU patch for Windows](http://gnuwin32.sourceforge.net/packages/patch.htm). 4. If building from source, install [Git](https://git-scm.com/download/win). - During installation, keep the defaults to "Use Git from the Windows - Command Prompt", and "Checkout Windows-style, commit Unix-style - line endings" (i.e. `git config --global core.autocrlf true`). The - last part is _very_ important, because GNU patch will crash with - "Assertion failed, hunk, file patch.c, line 343" if the patch files - on Windows are Unix-style (LF) instead of Windows-style (CRLF). 5. Make sure there are no spaces in your build directory. For example, `C:/Program Files (x86)/mesos` is an invalid build directory. http://git-wip-us.apache.org/repos/asf/mesos/blob/01475ec2/site/doap.rdf -- diff --git a/site/doap.rdf b/site/doap.rdf index e85ff0e..d77e48a 100644 --- a/site/doap.rdf +++ b/site/doap.rdf @@ -27,12 +27,12 @@ Apache Mesos http://mesos.apache.org; /> http://mesos.apache.org; /> -Apache Mesos is a cluster manager that provides efficient resource isolation +Apache Mesos is a cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks. -Apache Mesos is a cluster manager that provides efficient resource isolation -and sharing across distributed applications, or frameworks. It can run Hadoop, -MPI, Hypertable, Spark, and other frameworks on a dynamically shared pool of -nodes. +Apache Mesos is a cluster manager that provides efficient resource isolation +and sharing across distributed applications, or frameworks. It can run Hadoop, +MPI, Hypertable, Spark, and other frameworks on a dynamically shared pool of +nodes. https://issues.apache.org/jira/browse/MESOS; /> http://mesos.apache.org/community/; />
[2/2] mesos-site git commit: Updated the website built from mesos SHA: 14c6819.
Updated the website built from mesos SHA: 14c6819. Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/7756eb65 Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/7756eb65 Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/7756eb65 Branch: refs/heads/asf-site Commit: 7756eb655ed8ec47d5a6c8e091263b676ecf303d Parents: 71339a1 Author: jenkins Authored: Wed Jul 11 17:21:56 2018 + Committer: jenkins Committed: Wed Jul 11 17:21:56 2018 + -- content/sitemap.xml | 9338 +++--- 1 file changed, 4669 insertions(+), 4669 deletions(-) --
[1/2] mesos-site git commit: Updated the website built from mesos SHA: 14c6819.
Repository: mesos-site Updated Branches: refs/heads/asf-site 71339a176 -> 7756eb655 http://git-wip-us.apache.org/repos/asf/mesos-site/blob/7756eb65/content/sitemap.xml -- diff --git a/content/sitemap.xml b/content/sitemap.xml index 0f55404..8327aea 100644 --- a/content/sitemap.xml +++ b/content/sitemap.xml @@ -2,18678 +2,18678 @@ http://www.sitemaps.org/schemas/sitemap/0.9;> http://mesos.apache.org/downloads/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/fetcher-cache-internals/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/allocation-module/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/api-client-libraries/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/attributes-resources/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/reconciliation/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/architecture/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/operator-http-api/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/advanced-contribution/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/mesos-containerizer/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/fault-domains/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/versioning/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/framework-rate-limiting/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/containerizers/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/shared-resources/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/oversubscription/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/maintenance/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/developer-guide/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/markdown-style-guide/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/operational-guide/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/fetcher/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/frameworks/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/reporting-an-issue/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/resource-provider/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/configuration/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/cmake/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/upgrades/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/scheduler-http-api/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/task-state-reasons/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/nested-container-and-task-group/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/secrets/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00 http://mesos.apache.org/documentation/latest/authentication/ -2018-07-10T00:00:00+00:00 +2018-07-11T00:00:00+00:00
[2/2] mesos git commit: Updated Python virtual environment dependencies.
Updated Python virtual environment dependencies. Fixes the error message when running support/build-virtualenv: `npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.`. Updates the PyInstaller dependency due to issues with PyInstaller 3.1.1 and Python 3.6. Review: https://reviews.apache.org/r/67856/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/14c68199 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/14c68199 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/14c68199 Branch: refs/heads/master Commit: 14c68199cb0a35c8f5dc77472ba483a73ae88653 Parents: 1cc7054 Author: Armand Grillet Authored: Wed Jul 11 12:22:00 2018 +0200 Committer: Benjamin Bannier Committed: Wed Jul 11 12:22:00 2018 +0200 -- src/python/cli_new/pip-requirements.txt | 6 +++--- support/build-virtualenv| 2 +- support/pip-requirements.txt| 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/14c68199/src/python/cli_new/pip-requirements.txt -- diff --git a/src/python/cli_new/pip-requirements.txt b/src/python/cli_new/pip-requirements.txt index aeb0233..8645912 100644 --- a/src/python/cli_new/pip-requirements.txt +++ b/src/python/cli_new/pip-requirements.txt @@ -1,4 +1,4 @@ -astroid==1.4.8 +astroid==1.6.5 backports.functools-lru-cache==1.2.1 configparser==3.5.0 docopt==0.6.2 @@ -8,9 +8,9 @@ lazy-object-proxy==1.2.2 mccabe==0.5.2 parse==1.8.0 Pygments==2.1.3 -PyInstaller==3.1.1 +PyInstaller==3.3.1 six==1.10.0 termcolor==1.1.0 toml==0.9.2 -tox==3.0.0 +tox==3.1.0 wrapt==1.10.8 http://git-wip-us.apache.org/repos/asf/mesos/blob/14c68199/support/build-virtualenv -- diff --git a/support/build-virtualenv b/support/build-virtualenv index b47f730..b8dc1d9 100755 --- a/support/build-virtualenv +++ b/support/build-virtualenv @@ -98,5 +98,5 @@ deactivate source ${VIRTUALENV_DIRECTORY}/bin/activate # Install the JavaScript linter in the virtual environment. -npm install -g eslint@4.6.1 +npm install -g eslint@5.1.0 deactivate http://git-wip-us.apache.org/repos/asf/mesos/blob/14c68199/support/pip-requirements.txt -- diff --git a/support/pip-requirements.txt b/support/pip-requirements.txt index 5877ad2..89c2de2 100644 --- a/support/pip-requirements.txt +++ b/support/pip-requirements.txt @@ -1,2 +1,2 @@ -nodeenv==1.1.2 -pylint==1.6.4 +nodeenv==1.3.1 +pylint==1.9.2
[1/2] mesos git commit: Added virtualenv requirements watcher to Python 3 mesos-style.py.
Repository: mesos Updated Branches: refs/heads/master a6f52defb -> 14c68199c Added virtualenv requirements watcher to Python 3 mesos-style.py. The Python and JavaScript linters run by mesos-style.py, called by our Git hooks, require a virtual environment. This virtual environment needs to be rebuilt by running `build-virtualenv` each time the pip dependencies of our Python codebase are updated. The check `should_build_virtualenv` had not been added to the Python 3 `mesos-style.py` for an unknown reason and this is now fixed. We pass the Python interpreter used to run `mesos-style.py` when running `build-virtualenv` in case Python 3 is used to run `mesos-style.py` but Python 2 is still the default `python`. Review: https://reviews.apache.org/r/67855/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1cc7054d Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/1cc7054d Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/1cc7054d Branch: refs/heads/master Commit: 1cc7054d1ae9b6180013353ddb7d5427f01c7cb2 Parents: a6f52de Author: Armand Grillet Authored: Wed Jul 11 12:21:54 2018 +0200 Committer: Benjamin Bannier Committed: Wed Jul 11 12:21:54 2018 +0200 -- support/python3/mesos-style.py | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/1cc7054d/support/python3/mesos-style.py -- diff --git a/support/python3/mesos-style.py b/support/python3/mesos-style.py index 0a4b1b1..350ef90 100755 --- a/support/python3/mesos-style.py +++ b/support/python3/mesos-style.py @@ -495,8 +495,11 @@ def build_virtualenv(): """ print('Rebuilding virtualenv...') +python3_env = os.environ.copy() +python3_env["PYTHON"] = sys.executable process = subprocess.Popen( [os.path.join('support', 'build-virtualenv')], +env=python3_env, stdout=subprocess.PIPE) output = '' @@ -510,6 +513,9 @@ def build_virtualenv(): sys.exit(1) if __name__ == '__main__': +if should_build_virtualenv(sys.argv[1:]): +build_virtualenv() + # TODO(ArmandGrillet): We should only instantiate the linters # required to lint the files to analyze. See MESOS-8351. CPP_LINTER = CppLinter()