mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chun-Hung Hsiao <chhs...@apache.org>
Subject Re: Review Request 70215: Implemented volume attachment and publishment for v0 `VolumeManager`.
Date Wed, 20 Mar 2019 23:01:26 GMT


> On March 19, 2019, 5:06 p.m., Benjamin Bannier wrote:
> > src/csi/v0_volume_manager.cpp
> > Line 120 (original), 142-144 (patched)
> > <https://reviews.apache.org/r/70215/diff/2/?file=2132473#file2132473line142>
> >
> >     Shouldn't we evaluate this when we actually send the operation in `_attachVolume`?
I am worrying about the potential of interleaved, multistep transitions.
> >     
> >     Here and in all other handlers.

All of the methods prepended with an underscore are meant to be compositional building blocks,
and the public-facing functions (the ones without underscores) are responsible to run the
building block functions in a volume's sequence. So as long as the sequence exists, the volume
itself should exist as well.


> On March 19, 2019, 5:06 p.m., Benjamin Bannier wrote:
> > src/csi/v0_volume_manager.cpp
> > Lines 302-306 (patched)
> > <https://reviews.apache.org/r/70215/diff/2/?file=2132473#file2132473line302>
> >
> >     This doesn't look like an internal invariant, so could we maybe return a `Failure`
here? That way we can in the future simplify this manager so that it can e.g., bring a volume
from any state to a target state or fail if impossible (we already do have special handling
for some cases).
> >     
> >     Here and elsewhere.

It's not an internal invariant, indeed. But violating these conditions means that we got a
serious bug in the caller's logic, so I'm debating if we should just return an error or make
it a hard failure. But on the other hand, say calling `attachVolume` when the volume is `PUBLISHED`
won't do any hurt, so yeah let me make it a soft error.


> On March 19, 2019, 5:06 p.m., Benjamin Bannier wrote:
> > src/csi/v0_volume_manager.cpp
> > Lines 311 (patched)
> > <https://reviews.apache.org/r/70215/diff/2/?file=2132473#file2132473line311>
> >
> >     Should we also log something similar to l.328 here?
> >     
> >     Here and elsewhere where functions perform similar early returns.

I do the logging later just right before we're going to interact with an external component,
which I believe is more helpful for debugging (so we're sure that we indeed make the CSI call).

That said, let me also do logging in the public-facing functions where interaction happens.
This should give us enough but not too excessive logging for debugging.


- Chun-Hung


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


On March 15, 2019, 11:38 p.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70215/
> -----------------------------------------------------------
> 
> (Updated March 15, 2019, 11:38 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Jie Yu, and Jan Schlicht.
> 
> 
> Bugs: MESOS-9622
>     https://issues.apache.org/jira/browse/MESOS-9622
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The attachment and publishment are implemented with internal helpers,
> each individually deals with one steady and two transient states and
> makes a proper CSI call to achieve its goal state. If the given volume
> is not in the designed state, it would recursively call other helpers
> to transition the volume to the designed state first.
> 
> These helper functions are sequentialized through the volume's own
> sequence in the public-facing functions to avoid racing operations on
> the same volume.
> 
> 
> Diffs
> -----
> 
>   src/csi/v0_volume_manager.cpp PRE-CREATION 
>   src/csi/v0_volume_manager_process.hpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70215/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message