You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ch...@apache.org on 2018/08/17 17:57:04 UTC

[mesos] branch 1.7.x updated (52675cb -> bbed93b)

This is an automated email from the ASF dual-hosted git repository.

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


    from 52675cb  Added MESOS-9156 to the 1.7.0 CHANGELOG.
     new bc33c80  Only update profiles when getting `200 OK` in `UriDiskProfileAdaptor`.
     new bbed93b  Added MESOS-9163 to the 1.7.0 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                                                |  1 +
 .../storage/uri_disk_profile_adaptor.cpp                 | 16 +++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)


[mesos] 01/02: Only update profiles when getting `200 OK` in `UriDiskProfileAdaptor`.

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bc33c803f98e645f5ded1656ea47f0332fb47cc0
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
AuthorDate: Fri Aug 17 10:17:12 2018 -0700

    Only update profiles when getting `200 OK` in `UriDiskProfileAdaptor`.
    
    Review: https://reviews.apache.org/r/68413
---
 .../storage/uri_disk_profile_adaptor.cpp                 | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/resource_provider/storage/uri_disk_profile_adaptor.cpp b/src/resource_provider/storage/uri_disk_profile_adaptor.cpp
index f686a43..d214af8 100644
--- a/src/resource_provider/storage/uri_disk_profile_adaptor.cpp
+++ b/src/resource_provider/storage/uri_disk_profile_adaptor.cpp
@@ -200,14 +200,16 @@ void UriDiskProfileAdaptorProcess::poll()
 }
 
 
-void UriDiskProfileAdaptorProcess::_poll(const Future<http::Response>& future)
+void UriDiskProfileAdaptorProcess::_poll(const Future<http::Response>& response)
 {
-  if (future.isReady()) {
-    // NOTE: We don't check the HTTP status code because we don't know
-    // what potential codes are considered successful.
-    __poll(future->body);
-  } else if (future.isFailed()) {
-    __poll(Error(future.failure()));
+  if (response.isReady()) {
+    if (response->code == http::Status::OK) {
+      __poll(response->body);
+    } else {
+      __poll(Error("Unexpected HTTP response '" + response->status + "'"));
+    }
+  } else if (response.isFailed()) {
+    __poll(Error(response.failure()));
   } else {
     __poll(Error("Future discarded or abandoned"));
   }


[mesos] 02/02: Added MESOS-9163 to the 1.7.0 CHANGELOG.

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bbed93bfac381e27830872bd9534845b8d250997
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
AuthorDate: Fri Aug 17 10:35:00 2018 -0700

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

diff --git a/CHANGELOG b/CHANGELOG
index 615eb58..841f94d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -123,6 +123,7 @@ All Resolved Issues:
   * [MESOS-9149] - Failed to build gRPC on Linux without OpenSSL.
   * [MESOS-9156] - StorageLocalResourceProviderProcess can deadlock
   * [MESOS-9160] - Failed to compile gRPC when the build path contains symlinks.
+  * [MESOS-9163] - `UriDiskProfileAdaptor` should not update profiles when a poll returns a non-OK HTTP status.
 
 ** Documentation
   * [MESOS-8740] - Update description of a Containerizer interface.