mesosphere / spark-build

Used to build the mesosphere/spark docker image and the DC/OS Spark package
52 stars 34 forks source link

[DCOS-58390] Quota enforcement support for Spark Dispatcher #540

Closed akirillov closed 5 years ago

akirillov commented 5 years ago

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:

if 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 from config.json:

How were these changes tested?

Release Notes

akirillov commented 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!

akirillov commented 5 years ago

Thanks, @mpereira. An integration test is WIP now, will update the PR once finished

akirillov commented 5 years ago

Merged this PR as all tests in all PR builds are green