]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Reduce hidden effects of sqlalchemy objects
authorJoshua Harlow <harlowja@yahoo-inc.com>
Mon, 19 Aug 2013 18:31:56 +0000 (11:31 -0700)
committerJoshua Harlow <harlowja@yahoo-inc.com>
Mon, 19 Aug 2013 18:31:56 +0000 (11:31 -0700)
The flows are currently holding onto sqlalchemy
due to bug #1214083 and this is causing a problem
with gettextutils which appears to be deepcopying
the raw objects, of which one of those is sqlalchemy
objects, which can't seem to be deepcopied.

Change-Id: Ie831738799a75e2a4a652c73900cad353a71e327

cinder/volume/flows/create_volume.py

index bc400c8cac98d8d609069f145249aba25324b38f..1677cd98f2bb1b61aa418f410a87baf6db443b23 100644 (file)
@@ -1548,16 +1548,18 @@ def _attach_debug_listeners(flow):
     """
 
     def flow_log_change(state, details):
+        # TODO(harlowja): the bug 1214083 is causing problems
         LOG.debug(_("%(flow)s has moved into state %(state)s from state"
                     " %(old_state)s") % {'state': state,
                                          'old_state': details.get('old_state'),
-                                         'flow': details['flow']})
+                                         'flow': str(details['flow'])})
 
     def task_log_change(state, details):
+        # TODO(harlowja): the bug 1214083 is causing problems
         LOG.debug(_("%(flow)s has moved %(runner)s into state %(state)s with"
                     " result: %(result)s") % {'state': state,
-                                              'flow': details['flow'],
-                                              'runner': details['runner'],
+                                              'flow': str(details['flow']),
+                                              'runner': str(details['runner']),
                                               'result': details.get('result')})
 
     # Register * for all state changes (and not selective state changes to be