Re: [Openstack] [Netstack] Can't associate floating IP

2012-03-01 Thread Tomoe Sugihara
Hi Doude,

I was dealing with another issue caused by this NULL 'host', and Dan told
me that has been fixed:
https://github.com/openstack/nova/commit/43f2492175d11a3f8ea4198e65b2a6a6b38cbbb6

I haven't verified, though. Good luck.

Best,
Tomoe

On Thu, Mar 1, 2012 at 10:11 PM, Doude doudou...@gmail.com wrote:

 Hi,

 I tested it with Quantum and I confirm the field 'host' in the 'network'
 table stays empty.
 Someone filled a bug for that ?

 Doude.


 On Tue, Feb 28, 2012 at 8:06 AM, Vishvananda Ishaya vishvana...@gmail.com
  wrote:

 ...
 At least that is the case for nova-network without quantum.  I don't know
 if using Quantum leads to a different result.

 Vish

 On Feb 27, 2012, at 9:49 PM, Yapeng Wu wrote:

 Hello, Brad,

 I read your reply to Darragph's email:
 Another thing to check .. when I run devstack by default my network
 doesn't get associated with a host [host is NULL in the database].
 Make sure the host for that network is set to the hostname of the
 compute node.

 I found that when I use nova-manage network create CLI command, the
 host is NULL in the database as well.
 Is this a bug? Where would this host field get updated?

 Thanks,
 Yapeng



 On Feb 27, 2012, at 04:02 PM, Yapeng Wu yapen...@me.com wrote:

 Hello, Darragh,

 I...



 2) For the second problem: command line issue, I found that it was due to
 the code in nova/network/manager.py, line 435 to 452:

 if network['multi_host']:
 instance = self.db.instance_get(context, fixed_ip['instance_id'])
 host = instance['host']
 else:
 host = network['host']

 interface = floating_ip['interface']
 if host == self.host:
 # i'm the correct host
 self._associate_floating_ip(context, floating_address,
 fixed_address, interface)
 else:
 # send to correct host
 rpc.cast(context,
  self.db.queue_get_for(context, FLAGS.network_topic, 
 host),
  {'method': '_associate_floating_ip',
   'args': {'floating_address': floating_address,
'fixed_address': fixed_address,
'interface': interface}})


 The host should be self.host in this case, but not. So it calls
 rpc.cast. I thought host is read from the database by the 'instance_id'? I
 am not sure. If I hacked the code by calling self._associate_floating_ip
 directly, associate floating ip works.

 Maybe someone familiar with nova-network code could help us on this.

 Yapeng



 On Feb 27, 2012, at 12:18 PM, Dan Wendlandt d...@nicira.com wrote:

 Hi Darragh,

 Thanks for the detailed write-up.  Would be great if you could take this
 content and create a bug on launchpad.  We'll look into this.

 On a related note.  The check in stack.sh to avoid creating a floating IP
 pool if quantum is enabled is no longer valid, now that Quantum Manager
 does (or at least intends to :P ) support floating IPs.  But rather than
 remove it, it may be good to just change to the check to avoid creating
 floating IPs if melange is enabled, as Quantum Manager's current floating
 IP support requires using the traditional Nova IPAM, not Melange.

 Dan


 On Mon, Feb 27, 2012 at 6:38 AM, Darragh OReilly 
 darragh.orei...@yahoo.com wrote:



 When I try to associate a floating IP from the dash I get:
 Error: Error associating Floating IP: Associate floating ip failed (HTTP
 500)

 From the command line I don't get any errors or exceptions on any of
 the screens after nova add-floating-ip, but the association does not
 happen. Are these steps right?

 thanks Darragh


 u1@u1110srv:~/devstack$ cat localrc
 LOGFILE=stacklog
 MYSQL_PASSWORD=nova
 RABBIT_PASSWORD=nova
 SERVICE_TOKEN=nova
 ADMIN_PASSWORD=nova
 SWIFT_HASH=nova

 ENABLED_SERVICES=g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx,n-vol,q-svc,q-agt,swift,quantum
 Q_PLUGIN=openvswitch

 After running stack.sh have:

 u1@u1110srv:~/devstack$ nova-manage network list
 id   IPv4  IPv6   start address
 DNS1   DNS2   VlanID project
 uuid
 2012-02-27 13:38:04 DEBUG nova.utils
 [req-7b6febc7-c8cd-49e5-ac48-5707c70d8bb5 None None] backend module
 'nova.db.sqlalchemy.api' from '/opt/stack/nova/nova/db/sqlalchemy/api.pyc'
 from (pid=4776) __get_backend /opt/stack/nova/nova/utils.py:603
 110.0.0.0/24   None   10.0.0.2
 8.8.4.4None   None   None
 20cda3a7-f4a8-4b3c-b399-4dd624cb7a40


 u1@u1110srv:~/devstack$ TENANT=
 u1@u1110srv:~/devstack$ USERNAME=
 u1@u1110srv:~/devstack$ . openrc
 u1@u1110srv:~/devstack$

 u1@u1110srv:~/devstack$ nova boot --flavor 6 --image
 21b0573e-8dd6-4b42-9c01-4c8684b0b080 guest1


 u1@u1110srv:~/devstack$ nova show guest1

 +---+--+
 | 

Re: [Openstack] [Netstack] Can't associate floating IP

2012-03-01 Thread Dan Wendlandt
On Thu, Mar 1, 2012 at 12:51 PM, Yapeng Wu yapen...@me.com wrote:


 In the multi-host quantum OVS plugin case, I am not clear how and when
 this 'host' in the 'network' table should be updated.
 From the code update, I doubt this would work in multi-host case.


It is documented that Quantum does not support multi-host for Essex:
http://docs.openstack.org/incubation/openstack-network/admin/content/Limits-dle455.html

Its something we'll tackle in Folsom.

Dan




 Currently I always use manually update of mysql command as Brad showed in
 the email.

 Yapeng


 On Mar 01, 2012, at 09:18 AM, Tomoe Sugihara to...@midokura.com wrote:

 Hi Doude,

 I was dealing with another issue caused by this NULL 'host', and Dan told
 me that has been fixed:

 https://github.com/openstack/nova/commit/43f2492175d11a3f8ea4198e65b2a6a6b38cbbb6

 I haven't verified, though. Good luck.

 Best,
 Tomoe

 On Thu, Mar 1, 2012 at 10:11 PM, Doude doudou...@gmail.com wrote:

 Hi,

 I tested it with Quantum and I confirm the field 'host' in the 'network'
 table stays empty.
 Someone filled a bug for that ?

 Doude.


 On Tue, Feb 28, 2012 at 8:06 AM, Vishvananda Ishaya 
 vishvana...@gmail.com wrote:

 ...
 At least that is the case for nova-network without quantum.  I don't
 know if using Quantum leads to a different result.

 Vish

 On Feb 27, 2012, at 9:49 PM, Yapeng Wu wrote:

 Hello, Brad,

 I read your reply to Darragph's email:
 Another thing to check .. when I run devstack by default my network
 doesn't get associated with a host [host is NULL in the database].
 Make sure the host for that network is set to the hostname of the
 compute node.

 I found that when I use nova-manage network create CLI command, the
 host is NULL in the database as well.
 Is this a bug? Where would this host field get updated?

 Thanks,
 Yapeng



 On Feb 27, 2012, at 04:02 PM, Yapeng Wu yapen...@me.com wrote:

 Hello, Darragh,

 I...



 2) For the second problem: command line issue, I found that it was due
 to the code in nova/network/manager.py, line 435 to 452:

 if network['multi_host']:
 instance = self.db.instance_get(context, 
 fixed_ip['instance_id'])
 host = instance['host']
 else:
 host = network['host']

 interface = floating_ip['interface']
 if host == self.host:
 # i'm the correct host
 self._associate_floating_ip(context, floating_address,
 fixed_address, interface)
 else:
 # send to correct host
 rpc.cast(context,
  self.db.queue_get_for(context, FLAGS.network_topic, 
 host),
  {'method': '_associate_floating_ip',
   'args': {'floating_address': floating_address,
'fixed_address': fixed_address,
'interface': interface}})


 The host should be self.host in this case, but not. So it calls
 rpc.cast. I thought host is read from the database by the 'instance_id'? I
 am not sure. If I hacked the code by calling self._associate_floating_ip
 directly, associate floating ip works.

 Maybe someone familiar with nova-network code could help us on this.

 Yapeng



 On Feb 27, 2012, at 12:18 PM, Dan Wendlandt d...@nicira.com wrote:

 Hi Darragh,

 Thanks for the detailed write-up.  Would be great if you could take this
 content and create a bug on launchpad.  We'll look into this.

 On a related note.  The check in stack.sh to avoid creating a floating
 IP pool if quantum is enabled is no longer valid, now that Quantum Manager
 does (or at least intends to :P ) support floating IPs.  But rather than
 remove it, it may be good to just change to the check to avoid creating
 floating IPs if melange is enabled, as Quantum Manager's current floating
 IP support requires using the traditional Nova IPAM, not Melange.

 Dan


 On Mon, Feb 27, 2012 at 6:38 AM, Darragh OReilly 
 darragh.orei...@yahoo.com wrote:



 When I try to associate a floating IP from the dash I get:
 Error: Error associating Floating IP: Associate floating ip failed
 (HTTP 500)

 From the command line I don't get any errors or exceptions on any of
 the screens after nova add-floating-ip, but the association does not
 happen. Are these steps right?

 thanks Darragh


 u1@u1110srv:~/devstack$ cat localrc
 LOGFILE=stacklog
 MYSQL_PASSWORD=nova
 RABBIT_PASSWORD=nova
 SERVICE_TOKEN=nova
 ADMIN_PASSWORD=nova
 SWIFT_HASH=nova

 ENABLED_SERVICES=g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx,n-vol,q-svc,q-agt,swift,quantum
 Q_PLUGIN=openvswitch

 After running stack.sh have:

 u1@u1110srv:~/devstack$ nova-manage network list
 id   IPv4  IPv6   start address
 DNS1   DNS2   VlanID project
 uuid
 2012-02-27 13:38:04 DEBUG nova.utils
 [req-7b6febc7-c8cd-49e5-ac48-5707c70d8bb5 None None] backend module