What a wonderfully concise explanation :) Thanks so much - I'll give it a
whirl!

Cheers,

Jim

On Wed, 26 Sep 2018 at 19:16, Joseph Wu <jos...@mesosphere.io> wrote:

> I believe what you are running into is a slight change in how we represent
> Resources.  Older frameworks expect unreserved resources to look like this:
>
> > {
> >   role: "*",
> >   reservation: <not set>,
> >   reservations: <unused>
> > }
>
>
> In 1.4.0, we started representing unreserved resources like:
>
> > {
> >   role: <unused>,
> >   reservation: <unused>,
> >   reservations: []
> > }
>
>
> And our Resources.hpp utility files were updated to expect this new
> format.  By compiling your framework against a newer libmesos, you were
> using a utility expecting the new resource format, but receiving the older
> format from the Master.  You'll need to add this line to your FrameworkInfo
> to receive the newer format:
>
>
> framework.add_capabilities()->set_type(FrameworkInfo::Capability::RESERVATION_REFINEMENT);
>
>
> Here's the JIRA that tracked this change:
> https://issues.apache.org/jira/browse/MESOS-7575
>
> On Wed, Sep 26, 2018 at 7:56 AM James Vanns <jvanns....@gmail.com> wrote:
>
> > Hi! It's been a looonng time since I've asked a question on this list
> > (several years) so excuse me if this is now the wrong forum! Anyway,
> > basically, I've got an old Mesos framework I'm resurrecting and it was
> > developed against 0.26.x, I think. For the sheer Hell of it I just
> upgraded
> > Mesos to 1.5.0 and by pure miracle (or rather, excellent API/ABI work on
> > your part!) I only had to change about 1 or 2 lines of my C++ code to
> get a
> > build :) However, when I run it and push a task to it, it now bails with
> > this stack trace;
> >
> > F0926 14:35:34.225720   122 resources.cpp:1134] Check failed:
> > !resource.has_role() cpus:8
> > *** Check failure stack trace: ***
> >     @     0x7fae14997a7d  google::LogMessage::Fail()
> >     @     0x7fae14999830  google::LogMessage::SendToLog()
> >     @     0x7fae14997663  google::LogMessage::Flush()
> >     @     0x7fae1499a259  google::LogMessageFatal::~LogMessageFatal()
> >     @     0x7fae1393d8a3  mesos::Resources::isEmpty()
> >     @     0x7fae1393d97c  mesos::Resources::add()
> >     @     0x7fae1393fce0  mesos::Resources::operator+=()
> >     @     0x7fae1393fd8d  mesos::Resources::operator+=()
> >     @     0x7fae1394001b  mesos::Resources::Resources()
> >
> > Which I happen to find is the same path as this random link for
> > mesos-executor;
> >
> >
> >
> https://files.sameroom.io/q9gILEXTOUokGlBYScOrZMVvAFz1g72fK9Ys1oxk0Ho/mesos-execute_.txt
> >
> > So given that none of my code ever had any explicit roles set and all
> > slaves (sorry, agents - it's been that long ;) and the master have only
> > ever assumed the default role ('*'), what do I need to add/remove in my
> > code to get it to work as it did before!? If it helps it appears that the
> > code that generates this dump is;
> >
> > offer->resources();
> >
> > I hope this is enough info! If not, please ask and I'll paste more
> context
> > etc.
> >
> > Cheers,
> >
> > Jim
> >
> > --
> > Senior Production Engineer,
> > Industrial Light & Magic
> >
>


-- 
--
Senior Code Pig
Industrial Light & Magic

Reply via email to