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

Chronos should set a non-default filter when declining offers #509

Closed
gkleiman opened this issue Aug 6, 2015 · 0 comments
Closed

Chronos should set a non-default filter when declining offers #509

gkleiman opened this issue Aug 6, 2015 · 0 comments

Comments

@gkleiman
Copy link
Member

gkleiman commented Aug 6, 2015

Use case: As a cluster operator I would like to run many frameworks (possibly multiple Chronos instances) on the same Mesos cluster. I'd like to mitigate offer starvation; that is, schedulers with work to do should receive offers from the Mesos master.

From the SchedulerDriver documentation, Chronos can use both the overloaded definition of declineOffer to set filters:

  /**
   * Declines an offer in its entirety and applies the specified
   * filters on the resources (see mesos.proto for a description of
   * Filters). Note that this can be done at any time, it is not
   * necessary to do this within the {@link Scheduler#resourceOffers}
   * callback.
   *
   * @param offerId The ID of the offer to be declined.
   * @param filters The filters to set for any remaining resources.
   *
   * @return        The state of the driver after the call.
   *
   * @see OfferID
   * @see Filters
   * @see Status
   */
  Status declineOffer(OfferID offerId, Filters filters);

and clear them later on.

  /**
   * Removes all filters, previously set by the framework (via {@link
   * #launchTasks}). This enables the framework to receive offers
   * from those filtered slaves.
   *
   * @return    The state of the driver after the call.
   *
   * @see Status
   */
  Status reviveOffers();

Proposal: _When the task queue becomes empty, decline subsequent offers with a long timeout (say, max double value). When the task queue becomes non-empty, invoke reviveOffers.

NOTE: This issue is analogous to mesosphere/marathon#1931

gkleiman added a commit that referenced this issue Aug 6, 2015
…ct offers

`--revive_offers_for_new_jobs` if true, revive offers is called when a new job
is added to the `TaskManager`.

Also note, that Mesos only filters offers that are a strict sub set of a
rejected offer.

`--decline_offer_duration` allows configuring the duration for which unused
offers are declined.

`--min_revive_offers_interval` if `--revive_offers_for_new_jobs` is specified,
do not call reviveOffers more often than this interval. It defaults to 5
seconds.
gkleiman added a commit that referenced this issue Aug 7, 2015
…ct offers

`--revive_offers_for_new_jobs` if true, revive offers is called when a new job
is added to the `TaskManager`.

Also note, that Mesos only filters offers that are a strict sub set of a
rejected offer.

`--decline_offer_duration` allows configuring the duration for which unused
offers are declined.

`--min_revive_offers_interval` if `--revive_offers_for_new_jobs` is specified,
do not call reviveOffers more often than this interval. It defaults to 5
seconds.
gkleiman added a commit that referenced this issue Aug 7, 2015
…ct offers

`--revive_offers_for_new_jobs` if true, revive offers is called when a new job
is added to the `TaskManager`.

Also note, that Mesos only filters offers that are a strict sub set of a
rejected offer.

`--decline_offer_duration` allows configuring the duration for which unused
offers are declined.

`--min_revive_offers_interval` if `--revive_offers_for_new_jobs` is specified,
do not call reviveOffers more often than this interval. It defaults to 5
seconds.
gkleiman added a commit that referenced this issue Aug 7, 2015
…ct offers

`--revive_offers_for_new_jobs` if true, revive offers is called when a new job
is added to the `TaskManager`.

Also note, that Mesos only filters offers that are a strict sub set of a
rejected offer.

`--decline_offer_duration` allows configuring the duration for which unused
offers are declined.

`--min_revive_offers_interval` if `--revive_offers_for_new_jobs` is specified,
do not call reviveOffers more often than this interval. It defaults to 5
seconds.
gkleiman added a commit that referenced this issue Aug 7, 2015
…ct offers

`--revive_offers_for_new_jobs` if true, revive offers is called when a new job
is added to the `TaskManager`.

Also note, that Mesos only filters offers that are a strict sub set of a
rejected offer.

`--decline_offer_duration` allows configuring the duration for which unused
offers are declined.

`--min_revive_offers_interval` if `--revive_offers_for_new_jobs` is specified,
do not call reviveOffers more often than this interval. It defaults to 5
seconds.
gkleiman added a commit that referenced this issue Aug 11, 2015
Fixes #509 - Flag for reviveOffers and the duration for which to reject offers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant