On Mon, Jul 29, 2013 at 10:40 AM, harryxiyou <[email protected]> wrote:
> On Mon, Jul 29, 2013 at 3:51 PM, Michele Tartara <[email protected]> > wrote: > > On Sun, Jul 28, 2013 at 5:30 PM, Weiwei Jia <[email protected]> > wrote: > >> > >> Add umount gluster storage directory when remove a node (removing > >> the master node is to destroy the cluster) in the cluster. > >> > >> Signed-off-by: Weiwei Jia <[email protected]> > >> --- > >> lib/backend.py | 27 +++++++++++++++++++++++++++ > >> lib/bootstrap.py | 10 ++++++++++ > >> lib/cmdlib/node.py | 9 +++++++++ > >> lib/rpc_defs.py | 3 +++ > >> lib/server/noded.py | 8 ++++++++ > >> 5 files changed, 57 insertions(+) > >> > >> diff --git a/lib/backend.py b/lib/backend.py > >> index 7063aa5..2010c99 100644 > >> --- a/lib/backend.py > >> +++ b/lib/backend.py > >> @@ -3255,6 +3255,33 @@ def RemoveFileStorageDir(file_storage_dir): > >> file_storage_dir, err) > >> > >> > >> +def UmountGlusterStorageDir(gluster_storage_dir): > >> + """Umount gluster storage directory. > >> + > >> + Umount it only if it's mounted. If not log an error and return. > > > > > > I'm not sure that unmounting it is actually any useful. Nothing assures > you > > that ganeti is the only thing using that directory. > > > > What if you unmount it and some other program was supposed to use it? > > > > Gluster storage directory is created when one instance is added in the node > level so when we remove the node, of course, we should umount the gluster > storage directory. > > It's created when we add one instance ONLY in case it is not mounted already. Which means that it might be, and something else can have mounted it already, and can be using it. Furthermore, something can have started using it afterwards. So, mounting is safe, unmounting not so much. I just wouldn't bother about doing it, and focus on the other much more important things that are missing, such as ActivateDisks. Cheers, Michele -- Google Germany GmbH Dienerstr. 12 80331 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores
