Hi,
So the structure would look like this (eventually):
noded/
backend.py
block/
bdev.py
drbd.py
...
hypervisor/ (when we split it such that only node-specific stuff is in
there. Currently those classes also perform LU-parameter syntax)
hv_base.py
hv_*.py
(other?)
As simple as it sounds, there are obviously more problems: bdev.py is
currently also used by bootstrap.py, which in turn is used just about
everywhere. The only thing bootstrap.py does with bdev is to get the
usermode helper of DRBD and to check if it matches the required one. But as
this check is only performed on the node where bootstrap.py is run on, IMHO
it's rather pointless. Additionally, bdev.py is also used in nodemaint.py,
where even private methods of the DRBD8 class are used... So currently it
would be misleading to put it below a directory named "noded".
I also just had an interesting discussion with aehlig who has a rather
different view on how we should structure our code (he would rather not
prefer a separation based on daemons, but on functional domains like
hardware, hypervisor, etc.). Maybe it's best to meet next week in person
and discuss this further within the team.
Cheers,
Thomas
On Mon, Apr 15, 2013 at 5:16 PM, Guido Trotter <[email protected]> wrote:
> On Mon, Apr 15, 2013 at 10:48 AM, Bernardo Dal Seno <[email protected]>
> wrote:
> > On 15 April 2013 16:37, Guido Trotter <[email protected]> wrote:
> >> Note that hypervisor/ right now is also used by masterd, for certain
> >> things (only class methods).
> >> But in general separating at node level is not a bad idea, and would
> >> have avoided the mcpu mistake (see Issue 149).
> >>
> >> As for refactoring bdev we can go bdev/drbd or block/drbd (more
> >> similar to haskell).
> >> It's probably better than "just" noded/drbd as it becomes clearer
> >> especially as different ones get added.
> >> (eg. is noded/pinkbunny.py a block device or a network technology?) :)
> >
> > Why not noded/block/drbd, then?
> >
>
> Yes, that's what I meant, sorry for not being clear.
>
> Thanks,
>
> Guido
>
--
Thomas Thrainer | Software Engineer | [email protected] |
Google Germany GmbH
Dienerstr. 12
80331 München
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Katherine Stephens