Hi, All:

I just start working on Mesos source code for a research project. I become
confused about the starting procedure, thus need some help.
I'm talking about the working procedure of using, "mesos-execute" to
execute a docker image.

1. How is resource offered to the framework (docker) from master?
In Master::offer(), I find a "ResourceOffersMessage" is sent.
I search the source code, find that only "mesos-1.2.0/src/sched/*sched.cpp*"
has a function to receive this message, and this function finally invokes a
scheduler-driver to finish the task.
But, I believe this is not the procedure in which resource is offered to
the docker-image, as I don't see any logic of "mesos-1.2.0/src/cli/
*execute.cpp*" using "*sched.cpp*";    and according to the documentation,
 "Mesos provides a simple executor that can execute shell commands and
Docker containers on behalf of the framework scheduler".

   In "*execute.cpp*", I see a "offers()" function, which finally executes
some executors. But I don't see where this function is call from the
master?
   How does this simple executor executes shell commands and Docker
containers on behalf of the framework scheduler?
   How is the "*sched.cpp*" used in the source code?


2. After "execute.cpp" subscribes to the master, "framework" information is
created in the master.
   But how is this "framework" info distributed to the slaves?  I become
confused about this procedure.

Could anyone kindly give some suggestions?
Thanks very much

Wenzhao

Reply via email to