More verbose backend_status field
authorSapan Bhatia <gwsapan@gmail.com>
Fri, 22 Aug 2014 07:06:03 +0000 (03:06 -0400)
committerSapan Bhatia <gwsapan@gmail.com>
Fri, 22 Aug 2014 07:06:03 +0000 (03:06 -0400)
planetstack/openstack_observer/syncstep.py

index bca2d58..4852e43 100644 (file)
@@ -86,10 +86,12 @@ class SyncStep:
                     o.backend_status = "OK"
                     o.save(update_fields=['enacted'])
             except Exception,e:
+                logger.log_exc("sync step failed!")
+                str_e = '%r'%e
                 try:
-                    o.backend_status = self.error_map.map(str(e))
+                    o.backend_status = self.error_map.map(str_e)
                 except:
-                    o.backend_status = str(e)
+                    o.backend_status = str_e
 
                 if (o.pk):
                     o.save(update_fields=['backend_status'])