You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Chengwei Yang <ch...@gmail.com> on 2014/05/11 09:02:01 UTC

How can I ask mesos cluster to reload configuration?

Hi List,

Generally I have a question: does mesos cluster can reload configuration
on the fly? Without side-effect to on-top frameworks, jobs?

I have read the upgrad guide,
http://mesos.apache.org/documentation/latest/upgrades/

and slave recovery guide,
http://mesos.apache.org/documentation/latest/slave-recovery/

However, I didn't see any statement says about does the upgrade hurt
on-top frameworks, jobs.

My situation is: I have a mesos 0.16 cluster up and running, some
frameworks and jobs running, and I want to add another framework, and
like to add a dedicate role for it, so change should made to mesos
master, and resolve some resources for it, so change should made to
mesos slaves.

Could I do this seamlessly? Thanks in advance!

--
Thanks,
Chengwei

Re: How can I ask mesos cluster to reload configuration?

Posted by Chengwei Yang <ch...@gmail.com>.
On Tue, May 13, 2014 at 02:31:13PM -0700, Vinod Kone wrote:
> Hey Chengwei,
> 
> Mesos doesn't allow online update of its configuration. The only exception, so
> far, has been the VLOG  level.

I hope there will be some *signal* like SIGHUP for single process to be
used to ask mesos cluster to reload its configuration.

Does this make sense?

> 
> To update resources, you should roll the slave with new flags.

Does that means:

1. stop slave
2. rm /tmp/mesos/meta/slaves/latest
3. start slave

Does this hurt something?

--
Thanks,
Chengwei

> 
> 
> On Sun, May 11, 2014 at 12:02 AM, Chengwei Yang <ch...@gmail.com>
> wrote:
> 
>     Hi List,
> 
>     Generally I have a question: does mesos cluster can reload configuration
>     on the fly? Without side-effect to on-top frameworks, jobs?
> 
>     I have read the upgrad guide,
>     http://mesos.apache.org/documentation/latest/upgrades/
> 
>     and slave recovery guide,
>     http://mesos.apache.org/documentation/latest/slave-recovery/
> 
>     However, I didn't see any statement says about does the upgrade hurt
>     on-top frameworks, jobs.
> 
>     My situation is: I have a mesos 0.16 cluster up and running, some
>     frameworks and jobs running, and I want to add another framework, and
>     like to add a dedicate role for it, so change should made to mesos
>     master, and resolve some resources for it, so change should made to
>     mesos slaves.
> 
>     Could I do this seamlessly? Thanks in advance!
> 
>     --
>     Thanks,
>     Chengwei
> 
> 

Re: How can I ask mesos cluster to reload configuration?

Posted by Chengwei Yang <ch...@gmail.com>.
On Tue, May 13, 2014 at 05:06:48PM -0700, Adam Bordelon wrote:
> Chengwei,
> 
> You can restart the leading master (with new roles/config), and running
> frameworks/slaves will re-register with it. Tasks will keep running. You
> probably want to restart the non-leading masters first with the new config, so
> that it will be picked up on HA failover.
> You can also restart the slave processes with the new resource-roles config and
> running tasks will continue running, as long as you have slave checkpointing
> enabled.

Thanks Adam, generally I did the same thing to update configuration of
my cluster, it seems works fine.

However, I have one thing needs a confirm.

After resources configuration changed for a slave, it has to remove
/tmp/mesos/meta/slaves/latest and then start the slave.

Due to it can not checkpoint from different resources configuration.

I'm not sure if this has any side-effect, can you confirm?

--
Thanks,
Chengwei

> You also need to restart the framework-scheduler so that it can reregister with
> the new role (in its FrameworkInfo), and get new offers appropriate for that
> role. Tasks will keep running.
> 
> You need to restart the master (with new roles config) before restarting the
> framework (with new role in its FrameworkInfo), or else the framework will fail
> to reregister ("Role 'foo' is not valid."). I would recommend restarting the
> master first, then the slave(s), then the framework. Currently running tasks
> will continue running, regardless of role configuration. The new role(s) will
> only apply to new resource offers.
> 
> Hope that helps,
> -Adam-
> 
> 
> On Tue, May 13, 2014 at 2:31 PM, Vinod Kone <vi...@gmail.com> wrote:
> 
>     Hey Chengwei,
> 
>     Mesos doesn't allow online update of its configuration. The only exception,
>     so far, has been the VLOG  level.
> 
>     To update resources, you should roll the slave with new flags.
> 
> 
>     On Sun, May 11, 2014 at 12:02 AM, Chengwei Yang <chengwei.yang.cn@gmail.com
>     > wrote:
> 
>         Hi List,
> 
>         Generally I have a question: does mesos cluster can reload
>         configuration
>         on the fly? Without side-effect to on-top frameworks, jobs?
> 
>         I have read the upgrad guide,
>         http://mesos.apache.org/documentation/latest/upgrades/
> 
>         and slave recovery guide,
>         http://mesos.apache.org/documentation/latest/slave-recovery/
> 
>         However, I didn't see any statement says about does the upgrade hurt
>         on-top frameworks, jobs.
> 
>         My situation is: I have a mesos 0.16 cluster up and running, some
>         frameworks and jobs running, and I want to add another framework, and
>         like to add a dedicate role for it, so change should made to mesos
>         master, and resolve some resources for it, so change should made to
>         mesos slaves.
> 
>         Could I do this seamlessly? Thanks in advance!
> 
>         --
>         Thanks,
>         Chengwei
> 
> 
> 
> 

Re: How can I ask mesos cluster to reload configuration?

Posted by Adam Bordelon <ad...@mesosphere.io>.
Chengwei,

You can restart the leading master (with new roles/config), and running
frameworks/slaves will re-register with it. Tasks will keep running. You
probably want to restart the non-leading masters first with the new config,
so that it will be picked up on HA failover.
You can also restart the slave processes with the new resource-roles config
and running tasks will continue running, as long as you have slave
checkpointing enabled.
You also need to restart the framework-scheduler so that it can reregister
with the new role (in its FrameworkInfo), and get new offers appropriate
for that role. Tasks will keep running.

You need to restart the master (with new roles config) before restarting
the framework (with new role in its FrameworkInfo), or else the framework
will fail to reregister ("Role 'foo' is not valid."). I would recommend
restarting the master first, then the slave(s), then the framework.
Currently running tasks will continue running, regardless of role
configuration. The new role(s) will only apply to new resource offers.

Hope that helps,
-Adam-


On Tue, May 13, 2014 at 2:31 PM, Vinod Kone <vi...@gmail.com> wrote:

> Hey Chengwei,
>
> Mesos doesn't allow online update of its configuration. The only
> exception, so far, has been the VLOG  level.
>
> To update resources, you should roll the slave with new flags.
>
>
> On Sun, May 11, 2014 at 12:02 AM, Chengwei Yang <
> chengwei.yang.cn@gmail.com> wrote:
>
>> Hi List,
>>
>> Generally I have a question: does mesos cluster can reload configuration
>> on the fly? Without side-effect to on-top frameworks, jobs?
>>
>> I have read the upgrad guide,
>> http://mesos.apache.org/documentation/latest/upgrades/
>>
>> and slave recovery guide,
>> http://mesos.apache.org/documentation/latest/slave-recovery/
>>
>> However, I didn't see any statement says about does the upgrade hurt
>> on-top frameworks, jobs.
>>
>> My situation is: I have a mesos 0.16 cluster up and running, some
>> frameworks and jobs running, and I want to add another framework, and
>> like to add a dedicate role for it, so change should made to mesos
>> master, and resolve some resources for it, so change should made to
>> mesos slaves.
>>
>> Could I do this seamlessly? Thanks in advance!
>>
>> --
>> Thanks,
>> Chengwei
>>
>
>

Re: How can I ask mesos cluster to reload configuration?

Posted by Vinod Kone <vi...@gmail.com>.
Hey Chengwei,

Mesos doesn't allow online update of its configuration. The only exception,
so far, has been the VLOG  level.

To update resources, you should roll the slave with new flags.


On Sun, May 11, 2014 at 12:02 AM, Chengwei Yang
<ch...@gmail.com>wrote:

> Hi List,
>
> Generally I have a question: does mesos cluster can reload configuration
> on the fly? Without side-effect to on-top frameworks, jobs?
>
> I have read the upgrad guide,
> http://mesos.apache.org/documentation/latest/upgrades/
>
> and slave recovery guide,
> http://mesos.apache.org/documentation/latest/slave-recovery/
>
> However, I didn't see any statement says about does the upgrade hurt
> on-top frameworks, jobs.
>
> My situation is: I have a mesos 0.16 cluster up and running, some
> frameworks and jobs running, and I want to add another framework, and
> like to add a dedicate role for it, so change should made to mesos
> master, and resolve some resources for it, so change should made to
> mesos slaves.
>
> Could I do this seamlessly? Thanks in advance!
>
> --
> Thanks,
> Chengwei
>