Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resources are not requested as a role #284

Closed
philwinder opened this issue Sep 8, 2015 · 2 comments
Closed

Resources are not requested as a role #284

philwinder opened this issue Sep 8, 2015 · 2 comments
Labels
Milestone

Comments

@philwinder
Copy link
Contributor

Resources should be requested as a role, else they are requested as *.

The role should be set for each resource requested. E.g. should be setRole in here:
https://github.com/mesos/elasticsearch/blob/master/scheduler/src/main/java/org/apache/mesos/elasticsearch/scheduler/Resources.java#L21

See Kafka for an example:
mesos/kafka@64b5a1d#diff-80847d72b150ee9db41881483cd67fc4R475

@philwinder philwinder added the bug label Sep 8, 2015
@frankscholten frankscholten modified the milestone: 0.4.1 Sep 9, 2015
@jhftrifork
Copy link

Update: tests for this currently fail because registration is denied to any scheduler registering with a role other than *:

I0909 09:33:15.562909    30 sched.cpp:264] No credentials provided. Attempting to register without authentication
I0909 09:33:15.564353    30 sched.cpp:815] Got error 'Role 'someframeworkrole' is invalid'

This is because mini-mesos does not have ACLs enabled.

The ACL/role feature in Mesos is enabled by passing a JSON configuration in a --acls command-line parameter when starting a Mesos master.

These flags are configured in the mesos-local Docker project.

The JSON configuration can either be a plain string or a file reference, but either way, the ACL is configured at the time the Mesos master is launched. So in the mini-mesos API, the ACL config needs to be passed to the new MesosCluster in the MesosClusterConfig argument.

mini-mesos can then pass the ACL as a JSON-formatted environment variable to Docker. These environment variables are then available in run.sh and are passed to the supervisord call, so the environment variables will also be available in supervisor.conf here, so we can substitute it as the --acls command-line argument there.

@philwinder
Copy link
Contributor Author

Fixed in:#281
And: #296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants