Yes, an offer can only be used in one accept call rather than multiple. When Mesos master processes your accept call, it will remove the offer from its cache: https://github.com/apache/mesos/blob/1.2.0/src/master/master.cpp#L3690, so if you use the same offer in another accept call, Mesos master will not be able to find the offer since it has already been removed, and then it will complain it is an invalid offer: https://github.com/apache/mesos/blob/1.2.0/src/master/master.cpp#L3696:L3697
Thanks, Qian Zhang On Fri, Mar 10, 2017 at 6:26 PM, Oeg Bizz <[email protected]> wrote: > Jay, > Thanks for the tip about the slack chat, I just joined. Also, I just > fixed the problem. I think it was related to me sending two separate > accept calls rather than packing both tasks and send just one. I guess > once you send an accept(operations, oferIds) you cannot send it again for > the same Offer. > > Oscar > > > On Thursday, March 9, 2017 10:38 AM, Jay Guo <[email protected]> > wrote: > > > It looks quite weird to me... could you share more details about your > scheduler implementation? A code snippet could help a lot. Also, if > you want more interactive and prompt communication, please join our > slack chat https://mesos-slackin.herokuapp.com/ > > /J > > On Thu, Mar 9, 2017 at 5:20 PM, Oeg Bizz <[email protected]> wrote: > > Qian, > > Added the offer_timeout flag and set it to 2 seconds and the result is > > the same. I do not get any offerRescinded() call or anything like that. > > > > To fix the receiving offers I used the driver.acceptOffers instead of > > driver.launchTasks() Looking around the source code I found a > TestFramework > > source code within Mesos and there is a comment about the launchTask to > be > > deprecated and the use of acceptOffers was preffered so I changed it to > > that. > > > > Thanks, > > > > Oscar > > > > > > On Wednesday, March 8, 2017 8:49 PM, Qian Zhang <[email protected]> > wrote: > > > > > > It seems the offer has already been removed from Mesos master when you > tried > > to use it to launch a subsequent task, I think you did not specify > > "--offer-timeout" flag when starting Mesos master, right? Did your > framework > > receive "RESCIND" event from Mesos master for the offer that you want to > use > > to launch task? > > > > BTW, how did you resolve the stopping receiving offers issue? > > > > > > Thanks, > > Qian Zhang > > > > On Wed, Mar 8, 2017 at 7:57 PM, Oeg Bizz <[email protected]> wrote: > > > > Sorry about the continuous rant, but I really would love to get this > solved. > > I passed the stopping receiving offers, but now the second time I send > the > > same request I get an error message stating that the offer is no longer > > valid even though I sent just one task to the only slave I have > running. Ii > > am running Mesos 1.1.0 and here are the log files from my last run > > > > Thanks in advance for all your help. BTW, is there a better way of > > submitting questions like a chat, threads, bulletin board? > > > > Oscar > > > > > > On Wednesday, March 8, 2017 6:31 AM, Oeg Bizz <[email protected]> wrote: > > > > > > Vinod, > > I think the previous set is incomplete. I have attached a more > compete > > set of files. Thanks for the help > > > > > > On Tuesday, March 7, 2017 12:34 PM, Vinod Kone <[email protected]> > wrote: > > > > > > Can you share master log? > > > > @vinodkone > > > > On Mar 7, 2017, at 2:54 AM, Oeg Bizz <[email protected]> wrote: > > > > Hi, > > I am new at mesos and started exploring its usability for a new > project I > > will be involved. I wrote an scheduler and an executor and I am able to > > send one task which is executed properly. After the first task is > finished > > I no longer get resourceOffer() invocations to my Scheduler. What am I > > missing? If I do not send a task I can the resourceOffer calls > consistently > > every 5 seconds or so. Also, does Mesos send all of the resources every > > time or just a partial list? Thanks in advance for any help, > > > > Oscar > > > > > > > > > > > > > > > > > > >

