Hi!

some thoughts:

On Fri, Nov 15, 2013 at 8:02 PM, Spyros Trigazis <[email protected]> wrote:

> Hello team,
>
> I'm working on how to pass parameters to the iallocator. Currently the
> default iallocator doesn't accept any parameters from the user. To add
> this functionality a new field named "default_iallocator_parameters" (or
> something shorter) is going to be added to config.data under cluster.
> Since --mond and --ignore-dynu are both opt-in options the field will be
> empty by default and the user could modify it calling gnt-cluster
> modify.
>
> Two questions (with obvious answers):
> * The new field in the rpc defs should be a string?
>

Can  you give some examples for those parameters?
I would imagine them being a string when called on the commandline, similar
to the disk specifications, something like

--default-iallocator-parameters=key1=value2,key2=value2...
(make the separators consistent, I am not sure they are right in this
example)

Once the parameters reach RPC level, I would expect them to be in a
dictionary already (similar to hvparams then)

Btw. shouldn't it be only "default_allocator_parameters" (without the "i"?)
since other (hypothetical) allocator implementations could use them, too?


> * gnt-cluster info must return the new field, too?
>

I would suggest that, yes.


>
> And two more:
> * What kind of tests should I right?
>

Check that setting and changing and resetting (if reasonable) of the
parameter is done correctly (compare to vgname for example). Add tests to
iallocator_unittest.py that check if the parameters are read and processed
correctly. There might be even more chances to test this, those are just
the ones that come in to my mind directly.


> * Should the user pass parameters to iallocator when invoking
> gnt-instanse add, or he should only modify config.data to do that?
>

I think that would make sense, but maybe give first some examples what the
parameters are that you have in mind? We could also do that later and first
go with the one in the cluster config.

Cheers,
Helga

-- 
-- 
Helga Velroyen | 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, Christine Elizabeth Flores

Reply via email to