[mesos] 07/07: Added cleanup of build dir to website bot.

2020-09-11 Thread vinodkone
This is an automated email from the ASF dual-hosted git repository.

vinodkone pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit f86cb659fc38a198261b8d62bd463f8d3eb313f0
Author: Vinod Kone 
AuthorDate: Thu Sep 10 16:30:12 2020 -0500

Added cleanup of build dir to website bot.

Review: https://reviews.apache.org/r/72862
---
 support/mesos-website/entrypoint.sh | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/support/mesos-website/entrypoint.sh 
b/support/mesos-website/entrypoint.sh
index 2cc4ab2..c8af020 100755
--- a/support/mesos-website/entrypoint.sh
+++ b/support/mesos-website/entrypoint.sh
@@ -21,7 +21,10 @@ set -e
 set -o pipefail
 
 function exit_hook {
-  # Remove generated documents when exit.
+  # Remove mesos build directory on exit.
+  rm -rf /mesos/build
+
+  # Remove generated documents on exit.
   cd /mesos/site && bundle exec rake clean_docs
 }
 



[mesos] 03/07: Reduced build parallelism to avoid aborted builds in CI.

2020-09-11 Thread vinodkone
This is an automated email from the ASF dual-hosted git repository.

vinodkone pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 0a9e90af54edc4a1c48a406b54404246a86d1499
Author: Vinod Kone 
AuthorDate: Thu Sep 10 07:09:14 2020 -0500

Reduced build parallelism to avoid aborted builds in CI.

Review: https://reviews.apache.org/r/72858
---
 support/mesos-website/entrypoint.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/mesos-website/entrypoint.sh 
b/support/mesos-website/entrypoint.sh
index 6ecfbe0..2cc4ab2 100755
--- a/support/mesos-website/entrypoint.sh
+++ b/support/mesos-website/entrypoint.sh
@@ -44,7 +44,7 @@ fi
 mkdir -p build
 pushd build
 ../configure --disable-python
-make -j6
+make -j3 # Higher parallelism sometimes causes CI to get stuck.
 popd # build
 
 # Generate the endpoint docs from the latest mesos and agent binaries.



[mesos] 02/07: Merged build.sh and entrypoint.sh.

2020-09-11 Thread vinodkone
This is an automated email from the ASF dual-hosted git repository.

vinodkone pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit af01d50663e3c1ec81177dd8baeecae3e5ba8819
Author: Vinod Kone 
AuthorDate: Wed Sep 9 20:17:50 2020 -0500

Merged build.sh and entrypoint.sh.

Review: https://reviews.apache.org/r/72857
---
 support/mesos-website/build.sh  | 57 -
 support/mesos-website/entrypoint.sh | 38 +
 2 files changed, 33 insertions(+), 62 deletions(-)

diff --git a/support/mesos-website/build.sh b/support/mesos-website/build.sh
deleted file mode 100755
index 45ab892..000
--- a/support/mesos-website/build.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env bash
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a script for building Mesos website.
-set -e
-set -o pipefail
-
-function exit_hook {
-  # Remove generated documents when exit.
-  cd /mesos/site && bundle exec rake clean_docs
-}
-
-trap exit_hook EXIT
-
-file_owner_uid=`stat . --format=%u`
-current_user_uid=`id -u`
-if [ $file_owner_uid -ne $current_user_uid ];
-then
-  echo "
-The mounted mesos sources are owned by UID $file_owner_uid
-which is different from the current user UID $current_user_uid
-inside the container. Please check that dockerd has
-user namespace remapping configured properly.
-  "
-  exit 1
-fi
-
-# Build mesos to get the latest master and agent binaries.
-./bootstrap
-mkdir -p build
-pushd build
-../configure --disable-python
-make -j6
-popd # build
-
-# Generate the endpoint docs from the latest mesos and agent binaries.
-./support/generate-endpoint-help.py
-
-# Build the website.
-pushd site
-bundle exec rake
-popd # site
diff --git a/support/mesos-website/entrypoint.sh 
b/support/mesos-website/entrypoint.sh
index 2029949..6ecfbe0 100755
--- a/support/mesos-website/entrypoint.sh
+++ b/support/mesos-website/entrypoint.sh
@@ -16,14 +16,42 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This is a wrapper script for building Mesos website.
-# TODO(vinod): Merge this with `build.sh` now that we dont need to switch
-# users in ASF CI as user namespacing has been implemented.
+# This is a script for building Mesos website.
 set -e
 set -o pipefail
 
+function exit_hook {
+  # Remove generated documents when exit.
+  cd /mesos/site && bundle exec rake clean_docs
+}
+
+trap exit_hook EXIT
+
+file_owner_uid=`stat . --format=%u`
+current_user_uid=`id -u`
+if [ $file_owner_uid -ne $current_user_uid ]; then
+  echo "
+The mounted mesos sources are owned by UID $file_owner_uid
+which is different from the current user UID $current_user_uid
+inside the container. Please check that dockerd has
+user namespace remapping configured properly.
+  "
+  exit 1
+fi
+
+# Build mesos to get the latest master and agent binaries.
+./bootstrap
+mkdir -p build
+pushd build
+../configure --disable-python
+make -j6
+popd # build
+
+# Generate the endpoint docs from the latest mesos and agent binaries.
+./support/generate-endpoint-help.py
+
+# Build the website.
 pushd site
 bundle install
+bundle exec rake
 popd # site
-
-./support/mesos-website/build.sh



[mesos] branch master updated (5d68474 -> f86cb65)

2020-09-11 Thread vinodkone
This is an automated email from the ASF dual-hosted git repository.

vinodkone pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git.


from 5d68474  Added MESOS-10134 to the 1.7.4 CHANGELOG.
 new a5b7765  Fixed Website bot to work with docker user namespaces.
 new af01d50  Merged build.sh and entrypoint.sh.
 new 0a9e90a  Reduced build parallelism to avoid aborted builds in CI.
 new 28cabfc  Added `--no-same-owner` option to tar command.
 new 311c47e  Added `--no-same-owner` option to tar command.
 new d335288  Added `--no-same-owner` option to tar command.
 new f86cb65  Added cleanup of build dir to website bot.

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 3rdparty/Makefile.am |  4 +--
 3rdparty/libprocess/3rdparty/Makefile.am |  2 +-
 3rdparty/stout/3rdparty/Makefile.am  |  2 +-
 support/mesos-website.sh | 10 +++
 support/mesos-website/Dockerfile |  6 +++--
 support/mesos-website/build.sh   | 44 ---
 support/mesos-website/entrypoint.sh  | 45 +---
 7 files changed, 47 insertions(+), 66 deletions(-)
 delete mode 100755 support/mesos-website/build.sh



[mesos] 05/07: Added `--no-same-owner` option to tar command.

2020-09-11 Thread vinodkone
This is an automated email from the ASF dual-hosted git repository.

vinodkone pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 311c47e4a9169bdc6cdc962383c711a38c7167d2
Author: Vinod Kone 
AuthorDate: Thu Sep 10 15:20:41 2020 -0500

Added `--no-same-owner` option to tar command.

This ensures extracted tarballs are owned by root when running the
build as root.

Review: https://reviews.apache.org/r/72860
---
 3rdparty/libprocess/3rdparty/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/3rdparty/libprocess/3rdparty/Makefile.am 
b/3rdparty/libprocess/3rdparty/Makefile.am
index e148f2d..77e9073 100644
--- a/3rdparty/libprocess/3rdparty/Makefile.am
+++ b/3rdparty/libprocess/3rdparty/Makefile.am
@@ -97,7 +97,7 @@ CLEAN_EXTRACTED = \
 # which cause the packages to get extracted as necessary. We also
 # apply any patches as appropriate.
 %-stamp: $(BUNDLED_DIR)/%.tar.gz
-   gzip -d -c $^ | tar xf -
+   gzip -d -c $^ | tar xf - --no-same-owner
test ! -e $(top_srcdir)/../$*.patch || patch -d $* -p1 
<$(top_srcdir)/../$*.patch
touch $@
 



[mesos] 04/07: Added `--no-same-owner` option to tar command.

2020-09-11 Thread vinodkone
This is an automated email from the ASF dual-hosted git repository.

vinodkone pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 28cabfc61248908c42c91d4287730cad42dd0400
Author: Vinod Kone 
AuthorDate: Thu Sep 10 15:18:44 2020 -0500

Added `--no-same-owner` option to tar command.

This ensures extracted tarballs are owned by root when running the
build as root.

Review: https://reviews.apache.org/r/72859
---
 3rdparty/stout/3rdparty/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/3rdparty/stout/3rdparty/Makefile.am 
b/3rdparty/stout/3rdparty/Makefile.am
index 5a9..7edb7d2 100644
--- a/3rdparty/stout/3rdparty/Makefile.am
+++ b/3rdparty/stout/3rdparty/Makefile.am
@@ -71,7 +71,7 @@ CLEAN_EXTRACTED = \
 # which cause the packages to get extracted as necessary. We also
 # apply any patches as appropriate.
 %-stamp: $(BUNDLED_DIR)/%.tar.gz
-   gzip -d -c $^ | tar xf -
+   gzip -d -c $^ | tar xf - --no-same-owner
test ! -e $(top_srcdir)/../$*.patch || patch -d $* -p1 
<$(top_srcdir)/../$*.patch
touch $@
 



[mesos] 01/07: Fixed Website bot to work with docker user namespaces.

2020-09-11 Thread vinodkone
This is an automated email from the ASF dual-hosted git repository.

vinodkone pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit a5b7765d3ef2905d11ffadbb877377b07624a99c
Author: Vinod Kone 
AuthorDate: Wed Sep 9 17:20:58 2020 -0500

Fixed Website bot to work with docker user namespaces.

ASF CI has enabled user namespaces for docker daemon on the build
machines that are used to build the website. This commit makes the
requisite changes to work with user namespacing.

Review: https://reviews.apache.org/r/72856
---
 support/mesos-website.sh| 10 +++---
 support/mesos-website/Dockerfile|  6 --
 support/mesos-website/build.sh  | 13 +
 support/mesos-website/entrypoint.sh | 12 
 4 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/support/mesos-website.sh b/support/mesos-website.sh
index 04a6646..af98f36 100755
--- a/support/mesos-website.sh
+++ b/support/mesos-website.sh
@@ -32,15 +32,11 @@ docker build --no-cache=true -t $TAG support/mesos-website
 
 trap 'docker rmi $TAG' EXIT
 
-# NOTE: We set `LOCAL_USER_ID` environment variable to enable running the
-# container process with the same UID as the user running this script. This
-# ensures that any writes to the mounted volumes will have the same permissions
-# as the user running the script, making it easy to do cleanups; otherwise
-# any writes will have permissions of UID 0 by default on Linux.
-
+# NOTE: ASF CI remaps the host `jenkins` user to UID 0 inside the container
+# so we don't need to do any user switching inside the container to be able
+# to write to the mounted host volumes with the correct permissions.
 docker run \
   --rm \
-  -e LOCAL_USER_ID="$(id -u "$USER")" \
   -v "$MESOS_DIR":/mesos:Z \
   -v "$MESOS_SITE_DIR/content":/mesos/site/publish:Z \
   $TAG
diff --git a/support/mesos-website/Dockerfile b/support/mesos-website/Dockerfile
index 611c496..bcd62fe 100644
--- a/support/mesos-website/Dockerfile
+++ b/support/mesos-website/Dockerfile
@@ -3,8 +3,10 @@ MAINTAINER "d...@mesos.apache.org"
 
 LABEL Description="This image is used for generating Mesos web site."
 
-# The mesos build image drops down to user `mesos`, but
-# we need priviledged access to install packages below.
+# Set the root user explicitly because the base image
+# `mesos/mesos-build` uses `mesos` user by default. Also, note that
+# `root` inside the container is mapped to `jenkins` user on the build
+# machine host in ASF CI.
 USER root
 
 # Install dependencies.
diff --git a/support/mesos-website/build.sh b/support/mesos-website/build.sh
index afbec48..45ab892 100755
--- a/support/mesos-website/build.sh
+++ b/support/mesos-website/build.sh
@@ -27,6 +27,19 @@ function exit_hook {
 
 trap exit_hook EXIT
 
+file_owner_uid=`stat . --format=%u`
+current_user_uid=`id -u`
+if [ $file_owner_uid -ne $current_user_uid ];
+then
+  echo "
+The mounted mesos sources are owned by UID $file_owner_uid
+which is different from the current user UID $current_user_uid
+inside the container. Please check that dockerd has
+user namespace remapping configured properly.
+  "
+  exit 1
+fi
+
 # Build mesos to get the latest master and agent binaries.
 ./bootstrap
 mkdir -p build
diff --git a/support/mesos-website/entrypoint.sh 
b/support/mesos-website/entrypoint.sh
index 72fd723..2029949 100755
--- a/support/mesos-website/entrypoint.sh
+++ b/support/mesos-website/entrypoint.sh
@@ -16,18 +16,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This is a wrapper script for building Mesos website as a non-root user.
+# This is a wrapper script for building Mesos website.
+# TODO(vinod): Merge this with `build.sh` now that we dont need to switch
+# users in ASF CI as user namespacing has been implemented.
 set -e
 set -o pipefail
 
-# This needs to be run under `root` user for `bundle exec rake` to
-# work properly. See MESOS-7859.
 pushd site
 bundle install
 popd # site
 
-# Create a local user account.
-useradd -u $LOCAL_USER_ID -s /bin/bash -m tempuser
-
-# Build mesos and the website as the new user.
-su -c support/mesos-website/build.sh tempuser
+./support/mesos-website/build.sh



[mesos] 06/07: Added `--no-same-owner` option to tar command.

2020-09-11 Thread vinodkone
This is an automated email from the ASF dual-hosted git repository.

vinodkone pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit d3352889d075bb84ed86c69e8acd9b52697d0a1b
Author: Vinod Kone 
AuthorDate: Thu Sep 10 15:21:37 2020 -0500

Added `--no-same-owner` option to tar command.

This ensures extracted tarballs are owned by root when running the
build as root.

Review: https://reviews.apache.org/r/72861
---
 3rdparty/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/3rdparty/Makefile.am b/3rdparty/Makefile.am
index 23f49ec..26099e2 100644
--- a/3rdparty/Makefile.am
+++ b/3rdparty/Makefile.am
@@ -178,7 +178,7 @@ CLEAN_EXTRACTED =   \
 # which cause the packages to get extracted as necessary. We also
 # apply any patches as appropriate.
 %-stamp: %.tar.gz
-   gzip -d -c $^ | tar xf -
+   gzip -d -c $^ | tar xf - --no-same-owner
test ! -e $(srcdir)/$*.patch || patch -d $* -p1 <$(srcdir)/$*.patch
touch $@
 
@@ -191,7 +191,7 @@ CLEAN_EXTRACTED =   \
 CSI_STAMPS = $(CSI_V0)-stamp $(CSI_V1)-stamp
 $(CSI_STAMPS): csi-%-stamp: csi-%.tar.gz
$(MKDIR_P) csi-$*
-   gzip -d -c $^ | (cd csi-$* && tar xf -)
+   gzip -d -c $^ | (cd csi-$* && tar xf - --no-same-owner)
test ! -e $(srcdir)/csi-$*.patch || \
  patch -d csi-$*/spec-$* -p1 <$(srcdir)/csi-$*.patch
touch $@



[mesos] branch 1.9.x updated (911b197 -> abb00b6)

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a change to branch 1.9.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.


from 911b197  Fixed a compilation issue on GCC 5.5 and older.
 new 262b3c2  Added MESOS-10169 to the 1.9.1 CHANGELOG.
 new abb00b6  Added MESOS-10134 to the 1.9.1 CHANGELOG.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG | 2 ++
 1 file changed, 2 insertions(+)



[mesos] 02/02: Added MESOS-10134 to the 1.9.1 CHANGELOG.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch 1.9.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit abb00b65007aa17ed1b8af73650b9ecfd545cbf6
Author: Andrei Sekretenko 
AuthorDate: Thu Sep 10 21:46:46 2020 +0200

Added MESOS-10134 to the 1.9.1 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index c9048d9..ea638db 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -17,6 +17,7 @@ Release Notes - Mesos - Version 1.9.1 (WIP)
   * [MESOS-10096] - Reactivating a draining agent leaves the agent in draining 
state.
   * [MESOS-10118] - Agent incorrectly handles draining when empty.
   * [MESOS-10126] - Docker volume isolator needs to clean up the `info` struct 
regardless the result of unmount operation
+  * [MESOS-10134] - Race between concurrent `javah` runs trying to create 
`java/jni` output directory.
   * [MESOS-10169] - Reintroduce image fetch deduplication while keeping it 
possible to destroy UCR containers in PROVISIONING state.
 
 ** Improvement



[mesos] 01/02: Added MESOS-10169 to the 1.8.2 CHANGELOG.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch 1.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 12d47b0226b0a553f7ccfaf118264bcb839e363f
Author: Andrei Sekretenko 
AuthorDate: Thu Sep 10 21:31:43 2020 +0200

Added MESOS-10169 to the 1.8.2 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 8896297..4f74a48 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -16,6 +16,7 @@ Release Notes - Mesos - Version 1.8.2 (WIP)
   * [MESOS-10007] - Command executor can miss exit status for short-lived 
commands due to double-reaping.
   * [MESOS-10015] - updateAllocation() can stall the allocator with a huge 
number of reservations on an agent.
   * [MESOS-10126] - Docker volume isolator needs to clean up the `info` struct 
regardless the result of unmount operation
+  * [MESOS-10169] - Reintroduce image fetch deduplication while keeping it 
possible to destroy UCR containers in PROVISIONING state.
 
 ** Improvement
   * [MESOS-9889] - Master CPU high due to unexpected foreachkey behaviour in 
Master::__reregisterSlave.



[mesos] branch 1.8.x updated (644b7c3 -> 5979758)

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a change to branch 1.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.


from 644b7c3  Fixed a compilation issue on GCC 5.5 and older.
 new 12d47b0  Added MESOS-10169 to the 1.8.2 CHANGELOG.
 new 5979758  Added MESOS-10134 to the 1.8.2 CHANGELOG.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG | 2 ++
 1 file changed, 2 insertions(+)



[mesos] 02/02: Added MESOS-10134 to the 1.7.4 CHANGELOG.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 5a8842259f9ad2506d718a4667d756421ef1c55e
Author: Andrei Sekretenko 
AuthorDate: Thu Sep 10 21:48:16 2020 +0200

Added MESOS-10134 to the 1.7.4 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 893e630..4096e9a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@ Release Notes - Mesos - Version 1.7.4 (WIP)
 
 ** Bug
   * [MESOS-10126] - Docker volume isolator needs to clean up the `info` struct 
regardless the result of unmount operation
+  * [MESOS-10134] - Race between concurrent `javah` runs trying to create 
`java/jni` output directory.
   * [MESOS-10169] - Reintroduce image fetch deduplication while keeping it 
possible to destroy UCR containers in PROVISIONING state.
 
 



[mesos] 02/02: Added MESOS-10134 to the 1.8.2 CHANGELOG.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch 1.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 59797580e87572ae0b05ed3c2806aaae87d37270
Author: Andrei Sekretenko 
AuthorDate: Thu Sep 10 21:47:23 2020 +0200

Added MESOS-10134 to the 1.8.2 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 4f74a48..771bb26 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -16,6 +16,7 @@ Release Notes - Mesos - Version 1.8.2 (WIP)
   * [MESOS-10007] - Command executor can miss exit status for short-lived 
commands due to double-reaping.
   * [MESOS-10015] - updateAllocation() can stall the allocator with a huge 
number of reservations on an agent.
   * [MESOS-10126] - Docker volume isolator needs to clean up the `info` struct 
regardless the result of unmount operation
+  * [MESOS-10134] - Race between concurrent `javah` runs trying to create 
`java/jni` output directory.
   * [MESOS-10169] - Reintroduce image fetch deduplication while keeping it 
possible to destroy UCR containers in PROVISIONING state.
 
 ** Improvement



[mesos] branch 1.7.x updated (8fc2878 -> 5a88422)

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a change to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.


from 8fc2878  Added a test for discarding image pull on discard of getting 
image.
 new 87a03ff  Added MESOS-10169 to the 1.7.4 CHANGELOG.
 new 5a88422  Added MESOS-10134 to the 1.7.4 CHANGELOG.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG | 2 ++
 1 file changed, 2 insertions(+)



[mesos] 01/02: Added MESOS-10169 to the 1.7.4 CHANGELOG.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 87a03ffee7af6f0cb2d5755414d7d7e1bdec2378
Author: Andrei Sekretenko 
AuthorDate: Thu Sep 10 21:32:06 2020 +0200

Added MESOS-10169 to the 1.7.4 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 395305d..893e630 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@ Release Notes - Mesos - Version 1.7.4 (WIP)
 
 ** Bug
   * [MESOS-10126] - Docker volume isolator needs to clean up the `info` struct 
regardless the result of unmount operation
+  * [MESOS-10169] - Reintroduce image fetch deduplication while keeping it 
possible to destroy UCR containers in PROVISIONING state.
 
 
 Release Notes - Mesos - Version 1.7.3



[mesos] 01/02: Added MESOS-10169 to the 1.9.1 CHANGELOG.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch 1.9.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 262b3c205e0ce7d9b5fd70c1db8b9829d25d7d9f
Author: Andrei Sekretenko 
AuthorDate: Thu Sep 10 21:30:30 2020 +0200

Added MESOS-10169 to the 1.9.1 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 0986f35..c9048d9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -17,6 +17,7 @@ Release Notes - Mesos - Version 1.9.1 (WIP)
   * [MESOS-10096] - Reactivating a draining agent leaves the agent in draining 
state.
   * [MESOS-10118] - Agent incorrectly handles draining when empty.
   * [MESOS-10126] - Docker volume isolator needs to clean up the `info` struct 
regardless the result of unmount operation
+  * [MESOS-10169] - Reintroduce image fetch deduplication while keeping it 
possible to destroy UCR containers in PROVISIONING state.
 
 ** Improvement
   * [MESOS-9889] - Master CPU high due to unexpected foreachkey behaviour in 
Master::__reregisterSlave.



[mesos] branch master updated: Fixed a compilation issue on GCC 5.5 and older.

2020-09-11 Thread bmahler
This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
 new 049a0c7  Fixed a compilation issue on GCC 5.5 and older.
049a0c7 is described below

commit 049a0c7227411b0847741a8fc87a2f24fa28ea15
Author: Benjamin Mahler 
AuthorDate: Fri Sep 11 13:00:49 2020 -0400

Fixed a compilation issue on GCC 5.5 and older.
---
 src/tests/master_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 41b4a49..cd0973e 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -7776,7 +7776,7 @@ TEST_F(MasterTest, 
NonCheckpointingFrameworkAgentDisconnectionExecutorOnly)
 const v1::master::Response::GetAgents::Agent& agent =
   response->get_agents().agents(0);
 
-EXPECT_EQ(false, agent.active());
+EXPECT_FALSE(agent.active());
   }
 
   EXPECT_CALL(exec, shutdown(_));



[mesos] branch 1.10.x updated: Fixed a compilation issue on GCC 5.5 and older.

2020-09-11 Thread bmahler
This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a commit to branch 1.10.x
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/1.10.x by this push:
 new 6db2521  Fixed a compilation issue on GCC 5.5 and older.
6db2521 is described below

commit 6db2521f821e513ca5cce10f30f77409e675b3f6
Author: Benjamin Mahler 
AuthorDate: Fri Sep 11 13:00:49 2020 -0400

Fixed a compilation issue on GCC 5.5 and older.
---
 src/tests/master_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 41b4a49..cd0973e 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -7776,7 +7776,7 @@ TEST_F(MasterTest, 
NonCheckpointingFrameworkAgentDisconnectionExecutorOnly)
 const v1::master::Response::GetAgents::Agent& agent =
   response->get_agents().agents(0);
 
-EXPECT_EQ(false, agent.active());
+EXPECT_FALSE(agent.active());
   }
 
   EXPECT_CALL(exec, shutdown(_));



[mesos] branch 1.8.x updated: Fixed a compilation issue on GCC 5.5 and older.

2020-09-11 Thread bmahler
This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a commit to branch 1.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/1.8.x by this push:
 new 644b7c3  Fixed a compilation issue on GCC 5.5 and older.
644b7c3 is described below

commit 644b7c3204c94862b1155b02f55c46bcf02dbcd0
Author: Benjamin Mahler 
AuthorDate: Fri Sep 11 13:00:49 2020 -0400

Fixed a compilation issue on GCC 5.5 and older.
---
 src/tests/master_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index cedbb2b..8758ede 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -7747,7 +7747,7 @@ TEST_F(MasterTest, 
NonCheckpointingFrameworkAgentDisconnectionExecutorOnly)
 const v1::master::Response::GetAgents::Agent& agent =
   response->get_agents().agents(0);
 
-EXPECT_EQ(false, agent.active());
+EXPECT_FALSE(agent.active());
   }
 
   EXPECT_CALL(exec, shutdown(_));



[mesos] branch 1.9.x updated: Fixed a compilation issue on GCC 5.5 and older.

2020-09-11 Thread bmahler
This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a commit to branch 1.9.x
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/1.9.x by this push:
 new 911b197  Fixed a compilation issue on GCC 5.5 and older.
911b197 is described below

commit 911b197735dd8e52262426eb5a2dd8df34297941
Author: Benjamin Mahler 
AuthorDate: Fri Sep 11 13:00:49 2020 -0400

Fixed a compilation issue on GCC 5.5 and older.
---
 src/tests/master_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 91a8a4b..8c36d50 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -7753,7 +7753,7 @@ TEST_F(MasterTest, 
NonCheckpointingFrameworkAgentDisconnectionExecutorOnly)
 const v1::master::Response::GetAgents::Agent& agent =
   response->get_agents().agents(0);
 
-EXPECT_EQ(false, agent.active());
+EXPECT_FALSE(agent.active());
   }
 
   EXPECT_CALL(exec, shutdown(_));



[mesos] 05/05: Exposed framework offer constraints via the GET_FRAMEWORKS call.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit e00e7a1b578de1161fbb181124cad2a20df5bb95
Author: Andrei Sekretenko 
AuthorDate: Mon Sep 7 21:43:27 2020 +0200

Exposed framework offer constraints via the GET_FRAMEWORKS call.

Review: https://reviews.apache.org/r/72842
---
 src/master/http.cpp |  4 
 src/tests/master/update_framework_tests.cpp | 16 ++--
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/master/http.cpp b/src/master/http.cpp
index aede6ee..3d8e709 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -1301,6 +1301,10 @@ mesos::master::Response::GetFrameworks::Framework model(
 _framework.mutable_offered_resources()->Add()->CopyFrom(resource);
   }
 
+  if (framework.offerConstraints().isSome()) {
+*_framework.mutable_offer_constraints() = *framework.offerConstraints();
+  }
+
   return _framework;
 }
 
diff --git a/src/tests/master/update_framework_tests.cpp 
b/src/tests/master/update_framework_tests.cpp
index aab94e3..7c83bac 100644
--- a/src/tests/master/update_framework_tests.cpp
+++ b/src/tests/master/update_framework_tests.cpp
@@ -938,8 +938,20 @@ TEST_F(UpdateFrameworkTest, OfferConstraints)
 ASSERT_SOME_EQ(JSON::protobuf(updatedConstraints), reportedConstraints);
   }
 
-  // TODO(asekretenko): After master starts exposing offer constraints via the
-  // V1 API (MESOS-10179), check the constraints in the GET_FRAMEWORKS 
response.
+  Future frameworks =
+getFrameworks(master->get()->pid);
+  AWAIT_READY(frameworks);
+
+  ASSERT_EQ(frameworks->frameworks_size(), 1);
+  ASSERT_TRUE(frameworks->frameworks(0).has_offer_constraints());
+
+  // TODO(asekretenko): As the semantics of the offer constraints does not
+  // depend on the order of constraints groups and the order of individual
+  // constraints inside groups, we should consider using a `MessageDifferencer`
+  // configured to take this into account.
+  ASSERT_EQ(
+  updatedConstraints.SerializeAsString(),
+  frameworks->frameworks(0).offer_constraints().SerializeAsString());
 }
 
 



[mesos] 02/05: Added `OfferConstraints` to `struct Framework` in the master.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit c8f8fbd328235fcd7aa1b32e079fb6f9a424b881
Author: Andrei Sekretenko 
AuthorDate: Fri Sep 4 20:23:25 2020 +0200

Added `OfferConstraints` to `struct Framework` in the master.

This is a prerequisite for exposing framework's offer constraints
via master API endpoints.

Review: https://reviews.apache.org/r/72839
---
 src/master/framework.cpp | 41 +++
 src/master/master.cpp| 74 +---
 src/master/master.hpp| 18 +++-
 3 files changed, 110 insertions(+), 23 deletions(-)

diff --git a/src/master/framework.cpp b/src/master/framework.cpp
index e9e2d20..980828e 100644
--- a/src/master/framework.cpp
+++ b/src/master/framework.cpp
@@ -25,6 +25,7 @@ using process::Owned;
 using process::http::authentication::Principal;
 
 using mesos::authorization::ActionObject;
+using mesos::scheduler::OfferConstraints;
 
 namespace mesos {
 namespace internal {
@@ -34,10 +35,19 @@ Framework::Framework(
 Master* const master,
 const Flags& masterFlags,
 const FrameworkInfo& info,
+Option&& offerConstraints,
 const process::UPID& pid,
 const Owned& approvers,
 const process::Time& time)
-  : Framework(master, masterFlags, info, CONNECTED, true, approvers, time)
+  : Framework(
+master,
+masterFlags,
+info,
+std::move(offerConstraints),
+CONNECTED,
+true,
+approvers,
+time)
 {
   pid_ = pid;
 }
@@ -47,10 +57,19 @@ Framework::Framework(
 Master* const master,
 const Flags& masterFlags,
 const FrameworkInfo& info,
+Option&& offerConstraints,
 const StreamingHttpConnection& http,
 const Owned& approvers,
 const process::Time& time)
-  : Framework(master, masterFlags, info, CONNECTED, true, approvers, time)
+  : Framework(
+master,
+masterFlags,
+info,
+std::move(offerConstraints),
+CONNECTED,
+true,
+approvers,
+time)
 {
   http_ = http;
 }
@@ -61,7 +80,14 @@ Framework::Framework(
 const Flags& masterFlags,
 const FrameworkInfo& info)
   : Framework(
-  master, masterFlags, info, RECOVERED, false, nullptr, process::Time())
+master,
+masterFlags,
+info,
+None(),
+RECOVERED,
+false,
+nullptr,
+process::Time())
 {}
 
 
@@ -69,6 +95,7 @@ Framework::Framework(
 Master* const _master,
 const Flags& masterFlags,
 const FrameworkInfo& _info,
+Option&& offerConstraints,
 State state,
 bool active_,
 const Owned& approvers,
@@ -84,7 +111,8 @@ Framework::Framework(
 metrics(_info, masterFlags.publish_per_framework_metrics),
 active_(active_),
 state(state),
-objectApprovers(approvers)
+objectApprovers(approvers),
+offerConstraints_(std::move(offerConstraints))
 {
   CHECK(_info.has_id());
 
@@ -508,7 +536,9 @@ void Framework::removeOperation(Operation* operation)
 }
 
 
-void Framework::update(const FrameworkInfo& newInfo)
+void Framework::update(
+const FrameworkInfo& newInfo,
+Option&& offerConstraints)
 {
   // We only merge 'info' from the same framework 'id'.
   CHECK_EQ(info.id(), newInfo.id());
@@ -523,6 +553,7 @@ void Framework::update(const FrameworkInfo& newInfo)
   CHECK_EQ(info.checkpoint(), newInfo.checkpoint());
 
   info.CopyFrom(newInfo);
+  offerConstraints_ = std::move(offerConstraints);
 
   // Save the old list of roles for later.
   std::set oldRoles = roles;
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 438ef98..54b24b4 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -155,6 +155,8 @@ using mesos::master::contender::MasterContender;
 
 using mesos::master::detector::MasterDetector;
 
+using mesos::scheduler::OfferConstraints;
+
 static bool isValidFailoverTimeout(const FrameworkInfo& frameworkInfo);
 
 
@@ -2669,13 +2671,17 @@ void Master::subscribe(
   Option validationError =
 validateFramework(frameworkInfo, subscribe.suppressed_roles());
 
+  Option offerConstraints;
+  if (subscribe.has_offer_constraints()) {
+offerConstraints = std::move(*subscribe.mutable_offer_constraints());
+  }
+
   allocator::FrameworkOptions allocatorOptions;
 
   // TODO(asekretenko): Validate roles in offer constraints (see MESOS-10176).
-  if (validationError.isNone() && subscribe.has_offer_constraints()) {
+  if (validationError.isNone() && offerConstraints.isSome()) {
 Try filter = OfferConstraintsFilter::create(
-offerConstraintsFilterOptions,
-std::move(*subscribe.mutable_offer_constraints()));
+offerConstraintsFilterOptions, OfferConstraints(*offerConstraints));
 
 if (filter.isError()) {
   validationError = Error(std::move(filter.error()));
@@ -2705,6 +2711,7 @@ 

[mesos] 04/05: Added offer constraints to the `GetFrameworks` protobuf.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 8369e77b23de9453156626344a3ea0e36b4dd529
Author: Andrei Sekretenko 
AuthorDate: Mon Sep 7 21:42:32 2020 +0200

Added offer constraints to the `GetFrameworks` protobuf.

Review: https://reviews.apache.org/r/72841
---
 include/mesos/master/master.proto| 6 ++
 include/mesos/v1/master/master.proto | 6 ++
 2 files changed, 12 insertions(+)

diff --git a/include/mesos/master/master.proto 
b/include/mesos/master/master.proto
index 021dadc..d51350b 100644
--- a/include/mesos/master/master.proto
+++ b/include/mesos/master/master.proto
@@ -22,6 +22,8 @@ import "mesos/maintenance/maintenance.proto";
 
 import "mesos/quota/quota.proto";
 
+import "mesos/scheduler/scheduler.proto";
+
 package mesos.master;
 
 option cc_enable_arenas = true;
@@ -488,11 +490,15 @@ message Response {
   optional TimeInfo reregistered_time = 5;
   optional TimeInfo unregistered_time = 6;
 
+  // NOTE: Offers, inverse offers, allocated/offered resources
+  // and offer constraints are never reported via master API events.
   repeated Offer offers = 7;
   repeated InverseOffer inverse_offers = 8;
 
   repeated Resource allocated_resources = 9;
   repeated Resource offered_resources = 10;
+
+  optional scheduler.OfferConstraints offer_constraints = 12;
 }
 
 // Frameworks that have subscribed with the master. Note that this includes
diff --git a/include/mesos/v1/master/master.proto 
b/include/mesos/v1/master/master.proto
index 488fe29..6735228 100644
--- a/include/mesos/v1/master/master.proto
+++ b/include/mesos/v1/master/master.proto
@@ -23,6 +23,8 @@ import "mesos/v1/mesos.proto";
 
 import "mesos/v1/maintenance/maintenance.proto";
 
+import "mesos/v1/scheduler/scheduler.proto";
+
 import "mesos/v1/quota/quota.proto";
 
 package mesos.v1.master;
@@ -489,11 +491,15 @@ message Response {
   optional TimeInfo reregistered_time = 5;
   optional TimeInfo unregistered_time = 6;
 
+  // NOTE: Offers, inverse offers, allocated/offered resources
+  // and offer constraints are never reported via master API events.
   repeated Offer offers = 7;
   repeated InverseOffer inverse_offers = 8;
 
   repeated Resource allocated_resources = 9;
   repeated Resource offered_resources = 10;
+
+  optional scheduler.OfferConstraints offer_constraints = 12;
 }
 
 // Frameworks that have subscribed with the master. Note that this includes



[mesos] branch master updated (049a0c7 -> e00e7a1)

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git.


from 049a0c7  Fixed a compilation issue on GCC 5.5 and older.
 new aa14054  Fixed a stale comment about delayed permissions when batching 
requests.
 new c8f8fbd  Added `OfferConstraints` to `struct Framework` in the master.
 new ae35c0c  Exposed offer constraints via the `/state` and `/frameworks` 
endpoints.
 new 8369e77  Added offer constraints to the `GetFrameworks` protobuf.
 new e00e7a1  Exposed framework offer constraints via the GET_FRAMEWORKS 
call.

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 include/mesos/master/master.proto   |  6 +++
 include/mesos/v1/master/master.proto|  6 +++
 src/master/framework.cpp| 41 ++--
 src/master/http.cpp | 19 ++--
 src/master/master.cpp   | 74 ++---
 src/master/master.hpp   | 18 ++-
 src/master/readonly_handler.cpp |  5 ++
 src/tests/master/update_framework_tests.cpp | 65 +++--
 8 files changed, 201 insertions(+), 33 deletions(-)



[mesos] 03/05: Exposed offer constraints via the `/state` and `/frameworks` endpoints.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit ae35c0ca003adb41298d256678788e41cdea0523
Author: Andrei Sekretenko 
AuthorDate: Fri Sep 4 21:31:41 2020 +0200

Exposed offer constraints via the `/state` and `/frameworks` endpoints.

Review: https://reviews.apache.org/r/72840
---
 src/master/readonly_handler.cpp |  5 +++
 src/tests/master/update_framework_tests.cpp | 53 ++---
 2 files changed, 53 insertions(+), 5 deletions(-)

diff --git a/src/master/readonly_handler.cpp b/src/master/readonly_handler.cpp
index b1336f9..df499d1 100644
--- a/src/master/readonly_handler.cpp
+++ b/src/master/readonly_handler.cpp
@@ -257,6 +257,11 @@ void FullFrameworkWriter::operator()(JSON::ObjectWriter* 
writer) const
   if (framework_->info.has_labels()) {
 writer->field("labels", framework_->info.labels());
   }
+
+  if (framework_->offerConstraints().isSome()) {
+writer->field(
+"offer_constraints", JSON::Protobuf(*framework_->offerConstraints()));
+  };
 }
 
 
diff --git a/src/tests/master/update_framework_tests.cpp 
b/src/tests/master/update_framework_tests.cpp
index 87bc3c7..aab94e3 100644
--- a/src/tests/master/update_framework_tests.cpp
+++ b/src/tests/master/update_framework_tests.cpp
@@ -870,13 +870,14 @@ TEST_F(UpdateFrameworkTest, OfferConstraints)
 
   // Change constraint to `NotExists` so that the agent will now be offered to
   // the framework.
+  OfferConstraints updatedConstraints;
+
   {
 FrameworkInfo framework = DEFAULT_FRAMEWORK_INFO;
 *framework.mutable_id() = subscribed->framework_id();
 
-OfferConstraints constraints;
 AttributeConstraint* constraint =
-  (*constraints.mutable_role_constraints())[framework.roles(0)]
+  (*updatedConstraints.mutable_role_constraints())[framework.roles(0)]
 .add_groups()
 ->add_attribute_constraints();
 
@@ -884,7 +885,7 @@ TEST_F(UpdateFrameworkTest, OfferConstraints)
 *constraint->mutable_predicate()->mutable_not_exists() =
   AttributeConstraint::Predicate::NotExists();
 
-AWAIT_READY(callUpdateFramework(, framework, {}, constraints));
+AWAIT_READY(callUpdateFramework(, framework, {}, 
updatedConstraints));
   }
 
   Clock::pause();
@@ -895,8 +896,50 @@ TEST_F(UpdateFrameworkTest, OfferConstraints)
   AWAIT_READY(offers);
   EXPECT_EQ(offers->offers().size(), 1);
 
-  // TODO(asekretenko): After master starts exposing offer constraints via
-  // its endpoints (MESOS-10179), check the constraints in the endpoints.
+  // Ensure that the updated offer constraints are reflected in the master's
+  // '/state' response.
+  {
+Future response = process::http::get(
+master->get()->pid,
+"state",
+None(),
+createBasicAuthHeaders(DEFAULT_CREDENTIAL));
+
+AWAIT_ASSERT_RESPONSE_STATUS_EQ(process::http::OK().status, response);
+AWAIT_ASSERT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", 
response);
+
+Try parse = JSON::parse(response->body);
+ASSERT_SOME(parse);
+
+Result reportedConstraints = parse->find(
+"frameworks[0].offer_constraints");
+
+EXPECT_SOME_EQ(JSON::protobuf(updatedConstraints), reportedConstraints);
+  }
+
+  // Ensure that the updated offer constraints are reflected in the master's
+  // '/frameworks' response.
+  {
+Future response = process::http::get(
+master->get()->pid,
+"frameworks",
+None(),
+createBasicAuthHeaders(DEFAULT_CREDENTIAL));
+
+AWAIT_ASSERT_RESPONSE_STATUS_EQ(process::http::OK().status, response);
+AWAIT_ASSERT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", 
response);
+
+Try parse = JSON::parse(response->body);
+ASSERT_SOME(parse);
+
+Result reportedConstraints = parse->find(
+"frameworks[0].offer_constraints");
+
+ASSERT_SOME_EQ(JSON::protobuf(updatedConstraints), reportedConstraints);
+  }
+
+  // TODO(asekretenko): After master starts exposing offer constraints via the
+  // V1 API (MESOS-10179), check the constraints in the GET_FRAMEWORKS 
response.
 }
 
 



[mesos] 01/05: Fixed a stale comment about delayed permissions when batching requests.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit aa14054722c38ca9e7e24e77133ad82d70c4ddc2
Author: Andrei Sekretenko 
AuthorDate: Tue Sep 8 16:50:22 2020 +0200

Fixed a stale comment about delayed permissions when batching requests.

Now that synchronous authorization requires the authorizer to keep
object approvers up-to-date by the authorizer, batched processing
of readonly requests in the Master no longer intorduces an additional
delay into propagation of permission changes.

Review: https://reviews.apache.org/r/72843
---
 src/master/http.cpp | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/master/http.cpp b/src/master/http.cpp
index f34ea54..aede6ee 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -2335,6 +2335,16 @@ Future Master::Http::deferBatchedRequest(
 // specific to the batched requests which are always members of
 // `ReadOnlyHandler`, since we rely on the response only depending
 // on query parameters and the current master state.
+//
+// TODO(asekretenko): We should consider replacing `approvers` with
+// taking the set of authorization actions and creating
+// `ObjectApprovers` inside of this method, because the code below
+// implicilty relies on the fact that `approvers` for a given handler
+// always contain `ObjectApprover`s for the same set of actions. Note
+// that together with the fact that permissions in all 
`ObjectApprover`s
+// for a given principal are equally up-to-date (regardless of when 
they
+// were created), this allows us to compare `handler` and `principal`
+// instead of comparing `approvers`.
 return handler == batchedRequest.handler &&
principal == batchedRequest.principal &&
outputContentType == batchedRequest.outputContentType &&
@@ -2360,11 +2370,6 @@ Future Master::Http::deferBatchedRequest(
 std::move(promise)});
   } else {
 // Return the existing future if we have a matching request.
-// NOTE: This is effectively adding a layer of authorization permissions
-// caching since we only checked the equality of principals, not the
-// equality of the approvers themselves.
-// On heavily-loaded masters, this could lead to a delay of several seconds
-// before permission changes for a principal take effect.
 future = it->promise.future();
 ++master->metrics->http_cache_hits;
 



[mesos] 01/02: Added MESOS-10169 to the 1.10.1 CHANGELOG.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch 1.10.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 1915ea44e2fa217ed4d2c52a91c3226b84b6d686
Author: Andrei Sekretenko 
AuthorDate: Thu Sep 10 21:29:50 2020 +0200

Added MESOS-10169 to the 1.10.1 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index e39e79d..844c112 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@ Release Notes - Mesos - Version 1.10.1 (WIP)
 ** Bug
   * [MESOS-9609] - Master check failure when marking agent unreachable.
   * [MESOS-10126] - Docker volume isolator needs to clean up the `info` struct 
regardless the result of unmount operation
+  * [MESOS-10169] - Reintroduce image fetch deduplication while keeping it 
possible to destroy UCR containers in PROVISIONING state.
 
 
 Release Notes - Mesos - Version 1.10.0



[mesos] branch 1.10.x updated (6db2521 -> e79a434)

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a change to branch 1.10.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.


from 6db2521  Fixed a compilation issue on GCC 5.5 and older.
 new 1915ea4  Added MESOS-10169 to the 1.10.1 CHANGELOG.
 new e79a434  Added MESOS-10134 to the 1.10.1 CHANGELOG.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG | 2 ++
 1 file changed, 2 insertions(+)



[mesos] 02/02: Added MESOS-10134 to the 1.10.1 CHANGELOG.

2020-09-11 Thread asekretenko
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch 1.10.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit e79a434033f4d56944ef94490a2908f616bb66fd
Author: Andrei Sekretenko 
AuthorDate: Thu Sep 10 21:46:17 2020 +0200

Added MESOS-10134 to the 1.10.1 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 844c112..0473881 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@ Release Notes - Mesos - Version 1.10.1 (WIP)
 ** Bug
   * [MESOS-9609] - Master check failure when marking agent unreachable.
   * [MESOS-10126] - Docker volume isolator needs to clean up the `info` struct 
regardless the result of unmount operation
+  * [MESOS-10134] - Race between concurrent `javah` runs trying to create 
`java/jni` output directory.
   * [MESOS-10169] - Reintroduce image fetch deduplication while keeping it 
possible to destroy UCR containers in PROVISIONING state.