sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #04968
Re: [Merge] ~ack/maas:vmhost-select-non-doscivered-ip into maas:master
Review: Needs Information
Diff comments:
> diff --git a/src/metadataserver/api_twisted.py b/src/metadataserver/api_twisted.py
> index 950b53d..e52aa4d 100644
> --- a/src/metadataserver/api_twisted.py
> +++ b/src/metadataserver/api_twisted.py
> @@ -287,6 +287,7 @@ def _get_ip_address_for_vmhost(node):
>
> ip = (
> StaticIPAddress.objects.exclude(ip__isnull=True)
> + .exclude(alloc_type=IPADDRESS_TYPE.DISCOVERED)
This will fail, in case the interface is configured to use dhcp.
Why not replace this logic with node.ip_addresses()? We should try to have one way of getting a machine's IP addresses.
> .filter(interface__in=interface_ids)
> .values_list("ip", flat=True)
> .first()
--
https://code.launchpad.net/~ack/maas/+git/maas/+merge/436764
Your team MAAS Committers is subscribed to branch maas:master.
References