Repository: mesos
Updated Branches:
  refs/heads/master f158e03bb -> 400d241e5


Fixed a minor bug in setting the agent's `totalResources`.

If the following branch is taken, `totalResources` would be set
to `resources.get()` which is not equal to `info.resources()`.

```cpp
  if (HookManager::hooksAvailable()) {
    info.mutable_resources()->CopyFrom(
        HookManager::slaveResourcesDecorator(info));
  }
```

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


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

Branch: refs/heads/master
Commit: 400d241e5b64586f6bc2f898f14261441e247766
Parents: f158e03
Author: Michael Park <[email protected]>
Authored: Thu May 4 14:12:03 2017 -0700
Committer: Michael Park <[email protected]>
Committed: Thu May 4 14:12:03 2017 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/400d241e/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 284f872..a37c6c8 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -520,7 +520,7 @@ void Slave::initialize()
 
   // Initialize `totalResources` with `info.resources`, checkpointed
   // resources will be applied later during recovery.
-  totalResources = resources.get();
+  totalResources = info.resources();
 
   LOG(INFO) << "Agent resources: " << info.resources();
 

Reply via email to