)]}'
{"cinder/tests/test_volume.py":[{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"2fea3e87fc5f1c7cc2677941bb9b2167b3ba8ab9","unresolved":false,"context_lines":[{"line_number":2832,"context_line":"                              False)"},{"line_number":2833,"context_line":"            volume \u003d db.volume_get(context.get_admin_context(), volume[\u0027id\u0027])"},{"line_number":2834,"context_line":"            self.assertIsNone(volume[\u0027migration_status\u0027])"},{"line_number":2835,"context_line":"            self.assertEqual(volume[\u0027status\u0027], \u0027available\u0027)"},{"line_number":2836,"context_line":""},{"line_number":2837,"context_line":"    def test_migrate_volume_generic(self):"},{"line_number":2838,"context_line":"        def fake_migr(vol, host):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_8295ec89","line":2835,"updated":"2015-02-17 07:16:04.000000000","message":"The order is (expected, observed).","commit_id":"3b4f2a7dfb47eebe5157cfd54ca6e9c45fff0634"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"2fea3e87fc5f1c7cc2677941bb9b2167b3ba8ab9","unresolved":false,"context_lines":[{"line_number":2904,"context_line":"                              True)"},{"line_number":2905,"context_line":"            volume \u003d db.volume_get(context.get_admin_context(), volume[\u0027id\u0027])"},{"line_number":2906,"context_line":"            self.assertIsNone(volume[\u0027migration_status\u0027])"},{"line_number":2907,"context_line":"            self.assertEqual(volume[\u0027status\u0027], \u0027available\u0027)"},{"line_number":2908,"context_line":""},{"line_number":2909,"context_line":"    def test_migrate_volume_generic_create_export_error(self):"},{"line_number":2910,"context_line":"        def fake_create_volume(ctxt, volume, host, req_spec, filters,"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_e28a2863","line":2907,"updated":"2015-02-17 07:16:04.000000000","message":"Same comment. Please fix this in other places.","commit_id":"3b4f2a7dfb47eebe5157cfd54ca6e9c45fff0634"}],"cinder/volume/manager.py":[{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"7b47b735bcc1f31e3f54062bf4c15af2ad82d1d3","unresolved":false,"context_lines":[{"line_number":484,"context_line":""},{"line_number":485,"context_line":"        # If deleting the destination volume in a migration, we want to skip"},{"line_number":486,"context_line":"        # quotas but we need database updates for the volume."},{"line_number":487,"context_line":"        if (volume_ref[\u0027migration_status\u0027] and"},{"line_number":488,"context_line":"                volume_ref[\u0027migration_status\u0027].startswith(\u0027target:\u0027)):"},{"line_number":489,"context_line":"            self.db.volume_glance_metadata_delete_by_volume(context,"},{"line_number":490,"context_line":"                                                            volume_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_221e3b0e","line":487,"updated":"2015-02-14 16:36:36.000000000","message":"While this code is technically correct, I think it will break easily in the future.  Someone may add code later in this function that should be executed in the migration case as well, and it will be skipped.  I suggest removing this code and lines 497-498, and instead add \u0027if\u0027 statements to the code that should be skipped in the function.  This way we have one \u0027return\u0027 statement, and the code will hopefully break less in the future.","commit_id":"a568147adbe9fd0ba68d37ed06b7db68a63eaa14"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"88d9bc654922c9256df6d57be900dd06d8827f2d","unresolved":false,"context_lines":[{"line_number":488,"context_line":"            # If deleting the destination volume in a migration, we want to"},{"line_number":489,"context_line":"            # skip quotas but we need database updates for the volume."},{"line_number":490,"context_line":"            if volume_ref[\u0027migration_status\u0027].startswith(\u0027target:\u0027):"},{"line_number":491,"context_line":"                self.db.volume_glance_metadata_delete_by_volume(context,"},{"line_number":492,"context_line":"                                                                volume_id)"},{"line_number":493,"context_line":"                self.db.volume_destroy(context, volume_id)"},{"line_number":494,"context_line":"                LOG.info(_LI(\"volume %s: deleted successfully\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_36b298e5","line":491,"updated":"2015-02-18 06:28:21.000000000","message":"I don\u0027t like the code duplication between these lines and lines 512-515 - all updates will need to remember to change both.  Suggest the following:\n\n    if not volume_ref[\u0027migration_status\u0027]:\n        # Get reservations\n        try:\n            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -volume_ref[\u0027size\u0027]}\n            QUOTAS.add_volume_type_opts(context,\n                                        reserve_opts,\n                                        volume_ref.get(\u0027volume_type_id\u0027))\n            reservations \u003d QUOTAS.reserve(context,\n                                          project_id\u003dproject_id,\n                                          **reserve_opts)\n        except Exception:\n            reservations \u003d None\n            LOG.exception(_LE(\"Failed to update usages deleting volume\"))\n\n    # Delete glance metadata if it exists\n    self.db.volume_glance_metadata_delete_by_volume(context, volume_id)\n\n    self.db.volume_destroy(context, volume_id)\n    LOG.info(_LI(\"volume %s: deleted successfully\"), volume_ref[\u0027id\u0027])\n\n    if not volume_ref[\u0027migration_status\u0027]:\n        self._notify_about_volume_usage(context, volume_ref, \"delete.end\")\n\n        # Commit the reservations\n        if reservations:\n            QUOTAS.commit(context, reservations, project_id\u003dproject_id)\n\n        pool \u003d vol_utils.extract_host(volume_ref[\u0027host\u0027], \u0027pool\u0027)\n        if pool is None:\n            # Legacy volume, put them into default pool\n            pool \u003d self.driver.configuration.safe_get(\n                \u0027volume_backend_name\u0027) or vol_utils.extract_host(\n                    volume_ref[\u0027host\u0027], \u0027pool\u0027, True)\n        size \u003d volume_ref[\u0027size\u0027]\n\n        try:\n            self.stats[\u0027pools\u0027][pool][\u0027allocated_capacity_gb\u0027] -\u003d size\n        except KeyError:\n            self.stats[\u0027pools\u0027][pool] \u003d dict(\n                allocated_capacity_gb\u003d-size)\n\n        self.publish_service_capabilities(context)","commit_id":"c3b343f8acd5a9ee600775782dc9cae2374d817d"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"80912079defc894fc7c399bb7fdb5982b9a4697d","unresolved":false,"context_lines":[{"line_number":488,"context_line":"            # If deleting the destination volume in a migration, we want to"},{"line_number":489,"context_line":"            # skip quotas but we need database updates for the volume."},{"line_number":490,"context_line":"            if volume_ref[\u0027migration_status\u0027].startswith(\u0027target:\u0027):"},{"line_number":491,"context_line":"                self.db.volume_glance_metadata_delete_by_volume(context,"},{"line_number":492,"context_line":"                                                                volume_id)"},{"line_number":493,"context_line":"                self.db.volume_destroy(context, volume_id)"},{"line_number":494,"context_line":"                LOG.info(_LI(\"volume %s: deleted successfully\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_b6ff6801","line":491,"in_reply_to":"da86d52c_36b298e5","updated":"2015-02-18 06:55:44.000000000","message":"In my understanding, during volume migration, volume_glance_metadata_delete_by_volume and volume_destroy are needed only if the volume is destination volume.\n\nIf the volume is source volume, these DB update should be skipped,\nand then DB will be updated at L1163 - L1164.\n\nUsing above code, DB of both source and destination volume during migration are destroyed at delete_volume.\n\nIf I\u0027m misunderstanding, please correct me.","commit_id":"c3b343f8acd5a9ee600775782dc9cae2374d817d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ca68d91d94351b711340172c87ec8fb48c40122b","unresolved":false,"context_lines":[{"line_number":491,"context_line":"                self.db.volume_glance_metadata_delete_by_volume(context,"},{"line_number":492,"context_line":"                                                                volume_id)"},{"line_number":493,"context_line":"                self.db.volume_destroy(context, volume_id)"},{"line_number":494,"context_line":"                LOG.info(_LI(\"volume %s: deleted successfully\"),"},{"line_number":495,"context_line":"                         volume_ref[\u0027id\u0027])"},{"line_number":496,"context_line":"        else:"},{"line_number":497,"context_line":"            # Get reservations"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_13c5f63b","line":494,"updated":"2015-02-22 16:26:47.000000000","message":"I think it is good to have this Log message but it needs more context.  Perhaps something like \u0027migration destination volume %s: deleted successfully\u0027.  This way we know we went down the path that didn\u0027t update quotas.  This will help for future debug.","commit_id":"c3b343f8acd5a9ee600775782dc9cae2374d817d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ca68d91d94351b711340172c87ec8fb48c40122b","unresolved":false,"context_lines":[{"line_number":1102,"context_line":"                    # source! But the migration_status in database should"},{"line_number":1103,"context_line":"                    # be cleared to handle volume after migration failure"},{"line_number":1104,"context_line":"                    updates \u003d {\u0027migration_status\u0027: None}"},{"line_number":1105,"context_line":"                    self.db.volume_update(ctxt, new_volume[\u0027id\u0027], updates)"},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"    def _get_original_status(self, volume):"},{"line_number":1108,"context_line":"        if (volume[\u0027instance_uuid\u0027] is None and"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_73e1d2cf","line":1105,"updated":"2015-02-22 16:26:47.000000000","message":"I think we need to add a LOG.info or LOG.warning message here:","commit_id":"c3b343f8acd5a9ee600775782dc9cae2374d817d"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"53e41a0190674dd4cd792f40464ea978caf2f990","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                reservations \u003d None"},{"line_number":506,"context_line":"                LOG.exception(_LE(\"Failed to update usages deleting volume\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        if not is_migrating or is_migrating_dest:"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"            # Delete glance metadata if it exists"},{"line_number":511,"context_line":"            self.db.volume_glance_metadata_delete_by_volume(context, volume_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_d1aad283","line":508,"updated":"2015-02-26 10:23:59.000000000","message":"We always want to make these 2 DB calls, right?  I don\u0027t think this \u0027if\u0027 should be here.  If I am correct, we also don\u0027t need is_migrating_dest.","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"f9758956f1e0921f944669e81757e3cfe42bc922","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                reservations \u003d None"},{"line_number":506,"context_line":"                LOG.exception(_LE(\"Failed to update usages deleting volume\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        if not is_migrating or is_migrating_dest:"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"            # Delete glance metadata if it exists"},{"line_number":511,"context_line":"            self.db.volume_glance_metadata_delete_by_volume(context, volume_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_325409c9","line":508,"in_reply_to":"ba7be1f8_d1aad283","updated":"2015-02-26 13:12:18.000000000","message":"In my understanding, there are three cases we should care for volume deletion here.\nTwo of them need 2 DB calls, but other one does not need DB calls during delete_volume.\n\n- Delete a volume and update quota stuffs\n\nThis deletion is not volume migration case.\n\n- Delete a migration destination volume\n\nThis deletion is called if a volume migration is failed. In this case, we should update DB during delete_volume to handle this volume propely but we don\u0027t need quota stuff as you said.\n\n- Delete a migration source volume\n\nThis deletion is called at migration_volume_completion() when volume migration is successfully finished. In this case, after the self.delete_volume() is finished, there are still two DB calls for migrating DB entry. If we destroy DB entry during delete_volume, these two operations always fails during volume migration. I tried your proposal code at patch 4, but that was failed volume migration in this case.\n\n Line 1153\n        # Delete the source volume (if it fails, don\u0027t fail the migration)\n        try:\n            if orig_volume_status \u003d\u003d \u0027in-use\u0027:\n                self.detach_volume(ctxt, volume_id)\n            self.delete_volume(ctxt, volume_id)\n        except Exception as ex:\n            msg \u003d _(\"Failed to delete migration source vol %(vol)s: %(err)s\")\n            LOG.error(msg % {\u0027vol\u0027: volume_id, \u0027err\u0027: ex})\n\n        # Give driver (new_volume) a chance to update things as needed\n        # Note this needs to go through rpc to the host of the new volume\n        # the current host and driver object is for the \"existing\" volume\n        rpcapi.update_migrated_volume(ctxt,\n                                      volume,\n                                      new_volume)\n        self.db.finish_volume_migration(ctxt, volume_id, new_volume_id)\n        self.db.volume_destroy(ctxt, new_volume_id)","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"943f56adba043dd0d6cb43a192a3048925b2582b","unresolved":false,"context_lines":[{"line_number":506,"context_line":"                LOG.exception(_LE(\"Failed to update usages deleting volume\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        if not is_migrating or is_migrating_dest:"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"            # Delete glance metadata if it exists"},{"line_number":511,"context_line":"            self.db.volume_glance_metadata_delete_by_volume(context, volume_id)"},{"line_number":512,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_a3dc0a48","line":509,"updated":"2015-02-27 04:45:00.000000000","message":"It is not clear to me what this statement means until I read your long explanation: \"if not is_migrating or is_migrating_dest:\"  \n\nSo I think some more comments should be added here to explain it.","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"890d727c263d00e01a5170cea2f2537fcb062b34","unresolved":false,"context_lines":[{"line_number":506,"context_line":"                LOG.exception(_LE(\"Failed to update usages deleting volume\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        if not is_migrating or is_migrating_dest:"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"            # Delete glance metadata if it exists"},{"line_number":511,"context_line":"            self.db.volume_glance_metadata_delete_by_volume(context, volume_id)"},{"line_number":512,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_99ba0309","line":509,"in_reply_to":"ba7be1f8_a3dc0a48","updated":"2015-02-27 13:46:37.000000000","message":"I understand.","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"943f56adba043dd0d6cb43a192a3048925b2582b","unresolved":false,"context_lines":[{"line_number":1103,"context_line":"                    # source! But the migration_status in database should"},{"line_number":1104,"context_line":"                    # be cleared to handle volume after migration failure"},{"line_number":1105,"context_line":"                    updates \u003d {\u0027migration_status\u0027: None}"},{"line_number":1106,"context_line":"                    self.db.volume_update(ctxt, new_volume[\u0027id\u0027], updates)"},{"line_number":1107,"context_line":"                    LOG.warn(_LW(\"Failed to migrate volume. The destination \""},{"line_number":1108,"context_line":"                                 \"volume %(vol)s is not deleted since the \""},{"line_number":1109,"context_line":"                                 \"source volume may have already deleted.\"),"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_a357aac9","line":1106,"updated":"2015-02-27 04:45:00.000000000","message":"In migrate_volume_completion, there is a call to destroy the db entry of the new volume: self.db.volume_destroy(ctxt, new_volume_id)\n\nThere are a few more calls after the volume_destroy call.  How do we know for sure the new_volume is still in the db at this point?","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"55cad43f18ecc045533e72fa3c822567c203e2de","unresolved":false,"context_lines":[{"line_number":1103,"context_line":"                    # source! But the migration_status in database should"},{"line_number":1104,"context_line":"                    # be cleared to handle volume after migration failure"},{"line_number":1105,"context_line":"                    updates \u003d {\u0027migration_status\u0027: None}"},{"line_number":1106,"context_line":"                    self.db.volume_update(ctxt, new_volume[\u0027id\u0027], updates)"},{"line_number":1107,"context_line":"                    LOG.warn(_LW(\"Failed to migrate volume. The destination \""},{"line_number":1108,"context_line":"                                 \"volume %(vol)s is not deleted since the \""},{"line_number":1109,"context_line":"                                 \"source volume may have already deleted.\"),"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_f8e77daa","line":1106,"in_reply_to":"ba7be1f8_a357aac9","updated":"2015-02-27 12:53:26.000000000","message":"Good question. If there is a failure in line 1178, the volume migration status might be \u0027completing\u0027.","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"890d727c263d00e01a5170cea2f2537fcb062b34","unresolved":false,"context_lines":[{"line_number":1103,"context_line":"                    # source! But the migration_status in database should"},{"line_number":1104,"context_line":"                    # be cleared to handle volume after migration failure"},{"line_number":1105,"context_line":"                    updates \u003d {\u0027migration_status\u0027: None}"},{"line_number":1106,"context_line":"                    self.db.volume_update(ctxt, new_volume[\u0027id\u0027], updates)"},{"line_number":1107,"context_line":"                    LOG.warn(_LW(\"Failed to migrate volume. The destination \""},{"line_number":1108,"context_line":"                                 \"volume %(vol)s is not deleted since the \""},{"line_number":1109,"context_line":"                                 \"source volume may have already deleted.\"),"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_b9e8a717","line":1106,"in_reply_to":"ba7be1f8_f8e77daa","updated":"2015-02-27 13:46:37.000000000","message":"I agree we have to check whether the DB entry for new_volume_id exists before updating. Thank you for finding out this.","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"943f56adba043dd0d6cb43a192a3048925b2582b","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"                    except Exception as ex:"},{"line_number":1237,"context_line":"                        LOG.error(_LE(\"Failed to create export for volume: \""},{"line_number":1238,"context_line":"                                  \"%s\"), volume_ref[\u0027id\u0027])"},{"line_number":1239,"context_line":"                        LOG.exception(ex)"},{"line_number":1240,"context_line":"                    finally:"},{"line_number":1241,"context_line":"                        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027], updates)"},{"line_number":1242,"context_line":"        if not moved:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_c30d7e39","line":1239,"updated":"2015-02-27 04:45:00.000000000","message":"Jay, I just asked your opinion on a logging like this the other day:).  This won\u0027t get translated.  Can this be combined with the error message above?  Or change it to the following suggested by Jay:):\n\nLOG.exception(_LE(\"An error occurred: %s.\"), ex)\n\nTalk to Jay if you don\u0027t agree with this comment:).","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"890d727c263d00e01a5170cea2f2537fcb062b34","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"                    except Exception as ex:"},{"line_number":1237,"context_line":"                        LOG.error(_LE(\"Failed to create export for volume: \""},{"line_number":1238,"context_line":"                                  \"%s\"), volume_ref[\u0027id\u0027])"},{"line_number":1239,"context_line":"                        LOG.exception(ex)"},{"line_number":1240,"context_line":"                    finally:"},{"line_number":1241,"context_line":"                        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027], updates)"},{"line_number":1242,"context_line":"        if not moved:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_d962bbac","line":1239,"in_reply_to":"ba7be1f8_734ace56","updated":"2015-02-27 13:46:37.000000000","message":"I will talk to Jay.","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"55cad43f18ecc045533e72fa3c822567c203e2de","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"                    except Exception as ex:"},{"line_number":1237,"context_line":"                        LOG.error(_LE(\"Failed to create export for volume: \""},{"line_number":1238,"context_line":"                                  \"%s\"), volume_ref[\u0027id\u0027])"},{"line_number":1239,"context_line":"                        LOG.exception(ex)"},{"line_number":1240,"context_line":"                    finally:"},{"line_number":1241,"context_line":"                        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027], updates)"},{"line_number":1242,"context_line":"        if not moved:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_734ace56","line":1239,"in_reply_to":"ba7be1f8_c30d7e39","updated":"2015-02-27 12:53:26.000000000","message":"Even with this suggestion, the exception message won\u0027t be translated.\n\nIf needed we can write this in a single log statement:\nLOG.exception(_LE(\"Failed to create export for volume: %s\"), volume_ref[\u0027id\u0027])","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"3ff4070031ccc36bbb5dd5f967f45657ec3d07bf","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"                    except Exception as ex:"},{"line_number":1237,"context_line":"                        LOG.error(_LE(\"Failed to create export for volume: \""},{"line_number":1238,"context_line":"                                  \"%s\"), volume_ref[\u0027id\u0027])"},{"line_number":1239,"context_line":"                        LOG.exception(ex)"},{"line_number":1240,"context_line":"                    finally:"},{"line_number":1241,"context_line":"                        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027], updates)"},{"line_number":1242,"context_line":"        if not moved:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_5985ebab","line":1239,"in_reply_to":"ba7be1f8_d962bbac","updated":"2015-02-27 13:55:37.000000000","message":"I also want to point out that this is a little redundant. LOG.exception will print out the current exception information anyway, so I believe this would double up the logging of the exception.\n\nVipin makes a good point in his example. If you update your current LOG.error to be LOG.exception as in his example you will get what I believe you are looking. It will log the \"Failed to create\" message as well as the exception information.\n\nSo based on that, the LOG.exception(ex) line can just be removed.","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"943f56adba043dd0d6cb43a192a3048925b2582b","unresolved":false,"context_lines":[{"line_number":1256,"context_line":"                    except Exception as ex:"},{"line_number":1257,"context_line":"                        LOG.error(_LE(\"Failed to create export for volume: \""},{"line_number":1258,"context_line":"                                  \"%s\"), volume_ref[\u0027id\u0027])"},{"line_number":1259,"context_line":"                        LOG.exception(ex)"},{"line_number":1260,"context_line":"                    finally:"},{"line_number":1261,"context_line":"                        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027], updates)"},{"line_number":1262,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_c35bbe2c","line":1259,"updated":"2015-02-27 04:45:00.000000000","message":"Same.","commit_id":"1d9eb7b1bb689de0b3fe3b91c412262225cc338d"}]}
