On Wed, May 22, 2013 at 5:28 PM, Thomas Thrainer <[email protected]>wrote:

> IAllocators should not put instances on nodes in nodegroups which are
> not connected to the network the instance should be connected to.
> Therefore, export the networks a node group is connected to to the
> IAllocator, so it can account for this restriction.
>
> Signed-off-by: Thomas Thrainer <[email protected]>
>

Please change doc/iallocator.rst and add a NEWS entry, as you're changing
an externally visible interface.

Thanks,

Guido



> ---
>  lib/masterd/iallocator.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/masterd/iallocator.py b/lib/masterd/iallocator.py
> index 7179b0e..e6c9df6 100644
> --- a/lib/masterd/iallocator.py
> +++ b/lib/masterd/iallocator.py
> @@ -465,6 +465,7 @@ class IAllocator(object):
>      ng = dict((guuid, {
>        "name": gdata.name,
>        "alloc_policy": gdata.alloc_policy,
> +      "networks": [net_uuid for net_uuid, _ in gdata.networks.items()],
>        "ipolicy": gmi.CalculateGroupIPolicy(cluster, gdata),
>        "tags": list(gdata.GetTags()),
>        })
> --
> 1.8.2.1
>
>


-- 
Guido Trotter
Ganeti Engineering
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

Steuernummer: 48/725/00206
Umsatzsteueridentifikationsnummer: DE813741370

Reply via email to