0

I am facing the problem to add/change attributes of the slave machines in the DCOS environment.

After changing attributes in

vi /var/lib/dcos/mesos-slave-common

MESOS_ATTRIBUTES=TYPE:DB;DB_TYPE:MONGO;

file, it not immediately getting updated in the cluster.

I have to run the following commands

systemctl stop dcos-mesos-slave

rm -f /var/lib/mesos/slave/meta/­slaves/latest

systemctl start dcos-mesos-slave

This means essentially I have to restart the service in the slave.

And the slave is down for at least 1 hour,

Is there any other way achieve this?

Community
  • 1
  • 1
vimal prakash
  • 1,503
  • 1
  • 22
  • 38
  • As of 1.8.7, this is still the only way to do it, but I find it odd the slave is down for at least an hour. It should be more like a few minutes. Also, you don't have to stop the mesos-slave before removing the file. You can remove it and then restart the slave. – Matthew Schuchard Feb 26 '17 at 14:18
  • @MattSchuchard, thank you , I will try your notes. – vimal prakash Feb 27 '17 at 09:21

1 Answers1

0

As variant we are using some hack, we create /var/lib/dcos/mesos-slave-common file and "froze" it by changing access right, like:

echo "MESOS_ATTRIBUTES=TYPE:DB;DB_TYPE:MONGO;" | sudo tee /var/lib/dcos/mesos-slave-common
sudo chmod -w /var/lib/dcos/mesos-slave-common
# And after that you can execute node installation. Ugly, but that is working :) 
sudo dcos_install.sh slave 
vasyaod
  • 64
  • 3