← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1756360] [NEW] Serializer strips Exception kwargs

 

Public bug reported:

Description
===========
A change in oslo serialization makes it so when Exceptions are serialized the value returned is repr(Exception). This is resulting in the Exception kwargs being stripped from the serialized Exception.
https://github.com/openstack/oslo.serialization/commit/c1a7079c26d27a2e46cca26963d3d9aa040bdbe8

Steps to reproduce
==================
Here is the code flow where the bug was noticed. The bug is not specific to this code flow, but rather any exception notification that is serialized will have this problem.

nova.compute.api.API._create_instance()
nova.conductor.manager.ComputeTaskManager.schedule_and_build_instances()
nova.conductor.manager.ComputeTaskManager._bury_in_cell0()
nova.conductor.manager.ComputeTaskManager._set_vm_state_and_notify()
nova.scheduler.utils.set_vm_state_and_notify()
oslo_messaging.notify.notifier.Notifier.error()
oslo_messaging.notify.notifier.Notifier._notify()
oslo_messaging.serializer.JsonPayloadSerializer.serialize_entity()
oslo_serialization.jsonutils.to_primitive()

Expected result
===============
When an Exception is serialized, we would expect it to contain all of the pertinent information that it had before being serialized.

Actual result
=============
When an Exception is serialized, the kwargs are being stripped from it by the repr() method call.

Environment
===========
Queens environments containing the commit https://github.com/openstack/oslo.serialization/commit/c1a7079c26d27a2e46cca26963d3d9aa040bdbe8 will have this problem.

Logs & Configs
==============
N/A

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1756360

Title:
  Serializer strips Exception kwargs

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========
  A change in oslo serialization makes it so when Exceptions are serialized the value returned is repr(Exception). This is resulting in the Exception kwargs being stripped from the serialized Exception.
  https://github.com/openstack/oslo.serialization/commit/c1a7079c26d27a2e46cca26963d3d9aa040bdbe8

  Steps to reproduce
  ==================
  Here is the code flow where the bug was noticed. The bug is not specific to this code flow, but rather any exception notification that is serialized will have this problem.

  nova.compute.api.API._create_instance()
  nova.conductor.manager.ComputeTaskManager.schedule_and_build_instances()
  nova.conductor.manager.ComputeTaskManager._bury_in_cell0()
  nova.conductor.manager.ComputeTaskManager._set_vm_state_and_notify()
  nova.scheduler.utils.set_vm_state_and_notify()
  oslo_messaging.notify.notifier.Notifier.error()
  oslo_messaging.notify.notifier.Notifier._notify()
  oslo_messaging.serializer.JsonPayloadSerializer.serialize_entity()
  oslo_serialization.jsonutils.to_primitive()

  Expected result
  ===============
  When an Exception is serialized, we would expect it to contain all of the pertinent information that it had before being serialized.

  Actual result
  =============
  When an Exception is serialized, the kwargs are being stripped from it by the repr() method call.

  Environment
  ===========
  Queens environments containing the commit https://github.com/openstack/oslo.serialization/commit/c1a7079c26d27a2e46cca26963d3d9aa040bdbe8 will have this problem.

  Logs & Configs
  ==============
  N/A

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


Follow ups