Search code examples
mesosmesospheredcos

How to change mesos master reregister timeout in DC/OS


I'm creating a multi-master multi-slave DC/OS cluster, My problem is that default reregister timeout for mesos is 10min, I would like to change this default to some bigger value, but I couldn't find how to do it in DC/OS install configuration.

Does anyone know how can we change configuration of underlying mesos masters and/or slaves in DC/OS installation?

UPDATE:

Thanks for the answers, I created this ansible script for post-installation. After you installed your DC/OS cluster, run this script on all master nodes:

- name: Post install for dc/os masters
  hosts: masters
  tasks:
  - name: set mesos environment variables 1
    lineinfile:
      dest: /run/dcos/etc/mesos-master
      regexp: "{{ item.regexp }}"
      line: "{{ item.line }}"
      insertafter: "^SyslogIdentifier"
    with_items:
      - { regexp: '^Environment="MESOS_AGENT_REREGISTER_TIMEOUT=', line: 'Environment="MESOS_AGENT_REREGISTER_TIMEOUT=24hrs"' }

  - systemd:
      name: "dcos-mesos-master.service"
      state: restarted
      daemon_reload: yes

Solution

  • I suppose you are talking about this Mesos Flag --agent_reregister_timeout=VALUE. For details see the Mesos Documentation.

    The distribution unfortunately is not elegant at the moment (as it is not an official DCOS parameter) Do this for all master node:

    1. ssh into master nodes
    2. Put desired config in /run/dcos/etc/mesos-master MESOS_AGENT_REREGISTER_TIMEOUT=<value>
    3. Restart master service systemctl restart dcos-mesos-master

    Confirm that the masters is running successfully via journalctl -fu dcos-mesos-master