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 2019/04/11 16:05:44 UTC

[mesos] branch master updated (4a33d2a -> 9aac730)

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

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


    from 4a33d2a  Updated comments in v1/mesos.proto.
     new e3504a6  Fixed potential use-after-free bug in storage local resource provider.
     new 9aac730  Added MESOS-9712 to the 1.8.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 +
 src/resource_provider/storage/provider.cpp | 28 +++++++++++++++-------------
 2 files changed, 16 insertions(+), 13 deletions(-)


[mesos] 01/02: Fixed potential use-after-free bug in storage local resource provider.

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

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

commit e3504a6a86558d264a939d974fdb5c257ab53f5d
Author: Benjamin Bannier <be...@mesosphere.io>
AuthorDate: Thu Apr 11 08:55:43 2019 -0700

    Fixed potential use-after-free bug in storage local resource provider.
    
    The storage local resource provider manages a metrics instance which is
    shared with the service and volume managers it also holds; these
    services do not manage the lifetime of the metrics instance.
    
    This patch fixes the lifetime of the metrics instance.
    
    Review: https://reviews.apache.org/r/70454/
---
 src/resource_provider/storage/provider.cpp | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/resource_provider/storage/provider.cpp b/src/resource_provider/storage/provider.cpp
index b2ca5d0..999fe95 100644
--- a/src/resource_provider/storage/provider.cpp
+++ b/src/resource_provider/storage/provider.cpp
@@ -377,6 +377,19 @@ private:
 
   Runtime runtime;
 
+  // NOTE: `metrics` must be destructed after `volumeManager` and
+  // `serviceManager` since they hold a pointer to it.
+  struct Metrics : public csi::Metrics
+  {
+    explicit Metrics(const string& prefix);
+    ~Metrics();
+
+    hashmap<Offer::Operation::Type, PushGauge> operations_pending;
+    hashmap<Offer::Operation::Type, Counter> operations_finished;
+    hashmap<Offer::Operation::Type, Counter> operations_failed;
+    hashmap<Offer::Operation::Type, Counter> operations_dropped;
+  } metrics;
+
   // NOTE: `serviceManager` must be destructed after `volumeManager` since the
   // latter holds a pointer of the former.
   Owned<ServiceManager> serviceManager;
@@ -401,17 +414,6 @@ private:
   // keeps track of pending operations that disallow reconciliation, and ensures
   // that any reconciliation waits for these operations to finish.
   Sequence sequence;
-
-  struct Metrics : public csi::Metrics
-  {
-    explicit Metrics(const string& prefix);
-    ~Metrics();
-
-    hashmap<Offer::Operation::Type, PushGauge> operations_pending;
-    hashmap<Offer::Operation::Type, Counter> operations_finished;
-    hashmap<Offer::Operation::Type, Counter> operations_failed;
-    hashmap<Offer::Operation::Type, Counter> operations_dropped;
-  } metrics;
 };
 
 
@@ -434,9 +436,9 @@ StorageLocalResourceProviderProcess::StorageLocalResourceProviderProcess(
     slaveId(_slaveId),
     authToken(_authToken),
     strict(_strict),
+    metrics("resource_providers/" + info.type() + "." + info.name() + "/"),
     resourceVersion(id::UUID::random()),
-    sequence("storage-local-resource-provider-sequence"),
-    metrics("resource_providers/" + info.type() + "." + info.name() + "/")
+    sequence("storage-local-resource-provider-sequence")
 {
   diskProfileAdaptor = DiskProfileAdaptor::getAdaptor();
   CHECK_NOTNULL(diskProfileAdaptor.get());


[mesos] 02/02: Added MESOS-9712 to the 1.8.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 master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 9aac730672232435dfab788e9542cde0cd93dfd7
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
AuthorDate: Thu Apr 11 09:04:02 2019 -0700

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

diff --git a/CHANGELOG b/CHANGELOG
index b51de9b..e312244 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -194,6 +194,7 @@ All Resolved Issues:
   * [MESOS-9696] - Test MasterQuotaTest.AvailableResourcesSingleDisconnectedAgent is flaky
   * [MESOS-9707] - Calling link::lo() may cause runtime error
   * [MESOS-9667] - Check failure when executor for task using resource provider resources subscribes before agent is registered.
+  * [MESOS-9712] - StorageLocalResourceProviderTest.CsiPluginRpcMetrics is flaky.
   * [MESOS-9727] - Heartbeat calls from executor to agent are reported as errors.
 
 ** Epic