Re: GD 2 xlator option changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 15, 2018 at 12:14 PM, Nithya Balachandran
<nbalacha@xxxxxxxxxx> wrote:
> Hi,
>
> A few questions about this:
>
> 1. What (if anything) should be done for options like these which have "!" ?
>
>         /* Switch xlator options (Distribute special case) */
>         { .key        = "cluster.switch",
>           .voltype    = "cluster/distribute",
>           .option     = "!switch",
>           .type       = NO_DOC,
>           .op_version = 3,
>           .flags      = VOLOPT_FLAG_CLIENT_OPT
>         },
>

Most of the options which had '!' prefixed are supposed to be skipped
by volume set for validation. These options mostly affected something
in volgen, mainly enabling/disabling certain translators. With the new
volgen that Aravinda has comeup with, these checks can should be added
to the respective graph building functions. But you still need to add
these into the options table of an xlator. You should add this to the
distribute options table as 'switch' and a BOOL option and the same
goes with 'cluster.nufa'.

Or alternatively, as these are options enabling and disabling xlators
that replace the standard distribute xlator, we could treat them as
completely new volume types and have seperate volgen functions for
these volumes.

>
> 2. How should the changed key names handled?
>
> In glusterd:
>
>         { .key        = "cluster.switch-pattern",
>           .voltype    = "cluster/switch",
>           .option     = "pattern.switch.case",
>           .type       = NO_DOC,
>           .op_version = 3,
>           .flags      = VOLOPT_FLAG_CLIENT_OPT
>         },
>
>
> In dht src code:
>         /* switch option */
>         { .key  = {"pattern.switch.case"},
>           .type = GF_OPTION_TYPE_ANY,
>           .op_version = {3},
>           .flags = OPT_FLAG_CLIENT_OPT,
>         },
>

You should add this as an additional key in the xlator options table,
'switch-pattern'. In GD2 the users will then be able to set it as
'distribute.switch-pattern' or 'switch.switch-pattern' not
'cluster.switch-pattern'. This is something I'd like to do with GD2,
ie. have unique domains for each xlator in the <domain>.<key> option
naming format.

I have a question for you though. Can switch and nufa be normal
options to distribute that switch behaviour?
Right now, they're seperate xlators, meaning we need to either have
special case handling for these options in volgen, or treat them as
different volume types and have seperate volgen for them. Both of
require some coding to be done in GD2 by the respective maintainers.

But if they were options, there would be no nufa/switch specific code,
and instead GD2 would be able to handle them as standard options. The
distribute xlator could then use these options as switches to choose
specific behaviours.

If this doesn't seem like a good idea, let me know.

>
>
> Regards,
> Nithya
>
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://lists.gluster.org/mailman/listinfo/gluster-devel



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux