Hi Iustin
2009/6/30 Iustin Pop <[email protected]>:
> diff --git a/doc/design-2.1.rst b/doc/design-2.1.rst
> index 607687c..af68087 100644
> --- a/doc/design-2.1.rst
> +++ b/doc/design-2.1.rst
> +There will be a generic list of methods that each storage unit type
> +will provide, like:
> +
> +- list of storage units of this type
> +- check status of the storage unit
I spent thought on this. Different storage types need different
parameters just to list them, not even thinking of more complex
operations such as creation or getting them ready for use (“Open” in
bdev).
Listing:
LVM PVs: Nothing
LVM VGs: Nothing
LVM LVs: VG name
File: Directory path
DRBD: Nothing (not sure)
Should these parameters be passed in a dict? E.g. in pseudocode:
class LvmLv:
def List(self, params):
try:
vgname = params["vgname"]
except KeyError:
raise Exception("Missing 'vgname' parameter")
…
Of course the real code would use constants, but do you see another
way to do it?
> +Additionally, there will be specific methods for each method, for example:
> +
> +- enable/disable allocations on a specific PV
> +- file storage directory creation/deletion
> +- VG consistency fixing
Should these additional methods exist outside the framework or just
throw NotImplementedError for the types where they don't apply?
> +This will allow a much better modeling and unification of the various
> +RPC calls related to backend storage pool in the future. Ganeti 2.1 is
> +intended to add the basics of the framework, and not necessarilly move
> +all the curent VG/FileBased operations to it.
This is not directly related to this design proposal, but it fits in
here nonetheless: Most of the code currently resides in the ganeti.*
namespace. Some of it is used by both ganeti-noded and ganeti-masterd,
some just by ganeti-noded and some by ganeti-masterd. One has to
remember which modules are used where and I think it would make sense
to introduce an additional layer for new code, such as this storage
framework, which will only be used by ganeti-noded and could go to
ganeti.node.*. ganeti.master.* could be used for masterd specific
code. Generic things, such as utils, continue to live in ganeti.*. Of
course we wouldn't migrate everything for 2.1, but can do so gradually
over the next versions. A design doc update would have to be written.
What do you think of this?
Regards,
Michael