Neutron policy-create fails due to error in contrail-api

Bug #1778518 reported by Sergey Matov
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Fix Committed
Medium
Sergey Matov
R4.1
Fix Committed
Medium
Sergey Matov
R5.0
Fix Committed
Medium
Sergey Matov
Trunk
Fix Committed
Medium
Sergey Matov

Bug Description

On Openstack environment with OpenContrail 4.0 failed to run command

#neutron policy-create

Neutron-server logs

2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource [req-196ebd4d-bfb2-412c-b673-68ce0fdfaae4 39f268495edc48c0b8039cc96aa7a985 75e567413ae24977ac7577562df1ea3b - default default] create failed: No details.: NeutronException: An unknown exception occurred.
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource Traceback (most recent call last):
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 98, in resource
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource result = method(request=request, **args)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 425, in create
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource return self._create(request, body, **kwargs)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 91, in wrapped
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource self.force_reraise()
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 87, in wrapped
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 147, in wrapper
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource self.force_reraise()
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 135, in wrapper
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 126, in wrapped
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource LOG.debug("Retry wrapper got retriable exception: %s", e)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource self.force_reraise()
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 122, in wrapped
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 539, in _create
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource obj = do_create(body)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 521, in do_create
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource request.context, reservation.reservation_id)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource self.force_reraise()
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 514, in do_create
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource return obj_creator(request.context, **kwargs)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/contrail_plugin_policy.py", line 43, in create_policy
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource policy_dicts = self._core._create_resource('policy', context,
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/contrail_plugin.py", line 309, in _create_resource
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource res_dicts = self._transform_response(status_code, info=res_info,
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/contrail_plugin.py", line 291, in _transform_response
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource plugin_base._raise_contrail_error(info, obj_name)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/contrail_plugin_base.py", line 118, in _raise_contrail_error
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource raise NeutronException(**info)
2018-06-25 11:45:49.688 1194 ERROR neutron.api.v2.resource NeutronException: An unknown exception occurred.

Contrail-api stack trace

raceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/__init__.py", line 1115,
in handler_trap_exception
    response = handler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface..
py", line 903, in plugin_http_post_policy
    return self.plugin_create_policy(context, policy)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface..
py", line 847, in plugin_create_policy
    pol_info = cfgdb.policy_create(policy['resource'])
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", lii
ne 2877, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", lii
ne 3521, in policy_create
    policy_obj = self._policy_neutron_to_vnc(policy_q, CREATE)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", lii
ne 1742, in _policy_neutron_to_vnc
    PolicyEntriesType.factory(**policy_q['entries']))
TypeError: factory() argument after ** must be a mapping, not unicode

Tags: config
Sergey Matov (smatov)
information type: Proprietary → Public
Changed in juniperopenstack:
assignee: nobody → Sergey Matov (smatov)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/44087
Submitter: Sergey Matov (<email address hidden>)

Jeba Paulaiyan (jebap)
tags: added: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/44153
Submitter: Sergey Matov (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/44154
Submitter: Sergey Matov (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R5.0

Review in progress for https://review.opencontrail.org/44155
Submitter: Sergey Matov (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/44087
Committed: http://github.com/Juniper/contrail-neutron-plugin/commit/2c03782862580c656e6bdadbbc68e6689baae611
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 2c03782862580c656e6bdadbbc68e6689baae611
Author: Sergey Matov <email address hidden>
Date: Mon Jun 25 17:00:44 2018 +0400

Fix default entries attribute for policies

For policies entries attribute "default" expected to be
dict in contrail-api.

Change-Id: I80673315dc80d3f9a0f3e76441c3a590e37f298c
Closes-bug: #1778518

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/44155
Committed: http://github.com/Juniper/contrail-neutron-plugin/commit/8f3da393994b1a9da453dca3ae9fb73ec35a01ea
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit 8f3da393994b1a9da453dca3ae9fb73ec35a01ea
Author: Sergey Matov <email address hidden>
Date: Mon Jun 25 17:00:44 2018 +0400

Fix default entries attribute for policies

For policies entries attribute "default" expected to be
dict in contrail-api.

Change-Id: I80673315dc80d3f9a0f3e76441c3a590e37f298c
Closes-bug: #1778518

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/44154
Committed: http://github.com/Juniper/contrail-neutron-plugin/commit/c81e7f9f026e14a22ccf58616eb6cfa495b41178
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit c81e7f9f026e14a22ccf58616eb6cfa495b41178
Author: Sergey Matov <email address hidden>
Date: Mon Jun 25 17:00:44 2018 +0400

Fix default entries attribute for policies

For policies entries attribute "default" expected to be
dict in contrail-api.

Change-Id: I80673315dc80d3f9a0f3e76441c3a590e37f298c
Closes-bug: #1778518

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/44153
Committed: http://github.com/Juniper/contrail-neutron-plugin/commit/1b7c4f97f12f74cefbb697546b411bc9d33a6f36
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit 1b7c4f97f12f74cefbb697546b411bc9d33a6f36
Author: Sergey Matov <email address hidden>
Date: Mon Jun 25 17:00:44 2018 +0400

Fix default entries attribute for policies

For policies entries attribute "default" expected to be
dict in contrail-api.

Change-Id: I80673315dc80d3f9a0f3e76441c3a590e37f298c
Closes-bug: #1778518

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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