You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Vladimir Vivien <vl...@gmail.com> on 2014/07/17 08:48:03 UTC

Understanding sched.Connected state

The connected flag in sched.cpp is vital in state transition for the
scheduler.  I would like to get a better understanding of events that gets
that value updated.

It seems that  when master event FrameworkRegisteredMessage is received,
connected = true.  However, i don't see where it's ever set to false.
Is it safe to assume
- Call to stop() should set connected = false
- Call to abort() should set connected = false
- Is there anywhere in codebase where socket-level events are used to
update connected state between driver and master ?

-- 
Vladimir Vivien

Re: Understanding sched.Connected state

Posted by Adam Bordelon <ad...@mesosphere.io>.
connected starts off as false, and is set to true when the master
acknowledges the scheduler's registration (Framework[Re]RegisteredMessage).
connected will be set to false again when the master-detecter detects a
new/different (or no) master,
https://github.com/apache/mesos/blob/master/src/sched/sched.cpp#L215 (to
L232)
It's essentially supposed to represent if the scheduler can connect to the
master, and is reset on master failover, not scheduler stop/abort/failover.


On Wed, Jul 16, 2014 at 11:48 PM, Vladimir Vivien <vladimir.vivien@gmail.com
> wrote:

> The connected flag in sched.cpp is vital in state transition for the
> scheduler.  I would like to get a better understanding of events that gets
> that value updated.
>
> It seems that  when master event FrameworkRegisteredMessage is received,
> connected = true.  However, i don't see where it's ever set to false.
> Is it safe to assume
> - Call to stop() should set connected = false
> - Call to abort() should set connected = false
> - Is there anywhere in codebase where socket-level events are used to
> update connected state between driver and master ?
>
> --
> Vladimir Vivien
>