"is not JSON serializable" error during trunk port creation

Bug #1791934 reported by Onong Tayeng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-vpp
Invalid
Undecided
Onong Tayeng

Bug Description

Get the following errors in neutron server logs during trunk port creation:

2018-09-11 11:24:49.115 864743 ERROR oslo.messaging._drivers.impl_rabbit [req-8afaa4e0-ebea-4651-93c2-c9948781a0dc 4dab2227df0743498f54b0211dbe338f 11156cbc56b848ef94a84eece8e09acd - default default] Failed to publish message to topic 'neutron': Trunk(admin_state_up=True,created_at=2018-09-11T11:24:49Z,description='',id=73835d1f-c9c3-435a-8f7e-b98eaa7f6873,name='trunk0',port_id=9f5b9665-d1a7-4d07-ac7d-da77ba43b371,project_id='11156cbc56b848ef94a84eece8e09acd',revision_number=0,status='DOWN',sub_ports=[SubPort],updated_at=2018-09-11T11:24:49Z) is not JSON serializable: EncodeError: Trunk(admin_state_up=True,created_at=2018-09-11T11:24:49Z,description='',id=73835d1f-c9c3-435a-8f7e-b98eaa7f6873,name='trunk0',port_id=9f5b9665-d1a7-4d07-ac7d-da77ba43b371,project_id='11156cbc56b848ef94a84eece8e09acd',revision_number=0,status='DOWN',sub_ports=[SubPort],updated_at=2018-09-11T11:24:49Z) is not JSON serializable
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging [req-8afaa4e0-ebea-4651-93c2-c9948781a0dc 4dab2227df0743498f54b0211dbe338f 11156cbc56b848ef94a84eece8e09acd - default default] Could not send notification to notifications. Payload={'_context_domain': None, '_context_roles': [u'admin'], '_context_global_request_id': None, '_context_tenant_name': u'admin', 'event_type': 'trunk.create.end', '_context_request_id': 'req-8afaa4e0-ebea-4651-93c2-c9948781a0dc', 'timestamp': u'2018-09-11 11:24:49.113524', '_context_user': u'4dab2227df0743498f54b0211dbe338f', '_unique_id': 'e20ca044069d4ab49f30352fbca2a6cc', '_context_resource_uuid': None, '_context_tenant_id': u'11156cbc56b848ef94a84eece8e09acd', '_context_is_admin_project': True, '_context_user_id': u'4dab2227df0743498f54b0211dbe338f', 'payload': {'trunk': Trunk(admin_state_up=True,created_at=2018-09-11T11:24:49Z,description='',id=73835d1f-c9c3-435a-8f7e-b98eaa7f6873,name='trunk0',port_id=9f5b9665-d1a7-4d07-ac7d-da77ba43b371,project_id='11156cbc56b848ef94a84eece8e09acd',revision_number=0,status='DOWN',sub_ports=[SubPort],updated_at=2018-09-11T11:24:49Z)}, '_context_project_name': u'admin', '_context_user_identity': u'4dab2227df0743498f54b0211dbe338f 11156cbc56b848ef94a84eece8e09acd - default default', '_context_auth_token': 'gAAAAABbl6YAuszAV_Krh4CTZOhtlVB6eHpJDMCMqGdgzi1awJS0yZrf41EmLBun2fcYYj0NvY6vw9_78X6SskOMsTMgyu2mT_V82NhdsbvdCTZJhgRLMzc6cz-VDxT7gXvtpqyCOjMBi7Iy7ICho_AhzWzPsLgrBfQdOLQA-6QhfUpM9wSOG-U', '_context_show_deleted': False, '_context_tenant': u'11156cbc56b848ef94a84eece8e09acd', 'priority': 'INFO', '_context_read_only': False, '_context_is_admin': True, '_context_project_id': u'11156cbc56b848ef94a84eece8e09acd', '_context_project_domain': u'default', '_context_timestamp': '2018-09-11 11:24:48.728061', '_context_user_domain': u'default', '_context_user_name': u'admin', 'publisher_id': 'network.overcloud-controller-0.opnfvlf.org', 'message_id': u'f61b0e8f-32d2-42c4-81c7-7612ad5431e4'}: EncodeError: Trunk(admin_state_up=True,created_at=2018-09-11T11:24:49Z,description='',id=73835d1f-c9c3-435a-8f7e-b98eaa7f6873,name='trunk0',port_id=9f5b9665-d1a7-4d07-ac7d-da77ba43b371,project_id='11156cbc56b848ef94a84eece8e09acd',revision_number=0,status='DOWN',sub_ports=[SubPort],updated_at=2018-09-11T11:24:49Z) is not JSON serializable
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging Traceback (most recent call last):
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/oslo_messaging/notify/messaging.py", line 70, in notify
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging retry=retry)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 130, in _send_notification
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging retry=retry)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 570, in send_notification
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging envelope=(version == 2.0), notify=True, retry=retry)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 535, in _send
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging conn.notify_send(exchange, target.topic, msg, retry=retry)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 1298, in notify_send
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging exchange, msg, routing_key=topic, retry=retry)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 1161, in _ensure_publishing
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging self.ensure(method, retry=retry, error_callback=_error_callback)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 807, in ensure
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging ret, channel = autoretry_method()
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/kombu/connection.py", line 494, in _ensured
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging return fun(*args, **kwargs)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/kombu/connection.py", line 570, in __call__
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging return fun(*args, channel=channels[0], **kwargs), channels[0]
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 796, in execute_method
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging method()
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 1229, in _publish_and_creates_default_queue
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging self._publish(exchange, msg, routing_key=routing_key, timeout=timeout)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 1193, in _publish
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging compression=self.kombu_compression)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/kombu/messaging.py", line 169, in publish
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging compression, headers)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/kombu/messaging.py", line 252, in _prepare
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging body) = dumps(body, serializer=serializer)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/kombu/serialization.py", line 221, in dumps
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging payload = encoder(data)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib64/python2.7/contextlib.py", line 35, in __exit__
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging self.gen.throw(type, value, traceback)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/kombu/serialization.py", line 54, in _reraise_errors
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging reraise(wrapper, wrapper(exc), sys.exc_info()[2])
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/kombu/serialization.py", line 50, in _reraise_errors
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging yield
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/kombu/serialization.py", line 221, in dumps
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging payload = encoder(data)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/kombu/utils/json.py", line 72, in dumps
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging **dict(default_kwargs, **kwargs))
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib64/python2.7/site-packages/simplejson/__init__.py", line 382, in dumps
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging **kw).encode(obj)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib64/python2.7/site-packages/simplejson/encoder.py", line 269, in encode
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging chunks = self.iterencode(o, _one_shot=True)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib64/python2.7/site-packages/simplejson/encoder.py", line 348, in iterencode
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging return _iterencode(o, 0)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib/python2.7/site-packages/kombu/utils/json.py", line 62, in default
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging return super(JSONEncoder, self).default(o)
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging File "/usr/lib64/python2.7/site-packages/simplejson/encoder.py", line 246, in default
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging raise TypeError(repr(o) + " is not JSON serializable")
2018-09-11 11:24:49.116 864743 ERROR oslo_messaging.notify.messaging EncodeError: Trunk(admin_state_up=True,created_at=2018-09-11T11:24:49Z,description='',id=73835d1f-c9c3-435a-8f7e-b98eaa7f6873,name='trunk0',port_id=9f5b9665-d1a7-4d07-ac7d-da77ba43b371,project_id='11156cbc56b848ef94a84eece8e09acd',revision_number=0,status='DOWN',sub_ports=[SubPort],updated_at=2018-09-11T11:24:49Z) is not JSON serializable

Onong Tayeng (onong)
Changed in networking-vpp:
assignee: nobody → Onong Tayeng (onong)
Onong Tayeng (onong)
Changed in networking-vpp:
status: New → Incomplete
Jerome Tollet (jtollet)
Changed in networking-vpp:
status: Incomplete → Won't Fix
status: Won't Fix → Invalid
status: Invalid → Incomplete
status: Incomplete → Invalid
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.