Closed akirillov closed 5 years ago
@vinodkone, it would be really great if you can confirm the described behaviour of the Dispatcher with regards to role enforcement. Thanks in advance!
Thanks, @mpereira. An integration test is WIP now, will update the PR once finished
Merged this PR as all tests in all PR builds are green
What changes were proposed in this pull request?
Resolves DCOS-58390: Propagate role/quota configuration from environment variables to Dispatcher
This PR adds a new service property
enforce_role
which instructs Spark Dispatcher to reject all submissions that attempt to override it. This PR comes together with role enforcement PR for Spark https://github.com/mesosphere/spark/pull/66.The new role assignment behaviour now has the following logic:
MESOS_ALLOCATION_ROLE
is set andMARATHON_APP_ENFORCE_GROUP_ROLE=TRUE
then Spark Dispatcher will be launched withspark.mesos.role=${MESOS_ALLOCATION_ROLE}
andspark.mesos.dispatcher.role.enforce
set totrue
which will have the following semantics:MESOS_ALLOCATION_ROLE
spark-submit
doesn't providespark.mesos.role
the group role will be used for Driversspark-submit
providesspark.mesos.role
which is different from the group role, the submission will be rejectedspark-submit
providesspark.mesos.role
equal to the group role, the submission will be acceptedif the previous condition doesn't hold true (i.e. a group role is not enforced), Dispatcher will be launched with
spark.mesos.role=${SPARK_DISPATCHER_MESOS_ROLE}
which comes fromconfig.json
:SPARK_DISPATCHER_ENFORCE_ROLE
is set totrue
then Spark Dispatcher will reject all submissions that attempt to override the role it is running with itselfHow were these changes tested?
Release Notes