I would like to reserve some slaves to run only one framework (for example Chronos).
So on the Slave I edit file /var/lib/dcos/mesos-resources and I put this information:
MESOS_DEFAULT_ROLE='testrole'
next I restarted Slaves:
sudo systemctl stop dcos-mesos-slave
sudo rm -f /var/lib/mesos/slave/meta/slaves/latest
sudo systemctl start dcos-mesos-slave
Slave logs after restart:
" --oversubscribed_resources_interval="15secs" --perf_duration="10secs" --perf_interval="1mins" --port="5051" --qos_correction_interval_min="0ns" --quiet="false" --recover="reconnect" --recovery_timeout="15mins" --registration_backoff_factor="1secs" --resources="[{"name":"ports","type":"RANGES","ranges": {"range": [{"begin": 1025, "end": 2180},{"begin": 2182, "end": 3887},{"begin": 3889, "end": 5049},{"begin": 5052, "end": 8079},{"begin": 8082, "end": 8180},{"begin": 8182, "end": 32000}]}}]" --revocable_cpu_low_priority="true" --sandbox_directory="/mnt/mesos/sandbox" --slave_subsystems="cpu,memory" --strict="true" --switch_user="true" --systemd_enable_support="true" --systemd_runtime_directory="/run/systemd/system" --version="false" --work_dir="/var/lib/mesos/slave"
I0206 09:33:03.642778 42136 slave.cpp:214] Moving slave process into its own cgroup for subsystem: cpu
I0206 09:33:03.659202 42136 slave.cpp:214] Moving slave process into its own cgroup for subsystem: memory
I0206 09:33:03.683498 42136 slave.cpp:464] Slave resources: ports(testrole):[1025-2180, 2182-3887, 3889-5049, 5052-8079, 8082-8180, 8182-32000]; cpus(testrole):2; mem(testrole):5943; disk(testrole):45148
After this operation indeed any task and any framework don't run on this Slave.
Then I try restart Chronos with
"acceptedResourceRoles": [
"testrole"
]
and Chronos dosen't start, has error: Waiting for resources.
I also tried add --mesos_role="testrole"
, I tried both, mesos_role and acceptedResourceRoles, but effect still was the same.
We use Azure with DC/OS, Mesos (0.28.1)