Resending/rebasing the patch based on Aaron's comments.

------------------8<----------------------------------------------------

Hi everybody,

This patch should follow the previous patch about the attach/detach
actions. It solves a design issue regarding file-based disks.

In short, Ganeti currently stores file-based disks in a predefined
directory, under a folder with the instance's name. This poses a problem
when removing an instance with detached disks, as the instance has to
remove that folder, yet the disk data are still in it.

To fix this issue, we have written a solution that involves moving a
disk when detaching/attaching it from/to an instance. This solution is
explained in the provided design doc. Also, we add a couple of tests to
verify that our solution works properly.

Cheers,
Alex


Alex Pyrgiotis (8):
  doc: Add design doc for detached file-based disks
  constants: Add new disk template set
  config: Add SetDiskLogicalID function
  cmdlib: Create wrapper for GenerateDiskTemplate
  filestorage: Enable the Rename action
  cmdlib: Rename file disk in attach/detach
  tests.filestorage: Test if rename works properly
  tests.cmdlib: Test detach/attach for file disks

 doc/design-file-based-disks-ownership.rst      |   67 ++++++++++++++++++++++++
 doc/index.rst                                  |    1 +
 lib/cmdlib/instance_set_params.py              |   55 +++++++++++++++----
 lib/config/__init__.py                         |   22 ++++++++
 lib/storage/filestorage.py                     |   17 +++++-
 src/Ganeti/Constants.hs                        |    7 +++
 test/py/cmdlib/instance_unittest.py            |   41 +++++++++++++++
 test/py/ganeti.storage.filestorage_unittest.py |   10 ++++
 8 files changed, 208 insertions(+), 12 deletions(-)
 create mode 100644 doc/design-file-based-disks-ownership.rst

-- 
1.7.10.4

Reply via email to