← Back to team overview

openstack team mailing list archive

Re: Bug launching instance in Essex packages on Precise - for nw, info in nw_info: too many values to unpack (network/manager.py)

 

Hi Jason,
This has worked - but introduced some further bugs.

The instance spawns, but there is no float_ip information presented to
my client tools.

$ nova list

+--------------------------------------+----------+--------+----------------+
|                  ID                  |   Name   | Status |    Networks    |
+--------------------------------------+----------+--------+----------------+
| ef06e2f4-0d38-46b6-ba54-944f36aa1f40 | Server 2 | ACTIVE | vmnet=10.0.0.5 |
+--------------------------------------+----------+--------+----------------+

But looking at the database it has been assigned a floating ip that I
can connect to.

Kev


On 14 February 2012 21:14, Jason Kölker <jkoelker@xxxxxxxxxxxxx> wrote:
> On Tue, 2012-02-14 at 20:43 +0000, Kevin Jackson wrote:
>> Dear cloud folk,
>> I raised https://bugs.launchpad.net/nova/+bug/928819 last week that's
>> not getting any love so was wondering if it was user error rather than
>> a bug (as its a show stopper for my setup that I previously didn't
>> have).
>
> I think this diff might fix it:
>
> diff --git a/nova/network/manager.py b/nova/network/manager.py
> index e42e066..502baba 100644
> --- a/nova/network/manager.py
> +++ b/nova/network/manager.py
> @@ -299,10 +299,8 @@ class FloatingIP(object):
>             self.db.floating_ip_set_auto_assigned(context,
> floating_address)
>
>             # get the first fixed address belonging to the instance
> -            for nw, info in nw_info:
> -                if info.get('ips'):
> -                    fixed_address = info['ips'][0]['ip']
> -                    break
> +            fixed_ips = nw_info.fixed_ips()
> +            fixed_address = fixed_ips[0]['address']
>
>             # associate the floating ip to fixed_ip
>             self.associate_floating_ip(context,
>
> I unfortunately do not have the setup to test it. If it works for you
> let me know, and I'll merge prop it to trunk.
>
> Happy Hacking!
>
> 7-11
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp



--
Kevin Jackson
@itarchitectkev


Follow ups

References