mesos git commit: Temporarily disabled UriDiskProfileTest.FetchFromHTTP test.

2018-02-12 Thread alexr
Repository: mesos
Updated Branches:
  refs/heads/master 51c03b50a -> 0a40243c6


Temporarily disabled UriDiskProfileTest.FetchFromHTTP test.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0a40243c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0a40243c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0a40243c

Branch: refs/heads/master
Commit: 0a40243c6a35dc9dc41774d43ee3c19cdf9e54be
Parents: 51c03b5
Author: Alexander Rukletsov 
Authored: Mon Feb 12 11:06:24 2018 +0100
Committer: Alexander Rukletsov 
Committed: Mon Feb 12 11:06:24 2018 +0100

--
 src/tests/disk_profile_tests.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/0a40243c/src/tests/disk_profile_tests.cpp
--
diff --git a/src/tests/disk_profile_tests.cpp b/src/tests/disk_profile_tests.cpp
index 538208e..1bbbde0 100644
--- a/src/tests/disk_profile_tests.cpp
+++ b/src/tests/disk_profile_tests.cpp
@@ -411,7 +411,9 @@ TEST_F(UriDiskProfileTest, ParseInvalids)
 // This creates a UriDiskProfile module configured to read from a file
 // and tests the basic `watch` -> `translate` workflow which callers of
 // the module are expected to follow.
-TEST_F(UriDiskProfileTest, FetchFromFile)
+//
+// Enable this test once MESOS-8567 is resolved.
+TEST_F(UriDiskProfileTest, DISABLED_FetchFromFile)
 {
   Clock::pause();
 



mesos git commit: Fixed flakyness of MasterTest.UpdateSlaveMessageWithPendingOffers.

2018-02-12 Thread bbannier
Repository: mesos
Updated Branches:
  refs/heads/master 0a40243c6 -> 8ef59ed50


Fixed flakyness of MasterTest.UpdateSlaveMessageWithPendingOffers.

Under rare circumstances, the clock would have to be advanced to trigger
a new allocation cycle after 'UPDATE_SLAVE' has been handled in the
master. We also wait for old offers to be rescinded before waiting for
updated offers as sometimes the old offer could be received erroneously.

Review: https://reviews.apache.org/r/65348/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8ef59ed5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8ef59ed5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8ef59ed5

Branch: refs/heads/master
Commit: 8ef59ed50a8ce19383c7b52ad1dd6c1d93218021
Parents: 0a40243
Author: Jan Schlicht 
Authored: Mon Feb 12 14:01:04 2018 +0100
Committer: Benjamin Bannier 
Committed: Mon Feb 12 14:01:04 2018 +0100

--
 src/tests/master_tests.cpp | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/8ef59ed5/src/tests/master_tests.cpp
--
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 76c86f8..28663c7 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -8612,9 +8612,7 @@ TEST_F(MasterTest, RegistryGcByCount)
 // that isn't motivated by (re-)registration (e.g. when adding
 // resources) is correctly handled by agent and master: Offers are
 // rescinded and new resources are offered.
-//
-// TODO(alexr): Enable after MESOS-8490 is resolved.
-TEST_F(MasterTest, DISABLED_UpdateSlaveMessageWithPendingOffers)
+TEST_F(MasterTest, UpdateSlaveMessageWithPendingOffers)
 {
   Clock::pause();
 
@@ -8718,7 +8716,9 @@ TEST_F(MasterTest, 
DISABLED_UpdateSlaveMessageWithPendingOffers)
   updateState->mutable_resource_version_uuid()->set_value(
   id::UUID::random().toBytes());
 
-  EXPECT_CALL(*scheduler, rescind(_, _));
+  Future rescinded;
+  EXPECT_CALL(*scheduler, rescind(_, _))
+.WillOnce(FutureSatisfy());
 
   EXPECT_CALL(*scheduler, offers(_, _))
 .WillOnce(FutureArg<1>());
@@ -8727,6 +8727,11 @@ TEST_F(MasterTest, 
DISABLED_UpdateSlaveMessageWithPendingOffers)
 
   AWAIT_READY(updateSlaveMessage);
 
+  AWAIT_READY(rescinded);
+
+  Clock::advance(masterFlags.allocation_interval);
+  Clock::settle();
+
   AWAIT_READY(offers);
   ASSERT_FALSE(offers->offers().empty());
 



mesos-site git commit: Updated the website built from mesos SHA: 0a40243.

2018-02-12 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 807447aca -> de3c1c000


Updated the website built from mesos SHA: 0a40243.


Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/de3c1c00
Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/de3c1c00
Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/de3c1c00

Branch: refs/heads/asf-site
Commit: de3c1c000d87ae32dffdd72c8878d01612e6fb2b
Parents: 807447a
Author: jenkins 
Authored: Mon Feb 12 10:32:37 2018 +
Committer: jenkins 
Committed: Mon Feb 12 10:32:37 2018 +

--
 content/blog/feed.xml | 2 +-
 content/blog/performance-working-group-progress-report/index.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/de3c1c00/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 0718ecf..7ff592a 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#97;#x69;#108;#116;#111;#58;#x64;#101;#118;#64;#97;#112;#x61;#99;#x68;#x65;#46;#109;#x65;#115;#x6f;#x73;#x2e;#111;#x72;#103;#x64;#x65;#118;#x40;#97;#112;#97;#99;#x68;#x65;#46;#109;#x65;#x73;#111;#x73;#x2e;#111;#114;#103;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#x61;#105;#108;#116;#x6f;#x3a;#x64;#x65;#x76;#64;#97;#x70;#x61;#x63;#104;#x65;#46;#x6d;#x65;#115;#x6f;#x73;#x2e;#111;#114;#103;#100;#x65;#118;#64;#97;#x70;#97;#99;#x68;#x65;#46;#x6d;#x65;#x73;#x6f;#x73;#46;#x6f;#114;#x67;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/de3c1c00/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index 34e5247..0f0cd76 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



mesos-site git commit: Updated the website built from mesos SHA: 8ef59ed.

2018-02-12 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site de3c1c000 -> 7a788a044


Updated the website built from mesos SHA: 8ef59ed.


Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/7a788a04
Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/7a788a04
Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/7a788a04

Branch: refs/heads/asf-site
Commit: 7a788a04405e72c2464ba1cc81989c5fe9dfc58c
Parents: de3c1c0
Author: jenkins 
Authored: Mon Feb 12 13:26:56 2018 +
Committer: jenkins 
Committed: Mon Feb 12 13:26:56 2018 +

--
 content/blog/feed.xml | 2 +-
 content/blog/performance-working-group-progress-report/index.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/7a788a04/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 7ff592a..5ec7d8c 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#x61;#105;#108;#116;#x6f;#x3a;#x64;#x65;#x76;#64;#97;#x70;#x61;#x63;#104;#x65;#46;#x6d;#x65;#115;#x6f;#x73;#x2e;#111;#114;#103;#100;#x65;#118;#64;#97;#x70;#97;#99;#x68;#x65;#46;#x6d;#x65;#x73;#x6f;#x73;#46;#x6f;#114;#x67;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#x61;#105;#108;#116;#111;#x3a;#x64;#101;#x76;#x40;#97;#x70;#x61;#99;#104;#101;#x2e;#x6d;#101;#x73;#111;#x73;#46;#111;#114;#103;#x64;#101;#x76;#64;#x61;#112;#97;#x63;#104;#x65;#46;#109;#x65;#x73;#x6f;#x73;#46;#111;#x72;#x67;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/7a788a04/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index 0f0cd76..791f2e2 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



mesos-site git commit: Updated the website built from mesos SHA: a52ff5b.

2018-02-12 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 7a788a044 -> 104c6437f


Updated the website built from mesos SHA: a52ff5b.


Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/104c6437
Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/104c6437
Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/104c6437

Branch: refs/heads/asf-site
Commit: 104c6437f493c3e5130f7048b098a5524d0b8d9f
Parents: 7a788a0
Author: jenkins 
Authored: Mon Feb 12 16:02:38 2018 +
Committer: jenkins 
Committed: Mon Feb 12 16:02:38 2018 +

--
 content/blog/feed.xml | 2 +-
 content/blog/performance-working-group-progress-report/index.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/104c6437/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 5ec7d8c..7555052 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#x61;#105;#108;#116;#111;#x3a;#x64;#101;#x76;#x40;#97;#x70;#x61;#99;#104;#101;#x2e;#x6d;#101;#x73;#111;#x73;#46;#111;#114;#103;#x64;#101;#x76;#64;#x61;#112;#97;#x63;#104;#x65;#46;#109;#x65;#x73;#x6f;#x73;#46;#111;#x72;#x67;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#97;#x69;#x6c;#116;#x6f;#x3a;#x64;#101;#118;#x40;#x61;#112;#97;#99;#x68;#101;#x2e;#109;#x65;#x73;#111;#x73;#46;#x6f;#x72;#x67;#100;#x65;#118;#64;#97;#112;#97;#x63;#104;#x65;#46;#x6d;#x65;#115;#x6f;#115;#46;#x6f;#x72;#x67;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/104c6437/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index 791f2e2..2c9bae7 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



mesos git commit: Started from merge-base when posting reviews.

2018-02-12 Thread bbannier
Repository: mesos
Updated Branches:
  refs/heads/master 8ef59ed50 -> a52ff5baf


Started from merge-base when posting reviews.

When posting a review originally created from a branch B, it could
happen that the resulting review included garbage changes if B was
updated between revisions. (i.e., pulling new master changes)

This review changes the logic of the post-reviews.py script to only
include the changes between HEAD and the merge base of the tracking
branch into the review.

Review: https://reviews.apache.org/r/65545/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a52ff5ba
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a52ff5ba
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a52ff5ba

Branch: refs/heads/master
Commit: a52ff5baf1a755f29e8fa90ace02576856551742
Parents: 8ef59ed
Author: Benno Evers 
Authored: Mon Feb 12 15:11:44 2018 +0100
Committer: Benjamin Bannier 
Committed: Mon Feb 12 16:37:24 2018 +0100

--
 support/post-reviews.py | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/a52ff5ba/support/post-reviews.py
--
diff --git a/support/post-reviews.py b/support/post-reviews.py
index 94b4325..a6646f2 100755
--- a/support/post-reviews.py
+++ b/support/post-reviews.py
@@ -199,6 +199,19 @@ def main():
 # Always put us back on the original branch.
 atexit.register(lambda: execute(['git', 'checkout', branch]))
 
+# Warn if the tracking branch is no direct ancestor of this review chain.
+if execute([
+'git', 'merge-base', '--is-ancestor', tracking_branch, branch_ref],
+ignore_errors=True) is None:
+print >> sys.stderr, \
+"WARNING: Tracking branch '%s' is no direct ancestor of HEAD." \
+" Did you forget to rebase?" % tracking_branch
+
+try:
+raw_input("Press enter to continue or 'Ctrl-C' to abort.\n")
+except KeyboardInterrupt:
+sys.exit(0)
+
 merge_base = execute(
 ['git', 'merge-base', tracking_branch, branch_ref]).strip()
 
@@ -209,6 +222,7 @@ def main():
 '--pretty=format:%Cred%H%Creset -%C'
 '(yellow)%d%Creset %s %Cgreen(%cr)%Creset',
 merge_base + '..HEAD'])
+
 print 'Running \'%s\' across all of ...' % " ".join(post_review)
 print output
 
@@ -230,7 +244,7 @@ def main():
 sha = line.split()[0]
 shas.append(sha)
 
-previous = tracking_branch
+previous = merge_base
 parent_review_request_id = None
 for i, sha in enumerate(shas):
 execute(['git', 'branch', '-D', temporary_branch], True)



mesos-site git commit: Updated the website built from mesos SHA: c691dc5.

2018-02-12 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 104c6437f -> 6d62b8d7a


Updated the website built from mesos SHA: c691dc5.


Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/6d62b8d7
Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/6d62b8d7
Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/6d62b8d7

Branch: refs/heads/asf-site
Commit: 6d62b8d7a84e4a6a698766032f5fe3e2cec2b26e
Parents: 104c643
Author: jenkins 
Authored: Mon Feb 12 17:31:44 2018 +
Committer: jenkins 
Committed: Mon Feb 12 17:31:44 2018 +

--
 content/blog/feed.xml | 2 +-
 content/blog/performance-working-group-progress-report/index.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/6d62b8d7/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 7555052..02cd2d4 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#97;#x69;#x6c;#116;#x6f;#x3a;#x64;#101;#118;#x40;#x61;#112;#97;#99;#x68;#101;#x2e;#109;#x65;#x73;#111;#x73;#46;#x6f;#x72;#x67;#100;#x65;#118;#64;#97;#112;#97;#x63;#104;#x65;#46;#x6d;#x65;#115;#x6f;#115;#46;#x6f;#x72;#x67;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#97;#x69;#x6c;#116;#111;#x3a;#100;#101;#x76;#64;#x61;#112;#x61;#99;#104;#101;#46;#109;#101;#115;#x6f;#115;#x2e;#111;#114;#x67;#100;#x65;#x76;#x40;#x61;#x70;#97;#99;#104;#x65;#46;#109;#x65;#x73;#111;#115;#46;#x6f;#114;#103;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/6d62b8d7/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index 2c9bae7..4c68f0b 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



mesos git commit: Install ping for docker build.

2018-02-12 Thread jpeach
Repository: mesos
Updated Branches:
  refs/heads/master a52ff5baf -> c691dc5f8


Install ping for docker build.

By default the Ubuntu docker image does not contain `ping`.
We need to manually install it with `iputils-ping`.

Refs: https://stackoverflow.com/a/39901446/1387612

Review: https://reviews.apache.org/r/65569/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c691dc5f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c691dc5f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c691dc5f

Branch: refs/heads/master
Commit: c691dc5f8997b8e1947b5f52afc344ae1d6b1591
Parents: a52ff5b
Author: Tomasz Janiszewski 
Authored: Mon Feb 12 08:54:19 2018 -0800
Committer: James Peach 
Committed: Mon Feb 12 08:54:19 2018 -0800

--
 support/docker-build.sh | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/c691dc5f/support/docker-build.sh
--
diff --git a/support/docker-build.sh b/support/docker-build.sh
index 126d4e7..435413a 100755
--- a/support/docker-build.sh
+++ b/support/docker-build.sh
@@ -71,6 +71,8 @@ case $OS in
   *16.04*)
 echo "Install Ubuntu 16.04 LTS (Xenial Xerus) specific packages"
 append_dockerfile "RUN apt-get install -y openjdk-8-jdk zlib1g-dev"
+# Install ping required by OsTest.Which
+append_dockerfile "RUN apt-get install -y iputils-ping"
;;
   *)
 append_dockerfile "RUN apt-get install -y openjdk-7-jdk"



[2/5] mesos git commit: Fixed a bug relating to lingering executors [2/2].

2018-02-12 Thread bmahler
Fixed a bug relating to lingering executors [2/2].

A task-less v1 executor could linger if the agent restarts
before any of the executor's initial tasks got delivered.
This was because we checked for the executor having any
tasks running before we remove the dropped tasks.

This patch fixes this issue by checking whether the
executor should be shut down *after* we've removed the
tasks that were dropped during agent restart.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0ef1c35c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0ef1c35c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0ef1c35c

Branch: refs/heads/1.3.x
Commit: 0ef1c35c499c5d7f97b53c4b4c43b7a55e103043
Parents: bf28130
Author: Meng Zhu 
Authored: Wed Feb 7 17:46:15 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 15:21:58 2018 -0800

--
 src/slave/slave.cpp | 135 ---
 1 file changed, 68 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/0ef1c35c/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 93e996e..53934bc 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -128,6 +128,7 @@ using std::find;
 using std::list;
 using std::map;
 using std::ostringstream;
+using std::shared_ptr;
 using std::set;
 using std::string;
 using std::vector;
@@ -3656,34 +3657,6 @@ void Slave::subscribe(
 CHECK_SOME(os::touch(path));
   }
 
-  // Here, we kill the executor if it no longer has any task or task group
-  // to run (e.g., framework sent a `killTask()`). This is a workaround for
-  // those executors (e.g., command executor, default executor) that do not
-  // have a proper self terminating logic when they haven't received the
-  // task or task group within a timeout.
-  if (!executor->everSentTask() && executor->queuedTasks.empty()) {
-LOG(WARNING) << "Shutting down subscribing executor " << *executor
- << " because it was never sent a task and"
- << " has no tasks to run";
-
-_shutdownExecutor(framework, executor);
-
-return;
-  }
-
-  // Tell executor it's registered and give it any queued tasks
-  // or task groups.
-  executor::Event event;
-  event.set_type(executor::Event::SUBSCRIBED);
-
-  executor::Event::Subscribed* subscribed = event.mutable_subscribed();
-  subscribed->mutable_executor_info()->CopyFrom(executor->info);
-  subscribed->mutable_framework_info()->MergeFrom(framework->info);
-  subscribed->mutable_slave_info()->CopyFrom(info);
-  subscribed->mutable_container_id()->CopyFrom(executor->containerId);
-
-  executor->send(event);
-
   // Handle all the pending updates.
   // The status update manager might have already checkpointed some
   // of these pending updates (for example, if the slave died right
@@ -3699,45 +3672,6 @@ void Slave::subscribe(
 None());
   }
 
-  // Update the resource limits for the container. Note that the
-  // resource limits include the currently queued tasks because we
-  // want the container to have enough resources to hold the
-  // upcoming tasks.
-  Resources resources = executor->resources;
-
-  foreachvalue (const TaskInfo& task, executor->queuedTasks) {
-resources += task.resources();
-  }
-
-  // We maintain a copy of the tasks in `queuedTaskGroups` also in
-  // `queuedTasks`. Hence, we need to ensure that we don't send the same
-  // tasks to the executor twice.
-  LinkedHashMap queuedTasks;
-  foreachpair (const TaskID& taskId,
-   const TaskInfo& taskInfo,
-   executor->queuedTasks) {
-queuedTasks[taskId] = taskInfo;
-  }
-
-  foreach (const TaskGroupInfo& taskGroup, executor->queuedTaskGroups) {
-foreach (const TaskInfo& task, taskGroup.tasks()) {
-  const TaskID& taskId = task.task_id();
-  if (queuedTasks.contains(taskId)) {
-queuedTasks.erase(taskId);
-  }
-}
-  }
-
-  containerizer->update(executor->containerId, resources)
-.onAny(defer(self(),
- ::___run,
- lambda::_1,
- framework->id(),
- executor->id,
- executor->containerId,
- queuedTasks.values(),
- executor->queuedTaskGroups));
-
   hashmap unackedTasks;
   foreach (const TaskInfo& task, subscribe.unacknowledged_tasks()) {
 

[4/5] mesos git commit: Fixed two slave recovery tests.

2018-02-12 Thread bmahler
Fixed two slave recovery tests.

These two tests are affected by the lingering executor fix
(#65109). We should wait to make sure tasks are actually launched
on the executor before trigger the agent failover. Otherwise, the
container will be shutdown upon re-registration because the executor
has never received any task.

Review: https://reviews.apache.org/r/65572/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/320efb5a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/320efb5a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/320efb5a

Branch: refs/heads/1.3.x
Commit: 320efb5aa24113b6056adfc1fd2ceb496e179038
Parents: d85fb56
Author: Meng Zhu 
Authored: Thu Feb 8 17:19:48 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 15:24:24 2018 -0800

--
 src/tests/slave_recovery_tests.cpp | 22 ++
 1 file changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/320efb5a/src/tests/slave_recovery_tests.cpp
--
diff --git a/src/tests/slave_recovery_tests.cpp 
b/src/tests/slave_recovery_tests.cpp
index 4f5a6a2..331c129 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -4145,7 +4145,11 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, 
CGROUPS_ROOT_PidNamespaceForward)
   // Scheduler expectations.
   EXPECT_CALL(sched, registered(_, _, _));
 
+  Future statusStarting;
+  Future statusRunning;
   EXPECT_CALL(sched, statusUpdate(_, _))
+.WillOnce(FutureArg<1>())
+.WillOnce(FutureArg<1>())
 .WillRepeatedly(Return());
 
   Future offers1;
@@ -4177,6 +4181,13 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, 
CGROUPS_ROOT_PidNamespaceForward)
 
   ContainerID containerId = *(containers->begin());
 
+  // Wait until task is running.
+  AWAIT_READY(statusStarting);
+  EXPECT_EQ(TASK_STARTING, statusStarting->state());
+
+  AWAIT_READY(statusRunning);
+  EXPECT_EQ(TASK_RUNNING, statusRunning->state());
+
   // Stop the slave.
   slave.get()->terminate();
 
@@ -4249,7 +4260,11 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, 
CGROUPS_ROOT_PidNamespaceBackward)
   // Scheduler expectations.
   EXPECT_CALL(sched, registered(_, _, _));
 
+  Future statusStarting;
+  Future statusRunning;
   EXPECT_CALL(sched, statusUpdate(_, _))
+.WillOnce(FutureArg<1>())
+.WillOnce(FutureArg<1>())
 .WillRepeatedly(Return());
 
   Future offers1;
@@ -4281,6 +4296,13 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, 
CGROUPS_ROOT_PidNamespaceBackward)
 
   ContainerID containerId = *(containers->begin());
 
+  // Wait until task is running.
+  AWAIT_READY(statusStarting);
+  EXPECT_EQ(TASK_STARTING, statusStarting->state());
+
+  AWAIT_READY(statusRunning);
+  EXPECT_EQ(TASK_RUNNING, statusRunning->state());
+
   // Stop the slave.
   slave.get()->terminate();
 



mesos-site git commit: Updated the website built from mesos SHA: 9ec1823.

2018-02-12 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 6d62b8d7a -> 3e696e957


Updated the website built from mesos SHA: 9ec1823.


Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/3e696e95
Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/3e696e95
Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/3e696e95

Branch: refs/heads/asf-site
Commit: 3e696e9571ff71e60e98c2b98493540914a6de66
Parents: 6d62b8d
Author: jenkins 
Authored: Mon Feb 12 23:56:16 2018 +
Committer: jenkins 
Committed: Mon Feb 12 23:56:16 2018 +

--
 content/blog/feed.xml | 2 +-
 content/blog/performance-working-group-progress-report/index.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/3e696e95/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 02cd2d4..9ef901a 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#97;#x69;#x6c;#116;#111;#x3a;#100;#101;#x76;#64;#x61;#112;#x61;#99;#104;#101;#46;#109;#101;#115;#x6f;#115;#x2e;#111;#114;#x67;#100;#x65;#x76;#x40;#x61;#x70;#97;#99;#104;#x65;#46;#109;#x65;#x73;#111;#115;#46;#x6f;#114;#103;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#97;#105;#x6c;#x74;#111;#58;#x64;#101;#x76;#x40;#x61;#x70;#x61;#99;#x68;#101;#x2e;#109;#x65;#115;#111;#x73;#46;#x6f;#114;#x67;#x64;#x65;#118;#x40;#x61;#x70;#x61;#99;#104;#x65;#46;#x6d;#x65;#x73;#111;#115;#x2e;#x6f;#x72;#103;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/3e696e95/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index 4c68f0b..dfecd4e 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



[1/5] mesos git commit: Fixed a bug relating to lingering executors [1/2].

2018-02-12 Thread bmahler
Repository: mesos
Updated Branches:
  refs/heads/1.3.x 56f1de415 -> 522896273


Fixed a bug relating to lingering executors [1/2].

An executor should be shutdown if all of its tasks are
killed while the executor is launching.

This patch fixes an issue where the executor is left
running when the task(s) get killed between the executor
registration/subscription and `Slave::___run()`. See
MESOS-8411 for more details. There is an additional race
in the agent failover case that is addressed in this patch.

The fix here is to fix the race by checking an executor's various
tasks queues during task kill and executor (re-)registration,
and shutting down executors that had never received any tasks.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bf281305
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bf281305
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bf281305

Branch: refs/heads/1.3.x
Commit: bf281305cc628d6acdc15b800f869ae9c876271e
Parents: 56f1de4
Author: Meng Zhu 
Authored: Wed Feb 7 17:01:58 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 15:21:39 2018 -0800

--
 src/slave/constants.hpp |   8 +++
 src/slave/slave.cpp | 118 +++
 src/slave/slave.hpp |  24 +
 3 files changed, 129 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/bf281305/src/slave/constants.hpp
--
diff --git a/src/slave/constants.hpp b/src/slave/constants.hpp
index 398bf62..1b2037c 100644
--- a/src/slave/constants.hpp
+++ b/src/slave/constants.hpp
@@ -84,6 +84,14 @@ constexpr size_t MAX_COMPLETED_FRAMEWORKS = 50;
 constexpr size_t DEFAULT_MAX_COMPLETED_EXECUTORS_PER_FRAMEWORK = 150;
 
 // Maximum number of completed tasks per executor to store in memory.
+//
+// NOTE: This should be greater than zero because the agent looks
+// for completed tasks to determine (with false positives) whether
+// an executor ever received tasks. See MESOS-8411.
+//
+// TODO(mzhu): Remove this note once we can determine whether an
+// executor ever received tasks without looking through the
+// completed tasks.
 constexpr size_t MAX_COMPLETED_TASKS_PER_EXECUTOR = 200;
 
 // Default cpus offered by the slave.

http://git-wip-us.apache.org/repos/asf/mesos/blob/bf281305/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 54e2782..93e996e 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -2471,6 +2471,12 @@ void Slave::___run(
 return;
   }
 
+  // At this point, we must have either sent some tasks to the running
+  // executor or there are queued tasks that need to be delivered.
+  // Otherwise, the executor state would have been synchronously
+  // transitioned to TERMINATING when the queued tasks were killed.
+  CHECK(executor->everSentTask() || !executor->queuedTasks.empty());
+
   foreach (const TaskInfo& task, tasks) {
 // This is the case where the task is killed. No need to send
 // status update because it should be handled in 'killTask'.
@@ -2955,6 +2961,10 @@ void Slave::killTask(
 statusUpdate(update, UPID());
   }
 
+  // TODO(mzhu): Consider shutting down the executor here
+  // if all of its initial tasks are killed rather than
+  // waiting for it to register.
+
   break;
 }
 case Executor::TERMINATING:
@@ -3011,6 +3021,19 @@ void Slave::killTask(
   // a later point in time, it won't get this task.
   statusUpdate(update, UPID());
 }
+
+// Shutdown the executor if all of its initial tasks are killed.
+// See MESOS-8411. This is a workaround for those executors (e.g.,
+// command executor, default executor) that do not have a proper
+// self terminating logic when they haven't received the task or
+// task group within a timeout.
+if (!executor->everSentTask() && executor->queuedTasks.empty()) {
+  LOG(WARNING) << "Shutting down executor " << *executor
+   << " because it has never been sent a task and all of"
+   << " its queued tasks have been killed before delivery";
+
+  _shutdownExecutor(framework, executor);
+}
   } else {
 // Send a message to the executor and wait for
 // it to send us a status update.
@@ -3638,15 +3661,10 @@ void Slave::subscribe(
   // those executors (e.g., command executor, default executor) that do not
   // have a proper self terminating logic when they haven't received the
   // task or task group within a timeout.
-  if (state != RECOVERING &&
-  

[2/3] mesos git commit: Added MESOS-8552 to the 1.3.3 CHANGELOG.

2018-02-12 Thread bmahler
Added MESOS-8552 to the 1.3.3 CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0e60df3b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0e60df3b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0e60df3b

Branch: refs/heads/master
Commit: 0e60df3bf8aae8cbee5561475506268a7552b6d7
Parents: 5a30fd1
Author: Benjamin Mahler 
Authored: Mon Feb 12 15:27:13 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 15:27:13 2018 -0800

--
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/0e60df3b/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 019c257..f47b44b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -806,6 +806,7 @@ All Issues:
   * [MESOS-8411] - Killing a queued task can lead to the command executor 
never terminating.
   * [MESOS-8125] - Agent should properly handle recovering an executor when 
its pid is reused.
   * [MESOS-8480] - Mesos returns high resource usage when killing a Docker 
task.
+  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
 
 
 Release Notes - Mesos - Version 1.3.2



mesos git commit: Updated the description of MESOS-8552 in the CHANGELOG.

2018-02-12 Thread bmahler
Repository: mesos
Updated Branches:
  refs/heads/1.5.x d06a49fc3 -> b82d550f5


Updated the description of MESOS-8552 in the CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b82d550f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b82d550f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b82d550f

Branch: refs/heads/1.5.x
Commit: b82d550f51d0a5cf4cc1ac9925f06b2a2a974888
Parents: d06a49f
Author: Benjamin Mahler 
Authored: Mon Feb 12 15:27:35 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 15:31:47 2018 -0800

--
 CHANGELOG | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/b82d550f/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 9fb4547..db1f827 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,7 +7,7 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-8125] - Agent should properly handle recovering an executor when its 
pid is reused.
  * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
  * [MESOS-8510] - URI disk profile adaptor does not consider plugin type for a 
profile.
- * [MESOS-8552] - Failing `CGROUPS_ROOT_PidNamespaceForward` and 
`CGROUPS_ROOT_PidNamespaceBackward`
+ * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
 
 
 Release Notes - Mesos - Version 1.5.0



[5/5] mesos git commit: Added MESOS-8552 to the 1.3.3 CHANGELOG.

2018-02-12 Thread bmahler
Added MESOS-8552 to the 1.3.3 CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/52289627
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/52289627
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/52289627

Branch: refs/heads/1.3.x
Commit: 5228962733b16a79fe1a9b743a5f904b7455e282
Parents: 320efb5
Author: Benjamin Mahler 
Authored: Mon Feb 12 15:27:13 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 15:28:00 2018 -0800

--
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/52289627/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 978c794..37e8cb1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,7 @@ All Issues:
   * [MESOS-8411] - Killing a queued task can lead to the command executor 
never terminating.
   * [MESOS-8125] - Agent should properly handle recovering an executor when 
its pid is reused.
   * [MESOS-8480] - Mesos returns high resource usage when killing a Docker 
task.
+  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
 
 
 Release Notes - Mesos - Version 1.3.2



[3/3] mesos git commit: Updated the description of MESOS-8552 in the CHANGELOG.

2018-02-12 Thread bmahler
Updated the description of MESOS-8552 in the CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9ec18232
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9ec18232
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9ec18232

Branch: refs/heads/master
Commit: 9ec1823298ab4357e8a7f9a4c9d2f26705bff1dc
Parents: 0e60df3
Author: Benjamin Mahler 
Authored: Mon Feb 12 15:27:35 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 15:27:35 2018 -0800

--
 CHANGELOG | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/9ec18232/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index f47b44b..57fc92b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,7 +7,7 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-8125] - Agent should properly handle recovering an executor when its 
pid is reused.
  * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
  * [MESOS-8510] - URI disk profile adaptor does not consider plugin type for a 
profile.
- * [MESOS-8552] - Failing `CGROUPS_ROOT_PidNamespaceForward` and 
`CGROUPS_ROOT_PidNamespaceBackward`
+ * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
 
 
 Release Notes - Mesos - Version 1.5.0



[3/5] mesos git commit: Added MESOS-8411 to the 1.3.3 CHANGELOG.

2018-02-12 Thread bmahler
Added MESOS-8411 to the 1.3.3 CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d85fb562
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d85fb562
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d85fb562

Branch: refs/heads/1.3.x
Commit: d85fb56264a6e3c72f3679db3fa6ebe760f8dc15
Parents: 0ef1c35
Author: Benjamin Mahler 
Authored: Mon Feb 12 15:23:24 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 15:24:24 2018 -0800

--
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/d85fb562/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 65ef3a6..978c794 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@ Release Notes - Mesos - Version 1.3.3 (WIP)
 
 All Issues:
 ** Bug
+  * [MESOS-8411] - Killing a queued task can lead to the command executor 
never terminating.
   * [MESOS-8125] - Agent should properly handle recovering an executor when 
its pid is reused.
   * [MESOS-8480] - Mesos returns high resource usage when killing a Docker 
task.
 



[1/3] mesos git commit: Added MESOS-8411 to the 1.3.3 CHANGELOG.

2018-02-12 Thread bmahler
Repository: mesos
Updated Branches:
  refs/heads/master c691dc5f8 -> 9ec182329


Added MESOS-8411 to the 1.3.3 CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5a30fd14
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5a30fd14
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5a30fd14

Branch: refs/heads/master
Commit: 5a30fd14c808f31555461a02bca5353f0e3c2a17
Parents: c691dc5
Author: Benjamin Mahler 
Authored: Mon Feb 12 15:23:24 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 15:23:24 2018 -0800

--
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/5a30fd14/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index bbc61b1..019c257 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -803,6 +803,7 @@ Release Notes - Mesos - Version 1.3.3 (WIP)
 
 All Issues:
 ** Bug
+  * [MESOS-8411] - Killing a queued task can lead to the command executor 
never terminating.
   * [MESOS-8125] - Agent should properly handle recovering an executor when 
its pid is reused.
   * [MESOS-8480] - Mesos returns high resource usage when killing a Docker 
task.
 



mesos git commit: Install ping for docker build.

2018-02-12 Thread mpark
Repository: mesos
Updated Branches:
  refs/heads/1.5.x b82d550f5 -> 547f5ec9a


Install ping for docker build.

By default the Ubuntu docker image does not contain `ping`.
We need to manually install it with `iputils-ping`.

Refs: https://stackoverflow.com/a/39901446/1387612

Review: https://reviews.apache.org/r/65569/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/547f5ec9
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/547f5ec9
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/547f5ec9

Branch: refs/heads/1.5.x
Commit: 547f5ec9a510a74cd18a8af26884d268e9893982
Parents: b82d550
Author: Tomasz Janiszewski 
Authored: Mon Feb 12 08:54:19 2018 -0800
Committer: Michael Park 
Committed: Mon Feb 12 17:01:11 2018 -0800

--
 support/docker-build.sh | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/547f5ec9/support/docker-build.sh
--
diff --git a/support/docker-build.sh b/support/docker-build.sh
index 9d69fb5..c78c7f5 100755
--- a/support/docker-build.sh
+++ b/support/docker-build.sh
@@ -71,6 +71,8 @@ case $OS in
   *16.04*)
 echo "Install Ubuntu 16.04 LTS (Xenial Xerus) specific packages"
 append_dockerfile "RUN apt-get install -y openjdk-8-jdk zlib1g-dev"
+# Install ping required by OsTest.Which
+append_dockerfile "RUN apt-get install -y iputils-ping"
;;
   *)
 append_dockerfile "RUN apt-get install -y openjdk-7-jdk"



[3/4] mesos-site git commit: Updated the website built from mesos SHA: bc6b61b.

2018-02-12 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/api/latest/c++/src_2slave_2http_8hpp_source.html
--
diff --git a/content/api/latest/c++/src_2slave_2http_8hpp_source.html 
b/content/api/latest/c++/src_2slave_2http_8hpp_source.html
index c582fa3..2942134 100644
--- a/content/api/latest/c++/src_2slave_2http_8hpp_source.html
+++ b/content/api/latest/c++/src_2slave_2http_8hpp_source.html
@@ -399,7 +399,7 @@
 process::http::requestFuture Response  request(const Request request, 
bool streamedResponse=false)Asynchronously sends an 
HTTP request to the process and returns the HTTP response once the entire 
res...
 TryDefinition: 
try.hpp:34
 mesos::internal::slave::Http::stateprocess::Future process::http::Response  state(const 
process::http::Request request, const Option 
process::http::authentication::Principal  ) const 
-mesos::internal::tests::v1::scheduler::Callmesos::v1::scheduler::Call CallDefinition: mesos.hpp:2584
+mesos::internal::tests::v1::scheduler::Callmesos::v1::scheduler::Call CallDefinition: mesos.hpp:2585
 json.hpp
 http.hpp
 mesos::internal::slave::Http::STATISTICS_HELPstatic std::string STATISTICS_HELP()

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/api/latest/c++/src_2tests_2containerizer_8hpp_source.html
--
diff --git a/content/api/latest/c++/src_2tests_2containerizer_8hpp_source.html 
b/content/api/latest/c++/src_2tests_2containerizer_8hpp_source.html
index d85c623..fc1eae9 100644
--- a/content/api/latest/c++/src_2tests_2containerizer_8hpp_source.html
+++ b/content/api/latest/c++/src_2tests_2containerizer_8hpp_source.html
@@ -270,7 +270,7 @@
 try.hpp
 mesos::internal::slave::Containerizer::resourcesstatic Try Resources  resources(const Flags 
flags)
 containerizer.hpp
-mesos::internal::tests::MockExecutorDefinition: mesos.hpp:2371
+mesos::internal::tests::MockExecutorDefinition: mesos.hpp:2372
 mesos::internal::tests::TestContainerizer::TestContainerizerTestContainerizer()
 uuid.hpp
 mesos::internal::tests::TestContainerizer::destroyprocess::Future bool  destroy(const FrameworkID 
frameworkId, const ExecutorID executorId)



[2/4] mesos-site git commit: Updated the website built from mesos SHA: bc6b61b.

2018-02-12 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/api/latest/c++/src_2tests_2mesos_8hpp_source.html
--
diff --git a/content/api/latest/c++/src_2tests_2mesos_8hpp_source.html 
b/content/api/latest/c++/src_2tests_2mesos_8hpp_source.html
index 838fe9f..19f4001 100644
--- a/content/api/latest/c++/src_2tests_2mesos_8hpp_source.html
+++ b/content/api/latest/c++/src_2tests_2mesos_8hpp_source.html
@@ -246,3689 +246,3690 @@
   192 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
   193 
 mesos::master::detector::MasterDetector*
 detector,
   194 
 const std::string id,
-  195 
 const Optionslave::Flags flags
 = None());
-  
196
-  197 
 // Starts a slave with the specified detector, 
containerizer, id, and flags.
-  198 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
-  199 
 mesos::master::detector::MasterDetector*
 detector,
-  200 
 slave::Containerizer*
 containerizer,
-  201 
 const std::string id,
-  202 
 const Optionslave::Flags flags
 = None());
-  
203
-  204 
 // Starts a slave with the specified detector, GC, and 
flags.
-  205 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
-  206 
 mesos::master::detector::MasterDetector*
 detector,
-  207 
 slave::GarbageCollector*
 gc,
-  208 
 const Optionslave::Flags flags
 = None());
-  
209
-  210 
 // Starts a slave with the specified detector, resource 
estimator, and flags.
-  211 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
-  212 
 mesos::master::detector::MasterDetector*
 detector,
-  213 
 mesos::slave::ResourceEstimator*
 resourceEstimator,
-  214 
 const Optionslave::Flags flags
 = None());
-  
215
-  216 
 // Starts a slave with the specified detector, 
containerizer,
-  217 
 // resource estimator, and flags.
-  218 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
-  219 
 mesos::master::detector::MasterDetector*
 detector,
-  220 
 slave::Containerizer*
 containerizer,
-  221 
 mesos::slave::ResourceEstimator*
 resourceEstimator,
-  222 
 const Optionslave::Flags flags
 = None());
-  
223
-  224 
 // Starts a slave with the specified detector, QoS 
Controller, and flags.
-  225 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
-  226 
 mesos::master::detector::MasterDetector*
 detector,
-  227 
 mesos::slave::QoSController*
 qosController,
-  228 
 const Optionslave::Flags flags
 = None());
-  
229
-  230 
 // Starts a slave with the specified detector, 
containerizer,
-  231 
 // QoS Controller, and flags.
-  232 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
-  233 
 mesos::master::detector::MasterDetector*
 detector,
-  234 
 slave::Containerizer*
 containerizer,
-  235 
 mesos::slave::QoSController*
 qosController,
-  236 
 const Optionslave::Flags flags
 = None(),
-  237 
 bool mock = false);
-  
238
-  239 
 // Starts a slave with the specified detector, 
authorizer, and flags.
-  240 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
-  241 
 mesos::master::detector::MasterDetector*
 detector,
-  242 
 mesos::Authorizer* authorizer,
-  243 
 const Optionslave::Flags flags
 = None());
-  
244
-  245 
 // Starts a slave with the specified detector, 
containerizer, authorizer,
-  246 
 // and flags.
-  247 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
-  248 
 mesos::master::detector::MasterDetector*
 detector,
-  249 
 slave::Containerizer*
 containerizer,
-  250 
 mesos::Authorizer* authorizer,
-  251 
 const Optionslave::Flags flags
 = None());
-  
252
-  253 
 // Starts a slave with the specified detector, 
containerizer,
-  254 
 // secretGenerator, authorizer and flags.
-  255 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
-  256 
 mesos::master::detector::MasterDetector*
 detector,
-  257 
 slave::Containerizer*
 containerizer,
-  258 
 mesos::SecretGenerator* 
secretGenerator,
-  259 
 const Optionmesos::Authorizer* authorizer = 
None(),
-  260 
 const Optionslave::Flags flags
 = None(),
-  261 
 bool mock = false);
-  
262
-  263 
 // Starts a slave with the specified detector, 
secretGenerator,
-  264 
 // and flags.
-  265 
 virtual Tryprocess::Ownedcluster::Slave StartSlave(
-  266 
 mesos::master::detector::MasterDetector*
 detector,
-  267 
 mesos::SecretGenerator* 
secretGenerator,
-  268 
 const Optionslave::Flags flags
 = None());
-  
269
-
  270  Optionzookeeper::URL zookeeperUrl;
-  
271
-  272 
 // NOTE: On Windows, most tasks are run under 
PowerShell, which uses ~150 MB
-  273 
 // of memory per-instance due to loading .NET. 
Realistically, PowerShell can
-  274 
 // be called more than once in a task, so 512 MB is the 
safe minimum.
-  275 
 // Furthermore, because the Windows `cpu` isolator is a 
hard-cap, 0.1 CPUs
-  276 
 // will cause the task (or even a check command) to 
timeout, so 1 CPU is the
-  277 
 // 

[4/4] mesos-site git commit: Updated the website built from mesos SHA: bc6b61b.

2018-02-12 Thread git-site-role
Updated the website built from mesos SHA: bc6b61b.


Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/902a5eeb
Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/902a5eeb
Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/902a5eeb

Branch: refs/heads/asf-site
Commit: 902a5eeb899ec974c673303f32c40da766330d24
Parents: 02f67cd
Author: jenkins 
Authored: Tue Feb 13 07:17:02 2018 +
Committer: jenkins 
Committed: Tue Feb 13 07:17:02 2018 +

--
 content/api/latest/c++/Nodes.xml|4 +-
 content/api/latest/c++/Tokens.xml   |6 +-
 ...l_1_1tests_1_1ContainerizerTest-members.html |2 +-
 ...1internal_1_1tests_1_1ContainerizerTest.html |6 +-
 ...lave_1_1MesosContainerizer_01_4-members.html |2 +-
 ...st_3_01slave_1_1MesosContainerizer_01_4.html |6 +-
 ...1internal_1_1tests_1_1MesosTest-members.html |2 +-
 ...mesos_1_1internal_1_1tests_1_1MesosTest.html |   16 +-
 .../container__daemon__process_8hpp_source.html |2 +-
 content/api/latest/c++/devolve_8hpp_source.html |4 +-
 .../latest/c++/event__queue_8hpp_source.html|2 +-
 content/api/latest/c++/evolve_8hpp_source.html  |4 +-
 .../c++/http__connection_8hpp_source.html   |4 +-
 ...nclude_2mesos_2v1_2executor_8hpp_source.html |2 +-
 content/api/latest/c++/index.hhc|4 +-
 .../c++/master_2validation_8hpp_source.html |2 +-
 .../latest/c++/protobuf__utils_8hpp_source.html |2 +-
 ...ource__provider_2validation_8hpp_source.html |2 +-
 .../c++/slave_2validation_8hpp_source.html  |2 +-
 .../c++/src_2master_2master_8hpp_source.html|4 +-
 .../c++/src_2master_2metrics_8hpp_source.html   |2 +-
 .../c++/src_2slave_2http_8hpp_source.html   |2 +-
 .../src_2tests_2containerizer_8hpp_source.html  |2 +-
 .../c++/src_2tests_2mesos_8hpp_source.html  | 6721 +-
 .../latest/c++/v0__v1executor_8hpp_source.html  |2 +-
 .../c++/v1_2resource__provider_8hpp_source.html |2 +-
 .../latest/c++/v1_2scheduler_8hpp_source.html   |2 +-
 content/blog/feed.xml   |2 +-
 .../index.html  |2 +-
 29 files changed, 3411 insertions(+), 3404 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/api/latest/c++/Nodes.xml
--
diff --git a/content/api/latest/c++/Nodes.xml b/content/api/latest/c++/Nodes.xml
index 7a46533..247d78f 100644
--- a/content/api/latest/c++/Nodes.xml
+++ b/content/api/latest/c++/Nodes.xml
@@ -16423,7 +16423,7 @@

 StartSlave
 
classmesos_1_1internal_1_1tests_1_1MesosTest.html
-acff3ed117bd46cf7248191fc92269eaa
+a0604f9cee3cee19c701bf31c6d669375


 StartSlave
@@ -92778,7 +92778,7 @@

 StartSlave
 
classmesos_1_1internal_1_1tests_1_1MesosTest.html
-acff3ed117bd46cf7248191fc92269eaa
+a0604f9cee3cee19c701bf31c6d669375


 StartSlave

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/api/latest/c++/Tokens.xml
--
diff --git a/content/api/latest/c++/Tokens.xml 
b/content/api/latest/c++/Tokens.xml
index d0d343a..c538e42 100644
--- a/content/api/latest/c++/Tokens.xml
+++ b/content/api/latest/c++/Tokens.xml
@@ -136067,7 +136067,7 @@
   mesos::internal::tests::MesosTest
 
 classmesos_1_1internal_1_1tests_1_1MesosTest.html
-acff3ed117bd46cf7248191fc92269eaa
+a0604f9cee3cee19c701bf31c6d669375
 mesos.hpp
   
   
@@ -136381,7 +136381,7 @@
   mesos::internal::tests::MesosTest
 
 classmesos_1_1internal_1_1tests_1_1MesosTest.html
-acff3ed117bd46cf7248191fc92269eaa
+a0604f9cee3cee19c701bf31c6d669375
 mesos.hpp
   
   
@@ -136673,7 +136673,7 @@
   mesos::internal::tests::MesosTest
 
 classmesos_1_1internal_1_1tests_1_1MesosTest.html
-acff3ed117bd46cf7248191fc92269eaa
+a0604f9cee3cee19c701bf31c6d669375
 mesos.hpp
   
   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1ContainerizerTest-members.html
--
diff --git 
a/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1ContainerizerTest-members.html
 

[1/4] mesos-site git commit: Updated the website built from mesos SHA: bc6b61b.

2018-02-12 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 02f67cdb2 -> 902a5eeb8


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/api/latest/c++/v0__v1executor_8hpp_source.html
--
diff --git a/content/api/latest/c++/v0__v1executor_8hpp_source.html 
b/content/api/latest/c++/v0__v1executor_8hpp_source.html
index d340fc8..998f60e 100644
--- a/content/api/latest/c++/v0__v1executor_8hpp_source.html
+++ b/content/api/latest/c++/v0__v1executor_8hpp_source.html
@@ -146,7 +146,7 @@
 mesos::ExecutorDriverDefinition: executor.hpp:146
 mesos.hpp
 executor.hpp
-mesos::internal::tests::v1::scheduler::Callmesos::v1::scheduler::Call CallDefinition: mesos.hpp:2584
+mesos::internal::tests::v1::scheduler::Callmesos::v1::scheduler::Call CallDefinition: mesos.hpp:2585
 mesos::v1::executor::V0ToV1Adapter::launchTaskvirtual void launchTask(ExecutorDriver *driver, const 
mesos::TaskInfo task) override
 mesos::MesosExecutorDriverDefinition: executor.hpp:211
 mesos::v1::executor::V0ToV1Adapter::killTaskvirtual void killTask(ExecutorDriver *driver, const 
mesos::TaskID taskId) override

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/api/latest/c++/v1_2resource__provider_8hpp_source.html
--
diff --git a/content/api/latest/c++/v1_2resource__provider_8hpp_source.html 
b/content/api/latest/c++/v1_2resource__provider_8hpp_source.html
index ecae7a7..0268879 100644
--- a/content/api/latest/c++/v1_2resource__provider_8hpp_source.html
+++ b/content/api/latest/c++/v1_2resource__provider_8hpp_source.html
@@ -137,7 +137,7 @@
 mesos::ContentTypeContentTypeDefinition: 
http.hpp:43
 Option Credential 
 mesos::v1::resource_provider::Driver::operator=Driver  operator=(const Driver 
other)=delete
-mesos::internal::tests::v1::scheduler::Callmesos::v1::scheduler::Call CallDefinition: mesos.hpp:2584
+mesos::internal::tests::v1::scheduler::Callmesos::v1::scheduler::Call CallDefinition: mesos.hpp:2585
 mesos::internal::HttpConnectionProcessHTTP connection handler. Definition: resource_provider.hpp:41
 resource_provider.hpp
 mesos::internal::EndpointDetectorDefinition: detector.hpp:26

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/api/latest/c++/v1_2scheduler_8hpp_source.html
--
diff --git a/content/api/latest/c++/v1_2scheduler_8hpp_source.html 
b/content/api/latest/c++/v1_2scheduler_8hpp_source.html
index e6a56fb..20bc4f9 100644
--- a/content/api/latest/c++/v1_2scheduler_8hpp_source.html
+++ b/content/api/latest/c++/v1_2scheduler_8hpp_source.html
@@ -197,7 +197,7 @@
 mesos::v1::scheduler::MesosBase::sendvirtual void send(const Call call)=0
 mesos::v1::scheduler::Mesos::MesosMesos(const std::string master, ContentType contentType, 
const std::function void() connected, const std::function 
void() disconnected, const std::function void(const std::queue 
Event  ) received, const Option Credential  
credential)
 mesos::v1::scheduler::MesosBase::reconnectvirtual void reconnect()=0
-mesos::internal::tests::v1::scheduler::Callmesos::v1::scheduler::Call CallDefinition: mesos.hpp:2584
+mesos::internal::tests::v1::scheduler::Callmesos::v1::scheduler::Call CallDefinition: mesos.hpp:2585
 mesos::v1::scheduler::Mesos::stopvirtual void stop()
 mesos::v1::scheduler::MesosDefinition: scheduler.hpp:65
 mesos::v1::scheduler::Mesos::~Mesosvirtual ~Mesos()

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 4a46265..0a0168b 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#x61;#105;#x6c;#x74;#111;#58;#100;#101;#118;#x40;#x61;#112;#97;#x63;#x68;#x65;#x2e;#109;#101;#x73;#111;#x73;#x2e;#111;#114;#103;#x64;#101;#118;#64;#97;#x70;#97;#x63;#x68;#101;#x2e;#x6d;#101;#115;#x6f;#115;#46;#x6f;#x72;#x67;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#97;#x69;#x6c;#x74;#111;#x3a;#100;#x65;#118;#x40;#x61;#x70;#x61;#99;#104;#x65;#x2e;#109;#101;#x73;#x6f;#x73;#46;#111;#x72;#x67;#100;#101;#x76;#x40;#97;#x70;#x61;#x63;#104;#x65;#x2e;#109;#x65;#x73;#x6f;#115;#46;#111;#114;#x67;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/902a5eeb/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 

mesos git commit: Added test to verify task-less executor is shutdown when re-subscribing.

2018-02-12 Thread bmahler
Repository: mesos
Updated Branches:
  refs/heads/master 9f2dc56f0 -> bc6b61bca


Added test to verify task-less executor is shutdown when re-subscribing.

This test verifies that the v1 executor is shutdown if all of its
initial tasks could not be delivered when re-subscribing with
a recovered agent. See MESOS-8411.

Review: https://reviews.apache.org/r/65497/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bc6b61bc
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bc6b61bc
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bc6b61bc

Branch: refs/heads/master
Commit: bc6b61bca37752689cffa40a14c53ad89f24e8fc
Parents: 9f2dc56
Author: Meng Zhu 
Authored: Mon Feb 12 22:29:53 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 22:29:53 2018 -0800

--
 src/tests/mesos.cpp   |  15 --
 src/tests/mesos.hpp   |   3 +-
 src/tests/slave_tests.cpp | 119 +
 3 files changed, 133 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/bc6b61bc/src/tests/mesos.cpp
--
diff --git a/src/tests/mesos.cpp b/src/tests/mesos.cpp
index ac78929..f8c3904 100644
--- a/src/tests/mesos.cpp
+++ b/src/tests/mesos.cpp
@@ -381,14 +381,23 @@ Try MesosTest::StartSlave(
 Try MesosTest::StartSlave(
 MasterDetector* detector,
 const string& id,
-const Option& flags)
+const Option& flags,
+bool mock)
 {
   Try slave = cluster::Slave::create(
   detector,
   flags.isNone() ? CreateSlaveFlags() : flags.get(),
-  id);
+  id,
+  None(),
+  None(),
+  None(),
+  None(),
+  None(),
+  None(),
+  None(),
+  mock);
 
-  if (slave.isSome()) {
+  if (slave.isSome() && !mock) {
 slave.get()->start();
   }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/bc6b61bc/src/tests/mesos.hpp
--
diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp
index c5593c2..f088cfd 100644
--- a/src/tests/mesos.hpp
+++ b/src/tests/mesos.hpp
@@ -192,7 +192,8 @@ protected:
   virtual Try StartSlave(
   mesos::master::detector::MasterDetector* detector,
   const std::string& id,
-  const Option& flags = None());
+  const Option& flags = None(),
+  bool mock = false);
 
   // Starts a slave with the specified detector, containerizer, id, and flags.
   virtual Try StartSlave(

http://git-wip-us.apache.org/repos/asf/mesos/blob/bc6b61bc/src/tests/slave_tests.cpp
--
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index 628b0d0..caa0056 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -4924,6 +4924,125 @@ TEST_F(SlaveTest, 
KillAllInitialTasksTerminatesHTTPExecutor)
 }
 
 
+// This test verifies that if an agent fails over after registering
+// a v1 executor but before delivering its initial task groups, the
+// executor will be shut down since all of its initial task groups
+// were dropped. See MESOS-8411.
+//
+// TODO(mzhu): This test could be simplified if we had a test scheduler that
+// provides some basic task launching functionality (see MESOS-8511).
+TEST_F_TEMP_DISABLED_ON_WINDOWS(SlaveTest,
+AgentFailoverTerminatesHTTPExecutorWithNoTask)
+{
+  Try master = StartMaster();
+  ASSERT_SOME(master);
+
+  auto scheduler = std::make_shared();
+
+  Owned detector = master.get()->createDetector();
+
+  slave::Flags slaveFlags = CreateSlaveFlags();
+  string processId = process::ID::generate("slave");
+
+  // Start a mock slave.
+  Try slave =
+StartSlave(detector.get(), processId, slaveFlags, true);
+
+  ASSERT_SOME(slave);
+  ASSERT_NE(nullptr, slave.get()->mock());
+
+  slave.get()->start();
+
+  // Enable checkpointing for the framework.
+  v1::FrameworkInfo frameworkInfo = v1::DEFAULT_FRAMEWORK_INFO;
+  frameworkInfo.set_checkpoint(true);
+
+  v1::Resources resources =
+v1::Resources::parse("cpus:0.1;mem:32;disk:32").get();
+
+  v1::ExecutorInfo executorInfo = v1::DEFAULT_EXECUTOR_INFO;
+  executorInfo.clear_command();
+  executorInfo.set_type(v1::ExecutorInfo::DEFAULT);
+  executorInfo.mutable_resources()->CopyFrom(resources);
+
+  Future connected;
+  EXPECT_CALL(*scheduler, connected(_))
+.WillOnce(FutureSatisfy());
+
+  v1::scheduler::TestMesos mesos(
+  master.get()->pid,
+  ContentType::PROTOBUF,
+  scheduler);
+
+  AWAIT_READY(connected);
+
+  Future subscribed;
+  EXPECT_CALL(*scheduler, subscribed(_, _))
+.WillOnce(FutureArg<1>());
+
+  EXPECT_CALL(*scheduler, heartbeat(_))
+

mesos git commit: Fixed a bug where MockSlave `id` is not properly initialized.

2018-02-12 Thread bmahler
Repository: mesos
Updated Branches:
  refs/heads/master 15b9418f4 -> 9f2dc56f0


Fixed a bug where MockSlave `id` is not properly initialized.

The `MockSlave` did not initialize the id field using the input
argument. Also it is necessary to call its virtual base class
`ProcessBase` constructor explicitly to avoid argument `id` being
lost.

Review: https://reviews.apache.org/r/65613/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9f2dc56f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9f2dc56f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9f2dc56f

Branch: refs/heads/master
Commit: 9f2dc56f028a1835a05e40bdea4058ca7259c915
Parents: 15b9418
Author: Meng Zhu 
Authored: Mon Feb 12 22:07:27 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 22:07:27 2018 -0800

--
 src/tests/mock_slave.cpp | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/9f2dc56f/src/tests/mock_slave.cpp
--
diff --git a/src/tests/mock_slave.cpp b/src/tests/mock_slave.cpp
index 597d7ab..9d930cf 100644
--- a/src/tests/mock_slave.cpp
+++ b/src/tests/mock_slave.cpp
@@ -104,8 +104,14 @@ MockSlave::MockSlave(
 QoSController* qosController,
 SecretGenerator* secretGenerator,
 const Option& authorizer)
-  : slave::Slave(
-process::ID::generate("slave"),
+  // It is necessary to explicitly call `ProcessBase` constructor here even
+  // though the direct parent `Slave` already does this. This is because
+  // `ProcessBase` being a virtual base class, if not being explicitly
+  // constructed here by passing `id`, will be constructed implicitly first 
with
+  // a default constructor, resulting in lost argument `id`.
+  : ProcessBase(id),
+slave::Slave(
+id,
 flags,
 detector,
 containerizer,



[1/2] mesos-site git commit: Updated the website built from mesos SHA: 15b9418.

2018-02-12 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 3e696e957 -> 75c915838


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/75c91583/content/sitemap.xml
--
diff --git a/content/sitemap.xml b/content/sitemap.xml
index 6f7954a..0367b23 100644
--- a/content/sitemap.xml
+++ b/content/sitemap.xml
@@ -2,18078 +2,18078 @@
 http://www.sitemaps.org/schemas/sitemap/0.9;>
   
 http://mesos.apache.org/api/latest/java/overview-tree.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 http://mesos.apache.org/api/latest/java/help-doc.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 http://mesos.apache.org/api/latest/java/constant-values.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 http://mesos.apache.org/api/latest/java/allclasses-frame.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 http://mesos.apache.org/api/latest/java/deprecated-list.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 http://mesos.apache.org/api/latest/java/allclasses-noframe.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.TaskState.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.RateLimit.Builder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.CheckInfo.Http.Builder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.SlaveInfo.CapabilityOrBuilder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.Volume.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.LinuxInfo.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.RLimitInfo.RLimit.Type.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.ResourceProviderInfo.Builder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.ContainerInfoOrBuilder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.ParameterOrBuilder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.CgroupInfo.Blkio.Operation.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.CgroupInfo.Blkio.Throttling.Statistics.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.Flag.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.TimeInfo.Builder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.RLimitInfo.RLimit.Builder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.CgroupInfo.Blkio.CFQ.StatisticsOrBuilder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.TTYInfoOrBuilder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.Ports.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.CommandInfo.URI.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.Offer.Operation.DestroyVolume.Builder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.UdpStatistics.Builder.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 
http://mesos.apache.org/api/latest/java/org/apache/mesos/Protos.Operation.html
-2018-02-12T00:00:00+00:00
+2018-02-13T00:00:00+00:00
   
   
 

[2/2] mesos-site git commit: Updated the website built from mesos SHA: 15b9418.

2018-02-12 Thread git-site-role
Updated the website built from mesos SHA: 15b9418.


Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/75c91583
Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/75c91583
Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/75c91583

Branch: refs/heads/asf-site
Commit: 75c91583875653a04846cd9b790fcb3ab0616ee6
Parents: 3e696e9
Author: jenkins 
Authored: Tue Feb 13 06:28:44 2018 +
Committer: jenkins 
Committed: Tue Feb 13 06:28:44 2018 +

--
 content/blog/feed.xml   |2 +-
 .../index.html  |2 +-
 content/sitemap.xml | 9038 +-
 3 files changed, 4521 insertions(+), 4521 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/75c91583/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 9ef901a..2cc9dab 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#97;#105;#x6c;#x74;#111;#58;#x64;#101;#x76;#x40;#x61;#x70;#x61;#99;#x68;#101;#x2e;#109;#x65;#115;#111;#x73;#46;#x6f;#114;#x67;#x64;#x65;#118;#x40;#x61;#x70;#x61;#99;#104;#x65;#46;#x6d;#x65;#x73;#111;#115;#x2e;#x6f;#x72;#103;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#x61;#105;#x6c;#x74;#111;#58;#100;#101;#x76;#x40;#97;#112;#97;#x63;#x68;#x65;#46;#109;#x65;#x73;#x6f;#x73;#46;#111;#x72;#103;#100;#x65;#x76;#64;#x61;#x70;#97;#99;#104;#101;#46;#109;#101;#x73;#x6f;#x73;#x2e;#x6f;#114;#x67;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/75c91583/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index dfecd4e..0379d37 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



mesos-site git commit: Updated the website built from mesos SHA: 9f2dc56.

2018-02-12 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 75c915838 -> 02f67cdb2


Updated the website built from mesos SHA: 9f2dc56.


Project: http://git-wip-us.apache.org/repos/asf/mesos-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos-site/commit/02f67cdb
Tree: http://git-wip-us.apache.org/repos/asf/mesos-site/tree/02f67cdb
Diff: http://git-wip-us.apache.org/repos/asf/mesos-site/diff/02f67cdb

Branch: refs/heads/asf-site
Commit: 02f67cdb287f0b4e79caf27686d65b6b2628c459
Parents: 75c9158
Author: jenkins 
Authored: Tue Feb 13 06:53:05 2018 +
Committer: jenkins 
Committed: Tue Feb 13 06:53:05 2018 +

--
 content/blog/feed.xml | 2 +-
 content/blog/performance-working-group-progress-report/index.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/02f67cdb/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 2cc9dab..4a46265 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#x61;#105;#x6c;#x74;#111;#58;#100;#101;#x76;#x40;#97;#112;#97;#x63;#x68;#x65;#46;#109;#x65;#x73;#x6f;#x73;#46;#111;#x72;#103;#100;#x65;#x76;#64;#x61;#x70;#97;#99;#104;#101;#46;#109;#101;#x73;#x6f;#x73;#x2e;#x6f;#114;#x67;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#x61;#105;#x6c;#x74;#111;#58;#100;#101;#118;#x40;#x61;#112;#97;#x63;#x68;#x65;#x2e;#109;#101;#x73;#111;#x73;#x2e;#111;#114;#103;#x64;#101;#118;#64;#97;#x70;#97;#x63;#x68;#101;#x2e;#x6d;#101;#115;#x6f;#115;#46;#x6f;#x72;#x67;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/02f67cdb/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index 0379d37..a2e9071 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



[4/5] mesos git commit: Fixed two slave recovery tests.

2018-02-12 Thread bmahler
Fixed two slave recovery tests.

These two tests are affected by the lingering executor fix
(#65109). We should wait to make sure tasks are actually launched
on the executor before trigger the agent failover. Otherwise, the
container will be shutdown upon re-registration because the executor
has never received any task.

Review: https://reviews.apache.org/r/65572/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8ce53571
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8ce53571
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8ce53571

Branch: refs/heads/1.4.x
Commit: 8ce535714bd355c202c22d820ef261509f692dd7
Parents: 9c14850
Author: Meng Zhu 
Authored: Thu Feb 8 17:19:48 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 21:48:52 2018 -0800

--
 src/tests/slave_recovery_tests.cpp | 22 ++
 1 file changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/8ce53571/src/tests/slave_recovery_tests.cpp
--
diff --git a/src/tests/slave_recovery_tests.cpp 
b/src/tests/slave_recovery_tests.cpp
index 6207a50..ca16401 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -4528,7 +4528,11 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, 
CGROUPS_ROOT_PidNamespaceForward)
   // Scheduler expectations.
   EXPECT_CALL(sched, registered(_, _, _));
 
+  Future statusStarting;
+  Future statusRunning;
   EXPECT_CALL(sched, statusUpdate(_, _))
+.WillOnce(FutureArg<1>())
+.WillOnce(FutureArg<1>())
 .WillRepeatedly(Return());
 
   Future offers1;
@@ -4560,6 +4564,13 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, 
CGROUPS_ROOT_PidNamespaceForward)
 
   ContainerID containerId = *(containers->begin());
 
+  // Wait until task is running.
+  AWAIT_READY(statusStarting);
+  EXPECT_EQ(TASK_STARTING, statusStarting->state());
+
+  AWAIT_READY(statusRunning);
+  EXPECT_EQ(TASK_RUNNING, statusRunning->state());
+
   // Stop the slave.
   slave.get()->terminate();
 
@@ -4632,7 +4643,11 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, 
CGROUPS_ROOT_PidNamespaceBackward)
   // Scheduler expectations.
   EXPECT_CALL(sched, registered(_, _, _));
 
+  Future statusStarting;
+  Future statusRunning;
   EXPECT_CALL(sched, statusUpdate(_, _))
+.WillOnce(FutureArg<1>())
+.WillOnce(FutureArg<1>())
 .WillRepeatedly(Return());
 
   Future offers1;
@@ -4664,6 +4679,13 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, 
CGROUPS_ROOT_PidNamespaceBackward)
 
   ContainerID containerId = *(containers->begin());
 
+  // Wait until task is running.
+  AWAIT_READY(statusStarting);
+  EXPECT_EQ(TASK_STARTING, statusStarting->state());
+
+  AWAIT_READY(statusRunning);
+  EXPECT_EQ(TASK_RUNNING, statusRunning->state());
+
   // Stop the slave.
   slave.get()->terminate();
 



[1/5] mesos git commit: Fixed a bug relating to lingering executors [1/2].

2018-02-12 Thread bmahler
Repository: mesos
Updated Branches:
  refs/heads/1.4.x 5746f98ff -> d43478579


Fixed a bug relating to lingering executors [1/2].

An executor should be shutdown if all of its tasks are
killed while the executor is launching.

This patch fixes an issue where the executor is left
running when the task(s) get killed between the executor
registration/subscription and `Slave::___run()`. See
MESOS-8411 for more details. There is an additional race
in the agent failover case that is addressed in this patch.

The fix here is to fix the race by checking an executor's various
tasks queues during task kill and executor (re-)registration,
and shutting down executors that had never received any tasks.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/778ed217
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/778ed217
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/778ed217

Branch: refs/heads/1.4.x
Commit: 778ed217ebadf04dc40dddb81a212e1d025aabd3
Parents: 5746f98
Author: Meng Zhu 
Authored: Wed Feb 7 17:01:58 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 21:44:19 2018 -0800

--
 src/slave/constants.hpp |   8 +++
 src/slave/slave.cpp | 118 +++
 src/slave/slave.hpp |  24 +
 3 files changed, 129 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/778ed217/src/slave/constants.hpp
--
diff --git a/src/slave/constants.hpp b/src/slave/constants.hpp
index 435c37e..fac831c 100644
--- a/src/slave/constants.hpp
+++ b/src/slave/constants.hpp
@@ -84,6 +84,14 @@ constexpr size_t MAX_COMPLETED_FRAMEWORKS = 50;
 constexpr size_t DEFAULT_MAX_COMPLETED_EXECUTORS_PER_FRAMEWORK = 150;
 
 // Maximum number of completed tasks per executor to store in memory.
+//
+// NOTE: This should be greater than zero because the agent looks
+// for completed tasks to determine (with false positives) whether
+// an executor ever received tasks. See MESOS-8411.
+//
+// TODO(mzhu): Remove this note once we can determine whether an
+// executor ever received tasks without looking through the
+// completed tasks.
 constexpr size_t MAX_COMPLETED_TASKS_PER_EXECUTOR = 200;
 
 // Default cpus offered by the slave.

http://git-wip-us.apache.org/repos/asf/mesos/blob/778ed217/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 959c4b1..5ba160e 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -2580,6 +2580,12 @@ void Slave::___run(
 return;
   }
 
+  // At this point, we must have either sent some tasks to the running
+  // executor or there are queued tasks that need to be delivered.
+  // Otherwise, the executor state would have been synchronously
+  // transitioned to TERMINATING when the queued tasks were killed.
+  CHECK(executor->everSentTask() || !executor->queuedTasks.empty());
+
   foreach (const TaskInfo& task, tasks) {
 // This is the case where the task is killed. No need to send
 // status update because it should be handled in 'killTask'.
@@ -3086,6 +3092,10 @@ void Slave::killTask(
 statusUpdate(update, UPID());
   }
 
+  // TODO(mzhu): Consider shutting down the executor here
+  // if all of its initial tasks are killed rather than
+  // waiting for it to register.
+
   break;
 }
 case Executor::TERMINATING:
@@ -3142,6 +3152,19 @@ void Slave::killTask(
   // a later point in time, it won't get this task.
   statusUpdate(update, UPID());
 }
+
+// Shutdown the executor if all of its initial tasks are killed.
+// See MESOS-8411. This is a workaround for those executors (e.g.,
+// command executor, default executor) that do not have a proper
+// self terminating logic when they haven't received the task or
+// task group within a timeout.
+if (!executor->everSentTask() && executor->queuedTasks.empty()) {
+  LOG(WARNING) << "Shutting down executor " << *executor
+   << " because it has never been sent a task and all of"
+   << " its queued tasks have been killed before delivery";
+
+  _shutdownExecutor(framework, executor);
+}
   } else {
 // Send a message to the executor and wait for
 // it to send us a status update.
@@ -3790,15 +3813,10 @@ void Slave::subscribe(
   // those executors (e.g., command executor, default executor) that do not
   // have a proper self terminating logic when they haven't received the
   // task or task group within a timeout.
-  if (state != RECOVERING &&
-  

[2/5] mesos git commit: Fixed a bug relating to lingering executors [2/2].

2018-02-12 Thread bmahler
Fixed a bug relating to lingering executors [2/2].

A task-less v1 executor could linger if the agent restarts
before any of the executor's initial tasks got delivered.
This was because we checked for the executor having any
tasks running before we remove the dropped tasks.

This patch fixes this issue by checking whether the
executor should be shut down *after* we've removed the
tasks that were dropped during agent restart.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a01e6602
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a01e6602
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a01e6602

Branch: refs/heads/1.4.x
Commit: a01e66024de8336c7cf6c70f7d689eccd29ebabd
Parents: 778ed21
Author: Meng Zhu 
Authored: Wed Feb 7 17:46:15 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 21:44:26 2018 -0800

--
 src/slave/slave.cpp | 118 +++
 1 file changed, 59 insertions(+), 59 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/a01e6602/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 5ba160e..4b3d1fc 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -3808,34 +3808,6 @@ void Slave::subscribe(
 CHECK_SOME(os::touch(path));
   }
 
-  // Here, we kill the executor if it no longer has any task or task group
-  // to run (e.g., framework sent a `killTask()`). This is a workaround for
-  // those executors (e.g., command executor, default executor) that do not
-  // have a proper self terminating logic when they haven't received the
-  // task or task group within a timeout.
-  if (!executor->everSentTask() && executor->queuedTasks.empty()) {
-LOG(WARNING) << "Shutting down subscribing executor " << *executor
- << " because it was never sent a task and"
- << " has no tasks to run";
-
-_shutdownExecutor(framework, executor);
-
-return;
-  }
-
-  // Tell executor it's registered and give it any queued tasks
-  // or task groups.
-  executor::Event event;
-  event.set_type(executor::Event::SUBSCRIBED);
-
-  executor::Event::Subscribed* subscribed = event.mutable_subscribed();
-  subscribed->mutable_executor_info()->CopyFrom(executor->info);
-  subscribed->mutable_framework_info()->MergeFrom(framework->info);
-  subscribed->mutable_slave_info()->CopyFrom(info);
-  subscribed->mutable_container_id()->CopyFrom(executor->containerId);
-
-  executor->send(event);
-
   // Handle all the pending updates.
   // The status update manager might have already checkpointed some
   // of these pending updates (for example, if the slave died right
@@ -3851,37 +3823,6 @@ void Slave::subscribe(
 None());
   }
 
-  // We maintain a copy of the tasks in `queuedTaskGroups` also in
-  // `queuedTasks`. Hence, we need to ensure that we don't send the same
-  // tasks to the executor twice.
-  LinkedHashMap queuedTasks;
-  foreachpair (const TaskID& taskId,
-   const TaskInfo& taskInfo,
-   executor->queuedTasks) {
-queuedTasks[taskId] = taskInfo;
-  }
-
-  foreach (const TaskGroupInfo& taskGroup, executor->queuedTaskGroups) {
-foreach (const TaskInfo& task, taskGroup.tasks()) {
-  const TaskID& taskId = task.task_id();
-  if (queuedTasks.contains(taskId)) {
-queuedTasks.erase(taskId);
-  }
-}
-  }
-
-  containerizer->update(
-  executor->containerId,
-  executor->allocatedResources())
-.onAny(defer(self(),
- ::___run,
- lambda::_1,
- framework->id(),
- executor->id,
- executor->containerId,
- queuedTasks.values(),
- executor->queuedTaskGroups));
-
   hashmap unackedTasks;
   foreach (const TaskInfo& task, subscribe.unacknowledged_tasks()) {
 unackedTasks[task.task_id()] = task;
@@ -3928,6 +3869,65 @@ void Slave::subscribe(
 }
   }
 
+  // Shutdown the executor if all of its initial tasks are killed.
+  // See MESOS-8411. This is a workaround for those executors (e.g.,
+  // command executor, default executor) that do not have a proper
+  // self terminating logic when they haven't received the task or
+  // task group within a timeout.
+  if (!executor->everSentTask() && executor->queuedTasks.empty()) {
+LOG(WARNING) << "Shutting down executor " << 

[3/5] mesos git commit: Added MESOS-8411 to the 1.4.2 CHANGELOG.

2018-02-12 Thread bmahler
Added MESOS-8411 to the 1.4.2 CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9c148507
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9c148507
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9c148507

Branch: refs/heads/1.4.x
Commit: 9c148507acc42d1ff949398ab91c65a93d4e0926
Parents: a01e660
Author: Benjamin Mahler 
Authored: Mon Feb 12 21:45:25 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 21:48:51 2018 -0800

--
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/9c148507/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 090d14c..1528010 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -10,6 +10,7 @@ Release Notes - Mesos - Version 1.4.2 (WIP)
  * [MESOS-8237] - Strip (Offer|Resource).allocation_info for non-MULTI_ROLE 
schedulers.
  * [MESOS-8297] - Built-in driver-based executors ignore kill task if the task 
has not been launched.
  * [MESOS-8356] - Persistent volume ownership is set to root despite of 
sandbox owner (frameworkInfo.user) when docker executor is used.
+ * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
  * [MESOS-8480] - Mesos returns high resource usage when killing a Docker task.
 
 



[5/5] mesos git commit: Added MESOS-8552 to the 1.4.2 CHANGELOG.

2018-02-12 Thread bmahler
Added MESOS-8552 to the 1.4.2 CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d4347857
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d4347857
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d4347857

Branch: refs/heads/1.4.x
Commit: d4347857918e7d69bb047a01f8cf60468283ebc2
Parents: 8ce5357
Author: Benjamin Mahler 
Authored: Mon Feb 12 21:46:02 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 21:48:52 2018 -0800

--
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/d4347857/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 1528010..583e87d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,7 @@ Release Notes - Mesos - Version 1.4.2 (WIP)
  * [MESOS-8356] - Persistent volume ownership is set to root despite of 
sandbox owner (frameworkInfo.user) when docker executor is used.
  * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
  * [MESOS-8480] - Mesos returns high resource usage when killing a Docker task.
+ * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
 
 
 Release Notes - Mesos - Version 1.4.1



[1/2] mesos git commit: Added MESOS-8411 to the 1.4.2 CHANGELOG.

2018-02-12 Thread bmahler
Repository: mesos
Updated Branches:
  refs/heads/master 9ec182329 -> 15b9418f4


Added MESOS-8411 to the 1.4.2 CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3b2b93a5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3b2b93a5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3b2b93a5

Branch: refs/heads/master
Commit: 3b2b93a54892d6ef6d908ccb418588639a267b06
Parents: 9ec1823
Author: Benjamin Mahler 
Authored: Mon Feb 12 21:45:25 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 21:45:25 2018 -0800

--
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/3b2b93a5/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 57fc92b..0de0fc6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -502,6 +502,7 @@ Release Notes - Mesos - Version 1.4.2 (WIP)
  * [MESOS-8237] - Strip (Offer|Resource).allocation_info for non-MULTI_ROLE 
schedulers.
  * [MESOS-8297] - Built-in driver-based executors ignore kill task if the task 
has not been launched.
  * [MESOS-8356] - Persistent volume ownership is set to root despite of 
sandbox owner (frameworkInfo.user) when docker executor is used.
+ * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
  * [MESOS-8480] - Mesos returns high resource usage when killing a Docker task.
 
 



[2/2] mesos git commit: Added MESOS-8552 to the 1.4.2 CHANGELOG.

2018-02-12 Thread bmahler
Added MESOS-8552 to the 1.4.2 CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/15b9418f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/15b9418f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/15b9418f

Branch: refs/heads/master
Commit: 15b9418f401e64fa35c3eb65ef9ddb7c0dedeb9b
Parents: 3b2b93a
Author: Benjamin Mahler 
Authored: Mon Feb 12 21:46:02 2018 -0800
Committer: Benjamin Mahler 
Committed: Mon Feb 12 21:46:02 2018 -0800

--
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/15b9418f/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 0de0fc6..f7bb3d5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -504,6 +504,7 @@ Release Notes - Mesos - Version 1.4.2 (WIP)
  * [MESOS-8356] - Persistent volume ownership is set to root despite of 
sandbox owner (frameworkInfo.user) when docker executor is used.
  * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
  * [MESOS-8480] - Mesos returns high resource usage when killing a Docker task.
+ * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
 
 
 Release Notes - Mesos - Version 1.4.1