Hi, @neilc Thank you for pop up this. As we discussed in slack, @Joerg is
going to remove this check and add it back after the deprecation cycle.

On Wed, Jul 6, 2016 at 4:24 PM, Neil Conway <[email protected]> wrote:

> On Wed, Jul 6, 2016 at 12:06 AM,  <[email protected]> wrote:
> > diff --git a/src/master/http.cpp b/src/master/http.cpp
> > index 6b4f85b..debedd4 100644
> > --- a/src/master/http.cpp
> > +++ b/src/master/http.cpp
> > @@ -2498,11 +2498,8 @@ Future<Response> Master::Http::state(
> >              });
> >
> >          // Model all of the orphan tasks.
> > -        // TODO(vinod): Need to filter these tasks based on
> authorization! This
> > -        // is currently not possible because we don't have
> `FrameworkInfo` for
> > -        // these tasks. We need to either store `FrameworkInfo` for
> orphan
> > -        // tasks or persist FrameworkInfo of all frameworks in the
> registry.
> > -        writer->field("orphan_tasks", [this](JSON::ArrayWriter* writer)
> {
> > +        writer->field("orphan_tasks", [this, &tasksApprover](
> > +            JSON::ArrayWriter* writer) {
> >            // Find those orphan tasks.
> >            foreachvalue (const Slave* slave, master->slaves.registered) {
> >              typedef hashmap<TaskID, Task*> TaskMap;
> > @@ -2511,6 +2508,16 @@ Future<Response> Master::Http::state(
> >                  CHECK_NOTNULL(task);
> >                  if (!master->frameworks.registered.contains(
> >                      task->framework_id())) {
> > +                  CHECK(master->frameworks.recovered.contains(
> > +                      task->framework_id()));
>
> This CHECK seems dubious: what if the orphaned task was running on an
> old version of the agent? i.e., a mixed cluster in which the master
> has been updated but the agent has not been.
>
> Neil
>



-- 
Best Regards,
Haosdent Huang

Reply via email to