← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1330490] Re: can't create security group rule by ip protocol when using postgresql

 

** Also affects: neutron/icehouse
   Importance: Undecided
       Status: New

** Changed in: neutron/icehouse
       Status: New => Fix Committed

** Changed in: neutron/icehouse
    Milestone: None => 2014.1.3

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

Title:
  can't create security group rule by ip protocol when using postgresql

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

Bug description:
  when i try to create a rule in sec group using ip protocol number it
  fails if the db in use is postgresql

  i can repeat the problem in havana, icehouse and master

  2014-06-16 08:41:07.009 15134 ERROR neutron.api.v2.resource [req-3d2d03a3-2d8a-4ad0-b41d-098aecd5ecb8 None] create failed
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource Traceback (most recent call last):
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 87, in resource
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     result = method(request=request, **args)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 419, in create
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     obj = obj_creator(request.context, **kwargs)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/db/securitygroups_rpc_base.py", line 43, in create_security_group_rule
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     bulk_rule)[0]
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/db/securitygroups_db.py", line 266, in create_security_group_rule_bulk_native
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     self._check_for_duplicate_rules(context, r)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/db/securitygroups_db.py", line 394, in _check_for_duplicate_rules
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     db_rules = self.get_security_group_rules(context, filters)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/db/securitygroups_db.py", line 421, in get_security_group_rules
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     page_reverse=page_reverse)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/db/db_base_plugin_v2.py", line 197, in _get_collection
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     items = [dict_func(c, fields) for c in query]
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2353, in __iter__
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     return self._execute_and_instances(context)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2368, in _execute_and_instances
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     result = conn.execute(querycontext.statement, self._params)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 662, in execute
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     params)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 761, in _execute_clauseelement
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     compiled_sql, distilled_params
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 874, in _execute_context
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     context)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1024, in _handle_dbapi_exception
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     exc_info
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 196, in raise_from_cause
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     reraise(type(exception), exception, tb=exc_tb)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 867, in _execute_context
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     context)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 324, in do_execute
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource     cursor.execute(statement, parameters)
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource ProgrammingError: (ProgrammingError) operator does not exist: character varying = integer
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource LINE 3: ...on IN ('ingress') AND securitygrouprules.protocol IN (112) A...
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource                                                              ^
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource  '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.direction IN (%(direction_1)s) AND securitygrouprules.protocol IN (%(protocol_1)s) AND securitygrouprules.tenant_id IN (%(tenant_id_1)s) AND securitygrouprules.security_group_id IN (%(security_group_id_1)s) AND securitygrouprules.remote_ip_prefix IN (%(remote_ip_prefix_1)s) AND securitygrouprules.ethertype IN (%(ethertype_1)s)' {'direction_1': u'ingress', 'tenant_id_1': u'd42aacf8661045beb3a9ee7585bb0c8a', 'protocol_1': 112, 'ethertype_1': 'IPv4', 'security_group_id_1': u'05e7d48c-c163-4dc9-8b46-d100f136e786', 'remote_ip_prefix_1': u'0.0.0.0/0'}
  2014-06-16 08:41:07.009 15134 TRACE neutron.api.v2.resource

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


References