Re: How to use a complete host

2016-05-03 Thread Staffan Larsen
Instead of custom attributes to indicate the total resources available, you 
could use the /state endpoint on the agent to find out how much resources it 
has. Somewhat of a hack, but should work.

Thanks,
/Staffan

> On 2 maj 2016, at 23:43, Sharma Podila  wrote:
> 
> 
> This can't be achieved with the offer model as it stands today, unless you 
> have only a single framework in the cluster. There is no visibility into what 
> other resources are available on the agent which weren't offered to your 
> framework. 
> 
> However, for the short term, you can use a hack to put in custom attributes 
> that indicate the total amount of resources available on the agent. So, when 
> you get the offer, you can verify if you got the offer for the entire agent's 
> resources. 
> 
> Mesos-4138 is interesting, as Jeff pointed out.
> 
> 
> 
> 
> 
> On Mon, May 2, 2016 at 11:07 AM, haosdent  > wrote:
> It sounds like you could reserve resources by a role in that machine. And 
> then your framework launched by that role.
> 
> On Tue, May 3, 2016 at 1:57 AM, Christoph Heer  > wrote:
> Hi everyone,
> 
> sometimes in my Mesos use-case it's required to ensure that my own framework 
> is able to schedule a task which consume all resources of a machine.
> 
> Do you have some advises how to implement such a scheduler. Is there another 
> scheduler which already implemented something similar?
> 
> Thank you and best regards
> Christoph
> 
> 
> 
> -- 
> Best Regards,
> Haosdent Huang
> 



Re: How to use a complete host

2016-05-02 Thread Sharma Podila
This can't be achieved with the offer model as it stands today, unless you
have only a single framework in the cluster. There is no visibility into
what other resources are available on the agent which weren't offered to
your framework.

However, for the short term, you can use a hack to put in custom attributes
that indicate the total amount of resources available on the agent. So,
when you get the offer, you can verify if you got the offer for the entire
agent's resources.

Mesos-4138 is interesting, as Jeff pointed out.





On Mon, May 2, 2016 at 11:07 AM, haosdent  wrote:

> It sounds like you could reserve resources by a role in that machine. And
> then your framework launched by that role.
>
> On Tue, May 3, 2016 at 1:57 AM, Christoph Heer 
> wrote:
>
>> Hi everyone,
>>
>> sometimes in my Mesos use-case it's required to ensure that my own
>> framework is able to schedule a task which consume all resources of a
>> machine.
>>
>> Do you have some advises how to implement such a scheduler. Is there
>> another scheduler which already implemented something similar?
>>
>> Thank you and best regards
>> Christoph
>>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>


Re: How to use a complete host

2016-05-02 Thread Jeff Schroeder
In addition to actually using roles, you might also consider subscribing to
MESOS-4138, which will implement this idea in a generic way (but won't help
you today).

On Monday, May 2, 2016, Christoph Heer  wrote:

> Hi everyone,
>
> sometimes in my Mesos use-case it's required to ensure that my own
> framework is able to schedule a task which consume all resources of a
> machine.
>
> Do you have some advises how to implement such a scheduler. Is there
> another scheduler which already implemented something similar?
>
> Thank you and best regards
> Christoph
>


-- 
Text by Jeff, typos by iPhone


Re: How to use a complete host

2016-05-02 Thread haosdent
It sounds like you could reserve resources by a role in that machine. And
then your framework launched by that role.

On Tue, May 3, 2016 at 1:57 AM, Christoph Heer 
wrote:

> Hi everyone,
>
> sometimes in my Mesos use-case it's required to ensure that my own
> framework is able to schedule a task which consume all resources of a
> machine.
>
> Do you have some advises how to implement such a scheduler. Is there
> another scheduler which already implemented something similar?
>
> Thank you and best regards
> Christoph
>



-- 
Best Regards,
Haosdent Huang


How to use a complete host

2016-05-02 Thread Christoph Heer
Hi everyone,

sometimes in my Mesos use-case it's required to ensure that my own framework is 
able to schedule a task which consume all resources of a machine. 

Do you have some advises how to implement such a scheduler. Is there another 
scheduler which already implemented something similar?

Thank you and best regards
Christoph