> On Nov. 6, 2016, 9:25 p.m., Jiang Yan Xu wrote:
> > src/examples/persistent_volume_framework.cpp, lines 470-476
> > <https://reviews.apache.org/r/45962/diff/19/?file=1543197#file1543197line470>
> >
> >     I think it's sufficient to have the following states. (We should use a 
> > minimun number of state, we can always add more when more features are 
> > added to persistent volumes which demand more state but starting with a 
> > large number of states makes it difficult to evolve the test).
> >     
> >     ```
> >           STAGING = 0, // The shard is awaiting offers to launch more tasks.
> >           RUNNING,     // The shard is fully running (all its tasks are 
> > launched).
> >           TERMINATING, // The shard is terminating and needs to clean up 
> > its persistent volume.
> >           DONE         // The shard is terminated.
> >     ```
> >     
> >     This translates to:
> >     
> >     ```
> >           STAGING = 0, // In resourceOffers: launch tasks
> >           RUNNING,     // In resourceOffers: noop; In statusUpdate: check 
> > shard TERMINATING condition.
> >           TERMINATING, // In resourceOffers: DESTROY
> >           DONE         // Test terminal condition.
> >     ```
> 
> Anindya Sinha wrote:
>     To accomplish this state, I changed shard's state to `Option<State> 
> state` so we start the state machine if `shared.state == None()`. Also, if 
> for some reason `DESTROY` fails continuously, the test would not exit. We can 
> fail the test if it fails on n attempts of `DESTROY` by keeping track of 
> number of `DESTROY` attempts but maybe not required. Comments?
> 
> Jiang Yan Xu wrote:
>     Keeping track of the number of destroys may be too much IMO :) We don't 
> terminate when the agent fails to receive the tasks either (we don't 
> reconcile) but I think these scenarios are too rear for a simple example 
> framework.

s/rear/rare/ :)


- Jiang Yan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45962/#review154380
-----------------------------------------------------------


On Nov. 7, 2016, 9:50 p.m., Anindya Sinha wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45962/
> -----------------------------------------------------------
> 
> (Updated Nov. 7, 2016, 9:50 p.m.)
> 
> 
> Review request for mesos, Greg Mann, Jie Yu, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-4431
>     https://issues.apache.org/jira/browse/MESOS-4431
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Updated a persistent volume test framework to include shared volumes.
> 
> 
> Diffs
> -----
> 
>   src/examples/persistent_volume_framework.cpp 
> 9d45bb496c4cf378af429b5aa970bf81450e482a 
> 
> Diff: https://reviews.apache.org/r/45962/diff/
> 
> 
> Testing
> -------
> 
> New test framework for shared resources added.
> Tests successful.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>

Reply via email to