You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrei Budnik <ab...@mesosphere.com> on 2019/09/09 14:53:10 UTC

Review Request 71454: Added `futureTracker` to the `SlaveOptions` in tests.

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

Review request for mesos, Gilbert Song, Joseph Wu, and Qian Zhang.


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


Repository: mesos


Description
-------

`PendingFutureTracker` is shared across both Mesos containerizer and
the agent, so we need to add an option to be able to start a slave in
tests with an instance of the `futureTrack` as a parameter.


Diffs
-----

  src/tests/cluster.hpp c04ee14beafe350568a295c8258566aa3704028a 
  src/tests/cluster.cpp 1646516f1bacc2371eb420f118b656c8c475367c 
  src/tests/mesos.hpp ecde51828cb74b34d8ee338259e3ece3944a17f1 
  src/tests/mesos.cpp e77db2231cd81a272c2b7143a48ee193e63e54ab 


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


Testing
-------


Thanks,

Andrei Budnik


Re: Review Request 71454: Added `futureTracker` to the `SlaveOptions` in tests.

Posted by Gilbert Song <so...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71454/#review217916
-----------------------------------------------------------


Ship it!




Ship It!

- Gilbert Song


On Sept. 9, 2019, 7:53 a.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71454/
> -----------------------------------------------------------
> 
> (Updated Sept. 9, 2019, 7:53 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, Joseph Wu, and Qian Zhang.
> 
> 
> Bugs: MESOS-9843
>     https://issues.apache.org/jira/browse/MESOS-9843
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `PendingFutureTracker` is shared across both Mesos containerizer and
> the agent, so we need to add an option to be able to start a slave in
> tests with an instance of the `futureTrack` as a parameter.
> 
> 
> Diffs
> -----
> 
>   src/tests/cluster.hpp c04ee14beafe350568a295c8258566aa3704028a 
>   src/tests/cluster.cpp 1646516f1bacc2371eb420f118b656c8c475367c 
>   src/tests/mesos.hpp ecde51828cb74b34d8ee338259e3ece3944a17f1 
>   src/tests/mesos.cpp e77db2231cd81a272c2b7143a48ee193e63e54ab 
> 
> 
> Diff: https://reviews.apache.org/r/71454/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 71454: Added `futureTracker` to the `SlaveOptions` in tests.

Posted by Andrei Budnik <ab...@mesosphere.com>.

> On Сен. 23, 2019, 2:28 д.п., Qian Zhang wrote:
> > src/tests/mesos.cpp
> > Lines 350 (patched)
> > <https://reviews.apache.org/r/71454/diff/2/?file=2164563#file2164563line350>
> >
> >     Do you want to implement a `StartSlave` like below for the test `ROOT_ContainerizerDebugEndpoint` you added in r/71455 to use (so that we do not have to call `withFutureTracker` there)?
> >     ```
> >     Try<Owned<cluster::Slave>> MesosTest::StartSlave(
> >         mesos::master::detector::MasterDetector* detector,
> >         mesos::PendingFutureTracker* pendingFutureTracker,
> >         const Option<slave::Flags>& flags)
> >     {
> >       return StartSlave(SlaveOptions(detector)
> >         .withFlags(flags)
> >         .withPendingFutureTracker(pendingFutureTracker));
> >     }
> >     ```

There is no need to add another overload of `StartSlave`. Moreover, it's prohibited.

`StartSlave(const SlaveOptions& options)` is the only allowed method to start a slave, since we deprecated all other overloads:
https://github.com/apache/mesos/blob/9f1d38f491e8d9c02bebb094da87467bb70a8d27/src/tests/mesos.hpp#L241-L245

Please, don't use other `StartSlave` overloads than `StartSlave(const SlaveOptions& options)`. For more details about the problem we tried to solve, see https://issues.apache.org/jira/browse/MESOS-9914.


- Andrei


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


On Сен. 9, 2019, 2:53 п.п., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71454/
> -----------------------------------------------------------
> 
> (Updated Сен. 9, 2019, 2:53 п.п.)
> 
> 
> Review request for mesos, Gilbert Song, Joseph Wu, and Qian Zhang.
> 
> 
> Bugs: MESOS-9843
>     https://issues.apache.org/jira/browse/MESOS-9843
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `PendingFutureTracker` is shared across both Mesos containerizer and
> the agent, so we need to add an option to be able to start a slave in
> tests with an instance of the `futureTrack` as a parameter.
> 
> 
> Diffs
> -----
> 
>   src/tests/cluster.hpp c04ee14beafe350568a295c8258566aa3704028a 
>   src/tests/cluster.cpp 1646516f1bacc2371eb420f118b656c8c475367c 
>   src/tests/mesos.hpp ecde51828cb74b34d8ee338259e3ece3944a17f1 
>   src/tests/mesos.cpp e77db2231cd81a272c2b7143a48ee193e63e54ab 
> 
> 
> Diff: https://reviews.apache.org/r/71454/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 71454: Added `futureTracker` to the `SlaveOptions` in tests.

Posted by Qian Zhang <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71454/#review217907
-----------------------------------------------------------


Fix it, then Ship it!





src/tests/mesos.cpp
Lines 350 (patched)
<https://reviews.apache.org/r/71454/#comment305280>

    Do you want to implement a `StartSlave` like below for the test `ROOT_ContainerizerDebugEndpoint` you added in r/71455 to use (so that we do not have to call `withFutureTracker` there)?
    ```
    Try<Owned<cluster::Slave>> MesosTest::StartSlave(
        mesos::master::detector::MasterDetector* detector,
        mesos::PendingFutureTracker* pendingFutureTracker,
        const Option<slave::Flags>& flags)
    {
      return StartSlave(SlaveOptions(detector)
        .withFlags(flags)
        .withPendingFutureTracker(pendingFutureTracker));
    }
    ```


- Qian Zhang


On Sept. 9, 2019, 10:53 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71454/
> -----------------------------------------------------------
> 
> (Updated Sept. 9, 2019, 10:53 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Joseph Wu, and Qian Zhang.
> 
> 
> Bugs: MESOS-9843
>     https://issues.apache.org/jira/browse/MESOS-9843
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `PendingFutureTracker` is shared across both Mesos containerizer and
> the agent, so we need to add an option to be able to start a slave in
> tests with an instance of the `futureTrack` as a parameter.
> 
> 
> Diffs
> -----
> 
>   src/tests/cluster.hpp c04ee14beafe350568a295c8258566aa3704028a 
>   src/tests/cluster.cpp 1646516f1bacc2371eb420f118b656c8c475367c 
>   src/tests/mesos.hpp ecde51828cb74b34d8ee338259e3ece3944a17f1 
>   src/tests/mesos.cpp e77db2231cd81a272c2b7143a48ee193e63e54ab 
> 
> 
> Diff: https://reviews.apache.org/r/71454/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>