chronos icon indicating copy to clipboard operation
chronos copied to clipboard

Support for constraints in chronos

Open mattomatic opened this issue 11 years ago • 32 comments

Is it possible to add support to chronos for constraints, such as those that marathon already supports (https://mesosphere.github.io/marathon/docs/constraints.html)?

For example, it would be very useful to be able to schedule jobs to be run in a particular data center.

Also, is there an existing workaround for this?

mattomatic avatar Sep 12 '14 14:09 mattomatic

It's feasible, but not currently on any sort of roadmap. PRs welcome.

brndnmtthws avatar Sep 15 '14 23:09 brndnmtthws

Adding constraints would be an important feature for Chronos. Patches from the community would be excellent if we aren't able to add this in our immediate roadmap.

elingg avatar Feb 04 '15 22:02 elingg

Having marathon-like constrains feature would be super cool - https://mesosphere.github.io/marathon/docs/constraints.html

jwerak avatar Feb 07 '15 17:02 jwerak

+1

kutchar avatar Feb 10 '15 18:02 kutchar

+1 ... having the ability to specify parts of your cluster to run jobs on would great...

mjbroekman avatar Feb 10 '15 18:02 mjbroekman

+1

synergyhue avatar Feb 18 '15 01:02 synergyhue

+1

ghost avatar Feb 19 '15 19:02 ghost

+1

siddharth178 avatar Feb 26 '15 10:02 siddharth178

+1

freshmatrix avatar Mar 27 '15 06:03 freshmatrix

Hey gents, instead of a pointless +1, just click the Subscribe button on the top right. More and more +1s are not very useful and just spam the developers unnecessarily.

SEJeff avatar Mar 27 '15 14:03 SEJeff

@SEJeff, the +1s can be helpful for prioritisation. Ideally we'd have a less spammy system or the ability to vote built into GH issues, of course.

ssk2 avatar Mar 27 '15 18:03 ssk2

That is what subscribe is for :)

I comaintain a few largish open source projects (> 500 unique contributors each), salt and graphite. It works pretty well.

SEJeff avatar Mar 27 '15 23:03 SEJeff

@brndnmtthws How hard would this be to accomplish, do you have any idea. It is most certainly an important feature.

gyllen avatar Apr 09 '15 21:04 gyllen

This works pretty well now for us in latest version. Thanks. Curious why this issue is still open now?

kapil-malik avatar Jun 19 '15 01:06 kapil-malik

Isn't it still restricted to just the EQUALS constraint at this point? I think the intent is to bring it to parity with Marathon wrt constraints.

potto007 avatar Jun 19 '15 03:06 potto007

Oh yes, agreed.EQUALS was serving our purpose, didn't realize the full story. Thanks.

kapil-malik avatar Jun 19 '15 03:06 kapil-malik

Is there a way to set constraints using the gui?

goodwillcoding avatar Aug 02 '15 06:08 goodwillcoding

@goodwillcoding - not yet but we're working on revamping the GUI!

ssk2 avatar Aug 02 '15 16:08 ssk2

is there any support for running a job on every slave in a cluster?

tony-kerz avatar Sep 04 '15 11:09 tony-kerz

Not yet. On Sep 4, 2015 1:27 PM, "tony kerz" [email protected] wrote:

is there any support for running a job on every slave in a cluster?

— Reply to this email directly or view it on GitHub https://github.com/mesos/chronos/issues/256#issuecomment-137711020.

brndnmtthws avatar Sep 05 '15 08:09 brndnmtthws

is something like below supposed to work?:

  "constraints": [
    ["hostname", "EQUALS", "ip-10-0-0-95.ec2.internal"]
  ],

tony-kerz avatar Sep 15 '15 16:09 tony-kerz

Yes. EQUALS is one of the supported constraints per the docs: https://mesos.github.io/chronos/docs/api.html#constraints

solarkennedy avatar Sep 16 '15 02:09 solarkennedy

thx @solarkennedy, i saw that, but it wasn't clear to me if hostname was an attribute that was auto-magically made available to chronos for use with EQUAL/LIKE constraints or if those would only work on attributes that i manually punched into a slave via something like --attributes (which i found somewhere in the mesos doc), or MESOS_ATTRIBUTES (which i see in the cloud-formation file provided by mesosphere).

looks like marathon is pretty good about setting up hostname for use with constraints, but i saw no such info in the chronos doc.

tony-kerz avatar Sep 16 '15 02:09 tony-kerz

That is true, the docs do assume that the attribute used by the constraint is declared. As far as I know hostname is not a magic attribute that you get for free.

Can you make a PR to clarify that and cross-link to the mesos docs on how to add attributes? If not I could do it.

solarkennedy avatar Sep 16 '15 17:09 solarkennedy

@solarkennedy i can take a whack at clarifying the docs.

more importantly tho, i think it would be great if hostname was made available by default for constraints as it is in marathon. do you think this would be a valuable feature? if so, do you think it is (or should be) implied by this particular issue, or do you think it should be spiked out as a sep enhancement request?

tony-kerz avatar Sep 17 '15 02:09 tony-kerz

I'm not sure. I was not aware that that was a "free" constraint that you could use from marathon, even if you didn't set that as a mesos attribute. (I assumed the constraint language only operated on mesos attributes)

solarkennedy avatar Sep 17 '15 02:09 solarkennedy

check the last sentence of the first paragraph at this link: https://mesosphere.github.io/marathon/docs/constraints.html

The field can be the slave hostname or any Mesos slave attribute.

i've constrained to hostname successfully in marathon as well without doing anything special.

tony-kerz avatar Sep 17 '15 03:09 tony-kerz

Ah! Today I learned. @tony-kerz for this specific feature I recommend making a separate issue/pr.

If you ask me this main issue should be closed, as there is some constraint functionality. Any new feature requests or doc updates and be new things.

solarkennedy avatar Sep 17 '15 14:09 solarkennedy

Please support the hostname constraint in the future because I guess many people are using Marathon along with Chronos on top of Mesos. And Marathon already supported hostname constraint

anhcuong avatar Mar 03 '16 02:03 anhcuong

fyi @anhcuong i have had #563 open for a while to provide that feature.

tony-kerz avatar Mar 03 '16 13:03 tony-kerz