You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Chun-Hung Hsiao <ch...@mesosphere.io> on 2017/11/04 01:35:50 UTC

Review Request 63554: WIP: Added a publish function in resource provider manager.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63554/
-----------------------------------------------------------

Review request for mesos, Jie Yu, Joseph Wu, and Jan Schlicht.


Bugs: MESOS-7550
    https://issues.apache.org/jira/browse/MESOS-7550


Repository: mesos


Description
-------

The publish function takes a `SlaveID` and a `Resources` structure that
includes all resources allocated by all tasks currently running or ready
to run on the agent. Also added validation tests.


Diffs
-----

  src/resource_provider/manager.hpp 3b70e75c6b6721864ae0ee9c4a593b5035d8388f 
  src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e 
  src/resource_provider/manager_process.hpp PRE-CREATION 
  src/tests/resource_provider/mock_manager.hpp PRE-CREATION 
  src/tests/resource_provider/mock_manager.cpp PRE-CREATION 
  src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 
  src/tests/resource_provider_validation_tests.cpp bf789a05771b7c25f2fc2a8a5b35d38519e4793b 


Diff: https://reviews.apache.org/r/63554/diff/1/


Testing
-------

make


Thanks,

Chun-Hung Hsiao


Re: Review Request 63554: Added a publish function in resource provider manager.

Posted by Jan Schlicht <ja...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63554/#review190564
-----------------------------------------------------------




src/resource_provider/manager.cpp
Lines 321 (patched)
<https://reviews.apache.org/r/63554/#comment268044>

    Do a `return Failure(` because `collect` would return a failure anyways. We don't have to send out `PUBLISH` events for subsequent resource providers.
    You could also do this contains check when filling up the `publishing` hashmap and fail early.



src/resource_provider/manager.cpp
Lines 336-338 (patched)
<https://reviews.apache.org/r/63554/#comment268046>

    Same as above: We should do a `return Failure(` here.



src/resource_provider/manager.cpp
Lines 440 (patched)
<https://reviews.apache.org/r/63554/#comment268048>

    The promise needs to be deleted as well.
    Removing it from `pending` here assumes that a `published` will be called. But `publish` has some failure scenarios where `published` won't be called. E.g. when `resourceProvider->http.send(event)` fails. The promise needs to be removed in these cases as well.



src/resource_provider/manager_process.hpp
Lines 141 (patched)
<https://reviews.apache.org/r/63554/#comment268041>

    Let's use a `hashmap<UUID, Owned<Promise<Nothing>>>` instead.


- Jan Schlicht


On Nov. 4, 2017, 2:35 a.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63554/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2017, 2:35 a.m.)
> 
> 
> Review request for mesos, Jie Yu, Joseph Wu, and Jan Schlicht.
> 
> 
> Bugs: MESOS-7550
>     https://issues.apache.org/jira/browse/MESOS-7550
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The publish function takes a `SlaveID` and a `Resources` structure that
> includes all resources allocated by all tasks currently running or ready
> to run on the agent. Also added validation tests.
> 
> 
> Diffs
> -----
> 
>   src/resource_provider/manager.hpp 3b70e75c6b6721864ae0ee9c4a593b5035d8388f 
>   src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e 
>   src/resource_provider/manager_process.hpp PRE-CREATION 
>   src/tests/resource_provider/mock_manager.hpp PRE-CREATION 
>   src/tests/resource_provider/mock_manager.cpp PRE-CREATION 
>   src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 
>   src/tests/resource_provider_validation_tests.cpp bf789a05771b7c25f2fc2a8a5b35d38519e4793b 
> 
> 
> Diff: https://reviews.apache.org/r/63554/diff/1/
> 
> 
> Testing
> -------
> 
> make
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Re: Review Request 63554: Added a publish function in resource provider manager.

Posted by Chun-Hung Hsiao <ch...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63554/
-----------------------------------------------------------

(Updated Dec. 4, 2017, 10:27 a.m.)


Review request for mesos, Jie Yu, Joseph Wu, and Jan Schlicht.


Changes
-------

Addressed Jan's comments and handled disconnections.


Bugs: MESOS-7550
    https://issues.apache.org/jira/browse/MESOS-7550


Repository: mesos


Description (updated)
-------

The `ResourceProviderManager::publish()` takes a parameter that contains
all resources required by all executors on the agent and ensure the
resources are ready to use.


Diffs (updated)
-----

  src/resource_provider/manager.hpp e7a9a6cc6b15372d8f3f11e17fa2297792b00ff9 
  src/resource_provider/manager.cpp c37553d22375400a52928e26de7db5b599fd0873 
  src/tests/resource_provider_manager_tests.cpp feede620f86e0ff5c5a4a4488eadea924aaa6dc2 


Diff: https://reviews.apache.org/r/63554/diff/3/

Changes: https://reviews.apache.org/r/63554/diff/2-3/


Testing (updated)
-------

sudo make check


Thanks,

Chun-Hung Hsiao


Re: Review Request 63554: Added a publish function in resource provider manager.

Posted by Chun-Hung Hsiao <ch...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63554/
-----------------------------------------------------------

(Updated Nov. 15, 2017, 2:46 a.m.)


Review request for mesos, Jie Yu, Joseph Wu, and Jan Schlicht.


Changes
-------

Rebased.


Bugs: MESOS-7550
    https://issues.apache.org/jira/browse/MESOS-7550


Repository: mesos


Description (updated)
-------

The publish function takes a SlaveID and a Resources structure that
includes all resources allocated by all tasks currently running or ready
to run on the agent. Also added validation tests.


Diffs (updated)
-----

  src/resource_provider/manager.hpp e7a9a6cc6b15372d8f3f11e17fa2297792b00ff9 
  src/resource_provider/manager.cpp 6dfc42900a1e4249f37cec585f7fe50f5aa94e43 
  src/resource_provider/manager_process.hpp PRE-CREATION 
  src/tests/resource_provider/mock_manager.hpp PRE-CREATION 
  src/tests/resource_provider/mock_manager.cpp PRE-CREATION 
  src/tests/resource_provider_manager_tests.cpp ecfe2b4c0952838d6312df603f8eb2f458725175 
  src/tests/resource_provider_validation_tests.cpp bf789a05771b7c25f2fc2a8a5b35d38519e4793b 


Diff: https://reviews.apache.org/r/63554/diff/2/

Changes: https://reviews.apache.org/r/63554/diff/1-2/


Testing
-------

make


Thanks,

Chun-Hung Hsiao