← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1381379] Re: Using postgresql and creating a security group rule with protocol value as integer getting DBAPIError exception

 

** Changed in: neutron/juno
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1381379

Title:
  Using postgresql  and creating a security group rule with protocol
  value as integer getting  DBAPIError exception

Status in OpenStack Neutron (virtual network service):
  Fix Committed
Status in neutron juno series:
  Fix Released

Bug description:
  Using postgressql  and creating a scurity group rule protocol value as
  integer getting error DBAPIError exception wrapped from operator does
  not exist.

  Running the jenkins :check-tempest-dsvm-ironic-pxe_ssh-postgres-nv
  fails

  Code :
  curl -i -X POST http://$Server_ip:9696/v2.0/security-group-rules.json -H "User-Agent: python-neutronclient" -H "X-Auth-Token: $TOKENID" -d '{"security_group_rule": {"ethertype": "IPv4", "direction": "ingress", "protocol": "17", "security_group_id": "$Security_goup_id"}}'

  
  Error in the log:
  2014-10-15 06:24:22.756 23647 DEBUG neutron.policy [req-4e3855ad-ef66-4a63-b69d-7351d4a1a4b3 None] Enforcing rules: ['create_security_group_rule'] _build_match_rule /opt/stack/new/neutron/neutron/policy.py:221
  2014-10-15 06:24:22.774 23647 ERROR oslo.db.sqlalchemy.exc_filters [req-4e3855ad-ef66-4a63-b69d-7351d4a1a4b3 ] DBAPIError exception wrapped from (ProgrammingError) operator does not exist: character varying = integer
  LINE 3: ...on IN ('ingress') AND securitygrouprules.protocol IN (17) AN...
                                                               ^
  HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
   'SELECT securitygrouprules.tenant_id AS securitygrouprules_tenant_id, securitygrouprules.id AS securitygrouprules_id, securitygrouprules.security_group_id AS securitygrouprules_security_group_id, securitygrouprules.remote_group_id AS securitygrouprules_remote_group_id, securitygrouprules.direction AS securitygrouprules_direction, securitygrouprules.ethertype AS securitygrouprules_ethertype, securitygrouprules.protocol AS securitygrouprules_protocol, securitygrouprules.port_range_min AS securitygrouprules_port_range_min, securitygrouprules.port_range_max AS securitygrouprules_port_range_max, securitygrouprules.remote_ip_prefix AS securitygrouprules_remote_ip_prefix \nFROM securitygrouprules \nWHERE securitygrouprules.tenant_id = %(tenant_id_1)s AND securitygrouprules.tenant_id IN (%(tenant_id_2)s) AND securitygrouprules.direction IN (%(direction_1)s) AND securitygrouprules.protocol IN (%(protocol_1)s) AND securitygrouprules.ethertype IN (%(ethertype_1)s) AND securitygrouprules.security_group_id IN (%(security_group_id_1)s)' {'direction_1': u'ingress', 'tenant_id_2': u'a0ec4b20678a472ebbab28526cb53fef', 'ethertype_1': 'IPv4', 'protocol_1': 17, 'tenant_id_1': u'a0ec4b20678a472ebbab28526cb53fef', 'security_group_id_1': u'e9936f7a-00dd-4afe-9871-f1ab21fe7ea4'}
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters Traceback (most recent call last):
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters   File "/usr/local/lib/python2.7/dist-packages/oslo/db/sqlalchemy/compat/handle_error.py", line 59, in _handle_dbapi_exception
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters     e, statement, parameters, cursor, context)
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1024, in _handle_dbapi_exception
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters     exc_info
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters   File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 196, in raise_from_cause
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters     reraise(type(exception), exception, tb=exc_tb)
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 867, in _execute_context
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters     context)
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 324, in do_execute
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters     cursor.execute(statement, parameters)
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters ProgrammingError: (ProgrammingError) operator does not exist: character varying = integer
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters LINE 3: ...on IN ('ingress') AND securitygrouprules.protocol IN (17) AN...
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters                                                              ^
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters  'SELECT securitygrouprules.tenant_id AS securitygrouprules_tenant_id, securitygrouprules.id AS securitygrouprules_id, securitygrouprules.security_group_id AS securitygrouprules_security_group_id, securitygrouprules.remote_group_id AS securitygrouprules_remote_group_id, securitygrouprules.direction AS securitygrouprules_direction, securitygrouprules.ethertype AS securitygrouprules_ethertype, securitygrouprules.protocol AS securitygrouprules_protocol, securitygrouprules.port_range_min AS securitygrouprules_port_range_min, securitygrouprules.port_range_max AS securitygrouprules_port_range_max, securitygrouprules.remote_ip_prefix AS securitygrouprules_remote_ip_prefix \nFROM securitygrouprules \nWHERE securitygrouprules.tenant_id = %(tenant_id_1)s AND securitygrouprules.tenant_id IN (%(tenant_id_2)s) AND securitygrouprules.direction IN (%(direction_1)s) AND securitygrouprules.protocol IN (%(protocol_1)s) AND securitygrouprules.ethertype IN (%(ethertype_1)s) AND securitygrouprules.security_group_id IN (%(security_group_id_1)s)' {'direction_1': u'ingress', 'tenant_id_2': u'a0ec4b20678a472ebbab28526cb53fef', 'ethertype_1': 'IPv4', 'protocol_1': 17, 'tenant_id_1': u'a0ec4b20678a472ebbab28526cb53fef', 'security_group_id_1': u'e9936f7a-00dd-4afe-9871-f1ab21fe7ea4'}
  2014-10-15 06:24:22.774 23647 TRACE oslo.db.sqlalchemy.exc_filters 
  2014-10-15 06:24:22.776 23647 ERROR neutron.api.v2.resource [req-4e3855ad-ef66-4a63-b69d-7351d4a1a4b3 None] create failed

  Logs link:

  http://logs.openstack.org/54/107654/4/check/check-tempest-dsvm-ironic-
  pxe_ssh-postgres-
  nv/18b3c09/logs/screen-q-svc.txt.gz#_2014-10-15_06_24_22_774

  http://logs.openstack.org/54/107654/4/check/check-tempest-dsvm-ironic-
  pxe_ssh-postgres-nv/18b3c09/logs/

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1381379/+subscriptions


References