You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Vaibhav Khanduja <va...@gmail.com> on 2016/05/02 15:46:19 UTC

Offers to a framework

For a use-case, we need to know offers been sent to a registered framework.
For e.g. if we are using marathon as a framework, the master would send
offers to it based on DRF as soon as a slave is available. The marathon
would then accept the offer if it requires to start a job. Is there is way
to know externally using an api - either master or marathon or framework to
know what offers are been sent and what are been accepted?

Thx

Re: Offers to a framework

Posted by haosdent <ha...@gmail.com>.
If you could modify the framework code, you could inject this login in
`resourceOffers`.

On Mon, May 2, 2016 at 9:46 PM, Vaibhav Khanduja <va...@gmail.com>
wrote:

> For a use-case, we need to know offers been sent to a registered
> framework. For e.g. if we are using marathon as a framework, the master
> would send offers to it based on DRF as soon as a slave is available. The
> marathon would then accept the offer if it requires to start a job. Is
> there is way to know externally using an api - either master or marathon or
> framework to know what offers are been sent and what are been accepted?
>
> Thx
>



-- 
Best Regards,
Haosdent Huang

Re: Offers to a framework

Posted by haosdent <ha...@gmail.com>.
If you could modify the framework code, you could inject this login in
`resourceOffers`.

On Mon, May 2, 2016 at 9:46 PM, Vaibhav Khanduja <va...@gmail.com>
wrote:

> For a use-case, we need to know offers been sent to a registered
> framework. For e.g. if we are using marathon as a framework, the master
> would send offers to it based on DRF as soon as a slave is available. The
> marathon would then accept the offer if it requires to start a job. Is
> there is way to know externally using an api - either master or marathon or
> framework to know what offers are been sent and what are been accepted?
>
> Thx
>



-- 
Best Regards,
Haosdent Huang

Re: Offers to a framework

Posted by Joseph Wu <jo...@mesosphere.io>.
Both the Mesos master and Marathon have metrics that tell you how many
offers have been sent, but not the contents of said offers.  Marathon does
not keep offers long enough for them to show up as "outstanding offers" in
the Mesos UI.

As far as I know, one way to get the offer contents is by setting logging
verbosity to GLOG_v=2 (*Warning*: This prints a lot of stuff).  When the
master is started or toggled to this logging level, the allocator will
print each offer before it sends it:
https://github.com/apache/mesos/blob/2c6eeefe13c5706da70328af6cea14f802121bf2/src/master/allocator/mesos/hierarchical.cpp#L1462-L1463

For how to temporarily toggle the logging verbosity:
http://mesos.apache.org/documentation/latest/logging/

On Mon, May 2, 2016 at 6:46 AM, Vaibhav Khanduja <va...@gmail.com>
wrote:

> For a use-case, we need to know offers been sent to a registered
> framework. For e.g. if we are using marathon as a framework, the master
> would send offers to it based on DRF as soon as a slave is available. The
> marathon would then accept the offer if it requires to start a job. Is
> there is way to know externally using an api - either master or marathon or
> framework to know what offers are been sent and what are been accepted?
>
> Thx
>

Re: Offers to a framework

Posted by Joseph Wu <jo...@mesosphere.io>.
Both the Mesos master and Marathon have metrics that tell you how many
offers have been sent, but not the contents of said offers.  Marathon does
not keep offers long enough for them to show up as "outstanding offers" in
the Mesos UI.

As far as I know, one way to get the offer contents is by setting logging
verbosity to GLOG_v=2 (*Warning*: This prints a lot of stuff).  When the
master is started or toggled to this logging level, the allocator will
print each offer before it sends it:
https://github.com/apache/mesos/blob/2c6eeefe13c5706da70328af6cea14f802121bf2/src/master/allocator/mesos/hierarchical.cpp#L1462-L1463

For how to temporarily toggle the logging verbosity:
http://mesos.apache.org/documentation/latest/logging/

On Mon, May 2, 2016 at 6:46 AM, Vaibhav Khanduja <va...@gmail.com>
wrote:

> For a use-case, we need to know offers been sent to a registered
> framework. For e.g. if we are using marathon as a framework, the master
> would send offers to it based on DRF as soon as a slave is available. The
> marathon would then accept the offer if it requires to start a job. Is
> there is way to know externally using an api - either master or marathon or
> framework to know what offers are been sent and what are been accepted?
>
> Thx
>