Osman Sarood
Osman Sarood

Reputation: 121

Can mesos handle central resource?

I am using mesos in a distribtued testing system. While I can specify slave/host resources very easily (on a per slave basis), is there a way I can specify a central resource (saucelab connections) in mesos? I am trying to ensure that at any given time, I don't have more than X amount of that central resource used.

Upvotes: 2

Views: 86

Answers (2)

Amar Gajbhiye
Amar Gajbhiye

Reputation: 484

As mentioned by Adam, there is no such way in Mesos by which you can achieve this requirement directly. However, you can achieve this by writing you own module on top of ZooKeeper.

  1. Keep your central resources metadata on zookeeper.

  2. Your framework scheduler can access this metadata to know available central resources and can take a decision depending on availability of resources.

  3. Your framework executor can also read this information to get an idea of existing count of central resources.

Upvotes: 0

Adam
Adam

Reputation: 4322

Short answer: Not yet.

We've discussed the idea of cluster-wide resources before, for NAS/SAN I/O, software licenses, or even a pool of IPs, but we don't have a JIRA for it yet. Like any resource, there are a few aspects to consider:

  1. Registering the resource(s). I could imagine some ResourceProvider other than a Mesos-slave that registers with the master and provides resources that are accessible from some/all slaves and can be consumed by some/any task.
  2. Allocation: Once the resources are available to Mesos, it should be easy to modify the allocator to allocate, offer, and track the usage of these cluster-wide resources.
  3. Resource isolation: Once a task launches, we need each slave to be able to enforce the resource limits allocated to a task, or to enforce that a task was not allocated any of that resource. This can be done with custom isolator modules, perhaps packaged (and distributed?) by the resource provider.

Upvotes: 3

Related Questions