----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66051/#review200086 -----------------------------------------------------------
src/master/master.cpp Lines 11881-11887 (original), 11885-11890 (patched) <https://reviews.apache.org/r/66051/#comment280731> Currently, it looks like `Slave::usedResources` is the same as the "allocated resources" from that agent. When a GROW or SHRINK operation is initiated by an operator, its consumed resource is in a unique state in the master while that operation is pending: the volume is not allocated, but it is "used" in some sense. One place where we use `Slave::usedResources` is when validating DESTROY operations: https://github.com/apache/mesos/blob/21e4b45b388d0b272236b1c58313569f8a1d1fc8/src/master/master.cpp#L4841 This means if the master receives a DESTROY call for a persistent volume while there is a pending operator-initiated GROW_VOLUME call for that same volume (i.e. the operation was forwarded to the agent for processing but the master hasn't heard back yet), we would accept the DESTROY operation and forward it to the agent. Is this what we want? This brings something else to mind: would it be possible for the allocator to send out an offer containing the consumed resource of a GROW_VOLUME or SHRINK_VOLUME operation, while the operation is pending on the agent? This seems bad, but I believe it's possible. I think this may be the first time we have a set of resources which we don't want the allocator to offer for a period of time, but which are not currently allocated to some framework/role. I wonder if we need some new tools in the allocator to handle this? - Greg Mann On March 27, 2018, 6:37 a.m., Zhitao Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66051/ > ----------------------------------------------------------- > > (Updated March 27, 2018, 6:37 a.m.) > > > Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann. > > > Bugs: MESOS-4965 > https://issues.apache.org/jira/browse/MESOS-4965 > > > Repository: mesos > > > Description > ------- > > Implemented operator API to grow and shrink persistent volume. > > > Diffs > ----- > > src/master/http.cpp 34c9023906eca94965acc994f20e888c1f47b962 > src/master/master.hpp 0d9620dd0c232dc1df83477e838eeb7313bf8828 > src/master/master.cpp 20692c36c021fdae91de0b156f26fc56cf7c4f45 > src/master/validation.cpp 9254cd22e67d9aca53135701575fb0857ff6f7d6 > > > Diff: https://reviews.apache.org/r/66051/diff/7/ > > > Testing > ------- > > > Thanks, > > Zhitao Li > >
