fixed_ips.address = ARRAY cast errors

Bug #862658 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Chris Behrens

Bug Description

As of e7d1792 I'm now getting SmokeStack failures when using Postgres:

2011-09-29 18:06:19,926 ERROR nova.api.ec2.metadata [-] Failed to get metadata for ip: 192.168.0.2
(nova.api.ec2.metadata): TRACE: Traceback (most recent call last):
(nova.api.ec2.metadata): TRACE: File "/usr/lib/python2.6/dist-packages/nova/api/ec2/metadatarequesthandler.py", line 79, in __call__
(nova.api.ec2.metadata): TRACE: meta_data = self.cc.get_metadata(remote_address)
(nova.api.ec2.metadata): TRACE: File "/usr/lib/python2.6/dist-packages/nova/api/ec2/cloud.py", line 380, in get_metadata
(nova.api.ec2.metadata): TRACE: return_all=False)
(nova.api.ec2.metadata): TRACE: File "/usr/lib/python2.6/dist-packages/nova/api/ec2/cloud.py", line 276, in _get_floaters_for_instance
(nova.api.ec2.metadata): TRACE: floaters = self._get_floaters_for_fixed_ip(context, ip)
(nova.api.ec2.metadata): TRACE: File "/usr/lib/python2.6/dist-packages/nova/api/ec2/cloud.py", line 244, in _get_floaters_for_fixed_ip
(nova.api.ec2.metadata): TRACE: fixed_ip)
(nova.api.ec2.metadata): TRACE: File "/usr/lib/python2.6/dist-packages/nova/network/api.py", line 53, in get_floating_ips_by_fixed_address
(nova.api.ec2.metadata): TRACE: 'args': {'fixed_address': fixed_address}})
(nova.api.ec2.metadata): TRACE: File "/usr/lib/python2.6/dist-packages/nova/rpc/__init__.py", line 45, in call
(nova.api.ec2.metadata): TRACE: return get_impl().call(context, topic, msg)
(nova.api.ec2.metadata): TRACE: File "/usr/lib/python2.6/dist-packages/nova/rpc/impl_kombu.py", line 738, in call
(nova.api.ec2.metadata): TRACE: rv = list(rv)
(nova.api.ec2.metadata): TRACE: File "/usr/lib/python2.6/dist-packages/nova/rpc/impl_kombu.py", line 703, in __iter__
(nova.api.ec2.metadata): TRACE: raise result
(nova.api.ec2.metadata): TRACE: RemoteError: ProgrammingError (ProgrammingError) operator does not exist: character varying = text[]
(nova.api.ec2.metadata): TRACE: LINE 4: WHERE fixed_ips.address = ARRAY[E'192.168.0.2'] AND fixed_ip...
(nova.api.ec2.metadata): TRACE: ^
(nova.api.ec2.metadata): TRACE: HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

---

Due to this issue I'm unable to boot instances using Postgres.

Dan Prince (dan-prince)
Changed in nova:
importance: Undecided → Critical
status: New → Confirmed
description: updated
Revision history for this message
Dan Prince (dan-prince) wrote :
Download full text (6.1 KiB)

Looks like similar errors occur w/ MySQL as well:

(nova.api.ec2.metadata): TRACE: RemoteError: ProgrammingError (ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND fixed_ips.deleted = 0 \n LIMIT 0, 1) AS anon_1 LEFT OUTER JOIN networks AS ' at line 4") 'SELECT anon_1.fixed_ips_created_at AS anon_1_fixed_ips_created_at, anon_1.fixed_ips_updated_at AS anon_1_fixed_ips_updated_at, anon_1.fixed_ips_deleted_at AS anon_1_fixed_ips_deleted_at, anon_1.fixed_ips_deleted AS anon_1_fixed_ips_deleted, anon_1.fixed_ips_id AS anon_1_fixed_ips_id, anon_1.fixed_ips_address AS anon_1_fixed_ips_address, anon_1.fixed_ips_network_id AS anon_1_fixed_ips_network_id, anon_1.fixed_ips_virtual_interface_id AS anon_1_fixed_ips_virtual_interface_id, anon_1.fixed_ips_instance_id AS anon_1_fixed_ips_instance_id, anon_1.fixed_ips_allocated AS anon_1_fixed_ips_allocated, anon_1.fixed_ips_leased AS anon_1_fixed_ips_leased, anon_1.fixed_ips_reserved AS anon_1_fixed_ips_reserved, anon_1.fixed_ips_host AS anon_1_fixed_ips_host, networks_1.created_at AS networks_1_created_at, networks_1.updated_at AS networks_1_updated_at, networks_1.deleted_at AS networks_1_deleted_at, networks_1.deleted AS networks_1_deleted, networks_1.id AS networks_1_id, networks_1.label AS networks_1_label, networks_1.injected AS networks_1_injected, networks_1.cidr AS networks_1_cidr, networks_1.cidr_v6 AS networks_1_cidr_v6, networks_1.multi_host AS networks_1_multi_host, networks_1.gateway_v6 AS networks_1_gateway_v6, networks_1.netmask_v6 AS networks_1_netmask_v6, networks_1.netmask AS networks_1_netmask, networks_1.bridge AS networks_1_bridge, networks_1.bridge_interface AS networks_1_bridge_interface, networks_1.gateway AS networks_1_gateway, networks_1.broadcast AS networks_1_broadcast, networks_1.dns1 AS networks_1_dns1, networks_1.dns2 AS networks_1_dns2, networks_1.vlan AS networks_1_vlan, networks_1.vpn_public_address AS networks_1_vpn_public_address, networks_1.vpn_public_port AS networks_1_vpn_public_port, networks_1.vpn_private_address AS networks_1_vpn_private_address, networks_1.dhcp_start AS networks_1_dhcp_start, networks_1.project_id AS networks_1_project_id, networks_1.priority AS networks_1_priority, networks_1.host AS networks_1_host, networks_1.uuid AS networks_1_uuid, instances_1.created_at AS instances_1_created_at, instances_1.updated_at AS instances_1_updated_at, instances_1.deleted_at AS instances_1_deleted_at, instances_1.deleted AS instances_1_deleted, instances_1.id AS instances_1_id, instances_1.user_id AS instances_1_user_id, instances_1.project_id AS instances_1_project_id, instances_1.image_ref AS instances_1_image_ref, instances_1.kernel_id AS instances_1_kernel_id, instances_1.ramdisk_id AS instances_1_ramdisk_id, instances_1.server_name AS instances_1_server_name, instances_1.launch_index AS instances_1_launch_index, instances_1.key_name AS instances_1_key_name, instances_1.key_data AS instances_1_key_data, instances_1.power_state AS instances_1_power_state, instances_1.vm_state AS instances_1_vm_state, instances_1.task_state AS instances_1_task_state, ...

Read more...

summary: - fixed_ips.address = ARRAY cast errors with Postgres
+ fixed_ips.address = ARRAY cast errors
Revision history for this message
Chris Behrens (cbehrens) wrote :

*sigh* going to point tr3buchet at this. Something wrong with the DB query network/manager's "get_floating_ips_by_fixed_address" does.

Revision history for this message
Chris Behrens (cbehrens) wrote :

Actually... after looking more.. maybe this is my bug... I might be passing a list of IPs instead of a single IP.

Changed in nova:
assignee: nobody → Chris Behrens (cbehrens)
status: Confirmed → In Progress
Revision history for this message
Chris Behrens (cbehrens) wrote :
Revision history for this message
Dan Prince (dan-prince) wrote :

Chris,

Just ran smoke tests on this branch via SmokeStack. I'm now getting some different errors:

http://paste.openstack.org/show/2623/

So the issues caused by e7d1792 seem to be causing some errors.

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : A change has been merged to openstack/nova

Reviewed: https://review.openstack.org/744
Committed: http://github.com/openstack/nova/commit/eff0a63758ad59d62045bf913423cdd0c440fa28
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit eff0a63758ad59d62045bf913423cdd0c440fa28
Author: Chris Behrens <email address hidden>
Date: Thu Sep 29 12:54:48 2011 -0700

    Fixes bug 862658 -- ec2 metadata issue getting IPs

    Was looping through a tuple of (ipv4s, ipv6s) vs just ipv4s list.. to get floating IPs.

    Change-Id: Ie743012b7074ecb8b9bc6f018968e21e2f6d405d

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-1 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.