)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":22604,"name":"Samuel Pilla","email":"sp516w@att.com","username":"samuel.pilla"},"change_message_id":"b26df1ac998e67ae5f9b470a2d0f3dc2d48e1fc4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reduce code duplication"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Reduced source code by extracting duplicated code"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I02be6fbbfba0c26b4f1ce78bd5da3d844f8d1345"},{"line_number":12,"context_line":"Closes-Bug: 1606829"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a98d1f4_6cf239d4","line":9,"updated":"2016-09-29 19:15:26.000000000","message":"This is very vague for the change being made. Perhaps add a line or two about what function is being moved and little more on why. Maybe I\u0027m being picky.. :)","commit_id":"9b977af61e8ccd317bdf5758b9c9005e88dedcf4"}],"trove/guestagent/datastore/experimental/cassandra/manager.py":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"b8dbd3597a221b1c121755185d6aa598b6e4cba5","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        return self.app.is_root_enabled()"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def _perform_restore(self, backup_info, context, restore_location):"},{"line_number":215,"context_line":"        super(Manager, self).restore_backup(backup_info, backup,"},{"line_number":216,"context_line":"                                            context, restore_location)"},{"line_number":217,"context_line":"        self.app._apply_post_restore_updates(backup_info)"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_93e2f22d","line":215,"range":{"start_line":215,"start_character":29,"end_line":215,"end_character":43},"updated":"2016-09-30 20:03:30.000000000","message":"The only definition of \u0027restore_backup\u0027 is in cinder, we should catch the cinder errors.","commit_id":"d5dafcc4c60ff48a1d05d121b9db0bb364302d59"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"b8dbd3597a221b1c121755185d6aa598b6e4cba5","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    def _perform_restore(self, backup_info, context, restore_location):"},{"line_number":215,"context_line":"        super(Manager, self).restore_backup(backup_info, backup,"},{"line_number":216,"context_line":"                                            context, restore_location)"},{"line_number":217,"context_line":"        self.app._apply_post_restore_updates(backup_info)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":220,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_b09604ee","line":217,"range":{"start_line":217,"start_character":17,"end_line":217,"end_character":45},"updated":"2016-09-30 20:03:30.000000000","message":"so when this raises a runtime error, we are no longer are logging the errors. We should keep the try catch around both of these arguments.","commit_id":"d5dafcc4c60ff48a1d05d121b9db0bb364302d59"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a88a5bb1762c5b23ec64d25fbb97a2edda488fbd","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def _perform_restore(self, backup_info, context, restore_location):"},{"line_number":215,"context_line":"        try:"},{"line_number":216,"context_line":"            super(Manager, self).restore_backup(backup_info, backup,"},{"line_number":217,"context_line":"                                                context, restore_location)"},{"line_number":218,"context_line":"            self.app._apply_post_restore_updates(backup_info)"},{"line_number":219,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a98d1f4_c592904b","line":216,"range":{"start_line":216,"start_character":12,"end_line":216,"end_character":32},"updated":"2016-10-04 12:33:59.000000000","message":"why not self?","commit_id":"9fcf8928cd3e915bfe5284d6c185127affeaa5e5"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"eea62a74369044ad80a9bc033c8efc18806eaa24","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def _perform_restore(self, backup_info, context, restore_location):"},{"line_number":215,"context_line":"        try:"},{"line_number":216,"context_line":"            super(Manager, self).restore_backup(backup_info, backup,"},{"line_number":217,"context_line":"                                                context, restore_location)"},{"line_number":218,"context_line":"            self.app._apply_post_restore_updates(backup_info)"},{"line_number":219,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_015d4ee9","line":216,"range":{"start_line":216,"start_character":12,"end_line":216,"end_character":32},"in_reply_to":"3a98d1f4_c592904b","updated":"2016-10-04 14:26:58.000000000","message":"Done","commit_id":"9fcf8928cd3e915bfe5284d6c185127affeaa5e5"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a88a5bb1762c5b23ec64d25fbb97a2edda488fbd","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            self.app._apply_post_restore_updates(backup_info)"},{"line_number":219,"context_line":"        except Exception as e:"},{"line_number":220,"context_line":"            LOG.error(e)"},{"line_number":221,"context_line":"            LOG.error(_(\"Post-restore updates error : %s.\") %"},{"line_number":222,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":225,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a98d1f4_851c08c3","line":222,"range":{"start_line":221,"start_character":0,"end_line":222,"end_character":40},"updated":"2016-10-04 12:33:59.000000000","message":"also, given that restore_backup can raise exceptions as well, this is not really a \"post-restore updates error\". It could be a restore_backup error as well.","commit_id":"9fcf8928cd3e915bfe5284d6c185127affeaa5e5"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a88a5bb1762c5b23ec64d25fbb97a2edda488fbd","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                                                context, restore_location)"},{"line_number":218,"context_line":"            self.app._apply_post_restore_updates(backup_info)"},{"line_number":219,"context_line":"        except Exception as e:"},{"line_number":220,"context_line":"            LOG.error(e)"},{"line_number":221,"context_line":"            LOG.error(_(\"Post-restore updates error : %s.\") %"},{"line_number":222,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":225,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a98d1f4_451cc013","line":222,"range":{"start_line":220,"start_character":1,"end_line":222,"end_character":40},"updated":"2016-10-04 12:33:59.000000000","message":"while you are fixing it, why not also fix this? Do we really need two consecutive lines calling LOG.error()?","commit_id":"9fcf8928cd3e915bfe5284d6c185127affeaa5e5"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"eea62a74369044ad80a9bc033c8efc18806eaa24","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            self.app._apply_post_restore_updates(backup_info)"},{"line_number":219,"context_line":"        except Exception as e:"},{"line_number":220,"context_line":"            LOG.error(e)"},{"line_number":221,"context_line":"            LOG.error(_(\"Post-restore updates error : %s.\") %"},{"line_number":222,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":225,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_81695e8e","line":222,"range":{"start_line":221,"start_character":0,"end_line":222,"end_character":40},"in_reply_to":"3a98d1f4_851c08c3","updated":"2016-10-04 14:26:58.000000000","message":"Done","commit_id":"9fcf8928cd3e915bfe5284d6c185127affeaa5e5"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9b1604837d1dc55ec8cab6766f81fb0fc1c1e49a","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from oslo_log import log as logging"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from trove.common import cfg"},{"line_number":22,"context_line":"from trove.common.i18n import _"},{"line_number":23,"context_line":"from trove.common import instance as trove_instance"},{"line_number":24,"context_line":"from trove.common.notification import EndNotification"},{"line_number":25,"context_line":"from trove.guestagent import backup"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_e4fdd06f","side":"PARENT","line":22,"updated":"2016-10-04 14:57:14.000000000","message":"Line 220-221 still uses i18n","commit_id":"2ff5ee729a30e56470d85fcf79d558527c24fc0a"}],"trove/guestagent/datastore/experimental/mongodb/manager.py":[{"author":{"_account_id":22604,"name":"Samuel Pilla","email":"sp516w@att.com","username":"samuel.pilla"},"change_message_id":"b26df1ac998e67ae5f9b470a2d0f3dc2d48e1fc4","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        LOG.debug(\"Checking if root is enabled.\")"},{"line_number":181,"context_line":"        return service.MongoDBAdmin().is_root_enabled()"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":184,"context_line":"        self.restore_backup(backup_info, backup, context, restore_location)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def create_backup(self, context, backup_info):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_2f7823c4","line":183,"range":{"start_line":183,"start_character":71,"end_line":183,"end_character":74},"updated":"2016-09-29 19:15:26.000000000","message":"Not used, maybe don\u0027t pass","commit_id":"9b977af61e8ccd317bdf5758b9c9005e88dedcf4"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a88a5bb1762c5b23ec64d25fbb97a2edda488fbd","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            self.app.start_db(update_db\u003dTrue)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if not cluster_config and backup_info:"},{"line_number":93,"context_line":"            self._perform_restore(backup_info, context, mount_point, self.app)"},{"line_number":94,"context_line":"            if service.MongoDBAdmin().is_root_enabled():"},{"line_number":95,"context_line":"                self.app.status.report_root(context, \u0027root\u0027)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a98d1f4_65929cf8","side":"PARENT","line":93,"range":{"start_line":93,"start_character":67,"end_line":93,"end_character":77},"updated":"2016-10-04 12:33:59.000000000","message":"this change is not related to the Ctrl-C/Ctrl-V thing you are trying to fix, is it?","commit_id":"2ff5ee729a30e56470d85fcf79d558527c24fc0a"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"eea62a74369044ad80a9bc033c8efc18806eaa24","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            self.app.start_db(update_db\u003dTrue)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if not cluster_config and backup_info:"},{"line_number":93,"context_line":"            self._perform_restore(backup_info, context, mount_point, self.app)"},{"line_number":94,"context_line":"            if service.MongoDBAdmin().is_root_enabled():"},{"line_number":95,"context_line":"                self.app.status.report_root(context, \u0027root\u0027)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_213a4ace","side":"PARENT","line":93,"range":{"start_line":93,"start_character":67,"end_line":93,"end_character":77},"in_reply_to":"3a98d1f4_65929cf8","updated":"2016-10-04 14:26:58.000000000","message":"Yes, it (self.app) is an unused parameter\n(I removed it)","commit_id":"2ff5ee729a30e56470d85fcf79d558527c24fc0a"}],"trove/guestagent/datastore/experimental/redis/manager.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a88a5bb1762c5b23ec64d25fbb97a2edda488fbd","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    def configuration_manager(self):"},{"line_number":49,"context_line":"        return self._app.configuration_manager"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":52,"context_line":"        \"\"\"Perform a restore on this instance.\"\"\""},{"line_number":53,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":54,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a98d1f4_a548248c","side":"PARENT","line":51,"range":{"start_line":51,"start_character":71,"end_line":51,"end_character":74},"updated":"2016-10-04 12:33:59.000000000","message":"isn\u0027t this redundant too?","commit_id":"2ff5ee729a30e56470d85fcf79d558527c24fc0a"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"eea62a74369044ad80a9bc033c8efc18806eaa24","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    def configuration_manager(self):"},{"line_number":49,"context_line":"        return self._app.configuration_manager"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":52,"context_line":"        \"\"\"Perform a restore on this instance.\"\"\""},{"line_number":53,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":54,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_61f1b2cd","side":"PARENT","line":51,"range":{"start_line":51,"start_character":71,"end_line":51,"end_character":74},"in_reply_to":"3a98d1f4_a548248c","updated":"2016-10-04 14:26:58.000000000","message":"Done","commit_id":"2ff5ee729a30e56470d85fcf79d558527c24fc0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a88a5bb1762c5b23ec64d25fbb97a2edda488fbd","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def configuration_manager(self):"},{"line_number":48,"context_line":"        return self._app.configuration_manager"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":51,"context_line":"        \"\"\"Perform a restore on this instance.\"\"\""},{"line_number":52,"context_line":"        self.restore_backup(backup_info, backup, context, restore_location)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a98d1f4_d0024c09","line":50,"range":{"start_line":50,"start_character":71,"end_line":50,"end_character":74},"updated":"2016-10-04 12:33:59.000000000","message":"??","commit_id":"9fcf8928cd3e915bfe5284d6c185127affeaa5e5"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"eea62a74369044ad80a9bc033c8efc18806eaa24","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def configuration_manager(self):"},{"line_number":48,"context_line":"        return self._app.configuration_manager"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":51,"context_line":"        \"\"\"Perform a restore on this instance.\"\"\""},{"line_number":52,"context_line":"        self.restore_backup(backup_info, backup, context, restore_location)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_a1b9faee","line":50,"range":{"start_line":50,"start_character":71,"end_line":50,"end_character":74},"in_reply_to":"3a98d1f4_d0024c09","updated":"2016-10-04 14:26:58.000000000","message":"Done","commit_id":"9fcf8928cd3e915bfe5284d6c185127affeaa5e5"}],"trove/guestagent/datastore/manager.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"971fec3240f1aa48c537851dc3ec3bfceb825381","unresolved":false,"context_lines":[{"line_number":841,"context_line":"        raise exception.DatastoreOperationNotSupported("},{"line_number":842,"context_line":"            operation\u003d\u0027demote_replication_master\u0027, datastore\u003dself.manager)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def restoring_db(self, backup_info, backup, context, restore_location,"},{"line_number":845,"context_line":"                     failed_status, restore_update\u003dFalse):"},{"line_number":846,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":847,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_e57151e2","line":844,"range":{"start_line":844,"start_character":8,"end_line":844,"end_character":20},"updated":"2016-07-27 16:53:02.000000000","message":"This name feels a bit inconsistent. Why not just \u0027restore_backup\u0027?","commit_id":"1052f517b15392b9118dccbac2514ffb2e946aeb"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"971fec3240f1aa48c537851dc3ec3bfceb825381","unresolved":false,"context_lines":[{"line_number":842,"context_line":"            operation\u003d\u0027demote_replication_master\u0027, datastore\u003dself.manager)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def restoring_db(self, backup_info, backup, context, restore_location,"},{"line_number":845,"context_line":"                     failed_status, restore_update\u003dFalse):"},{"line_number":846,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":847,"context_line":"        try:"},{"line_number":848,"context_line":"            backup.restore(context, backup_info, restore_location)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_f2b475d2","line":845,"range":{"start_line":845,"start_character":21,"end_line":845,"end_character":34},"updated":"2016-07-27 16:53:02.000000000","message":"Since this is now in the base this should really use just one status same for all (i believe they all use the same status anyways). i.e. The behavior of restore failing should be the same for all datastores - no need to pass it in.","commit_id":"1052f517b15392b9118dccbac2514ffb2e946aeb"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"971fec3240f1aa48c537851dc3ec3bfceb825381","unresolved":false,"context_lines":[{"line_number":846,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":847,"context_line":"        try:"},{"line_number":848,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":849,"context_line":"            if restore_update:"},{"line_number":850,"context_line":"                self.app._apply_post_restore_updates(backup_info)"},{"line_number":851,"context_line":"        except Exception as e:"},{"line_number":852,"context_line":"            LOG.error(e)"},{"line_number":853,"context_line":"            LOG.error(_(\"Error performing restore from backup %s.\") %"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_f2ce35b3","line":850,"range":{"start_line":849,"start_character":12,"end_line":850,"end_character":65},"updated":"2016-07-27 16:53:02.000000000","message":"I would leave this on the actual derived implementations for now. The App does not have a well defined interface. This seems to be suggesting that each App implementation must have \u0027_apply_post_restore_updates(backup_info)\u0027 which is not the case.\n\nIf a datastore needs to apply post restore updates it can do so like:\n\n\n    def restoring_db(...):\n        super(Manager, self).restoring(...)\n        self.app._apply_post_restore_updates(...)","commit_id":"1052f517b15392b9118dccbac2514ffb2e946aeb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a88a5bb1762c5b23ec64d25fbb97a2edda488fbd","unresolved":false,"context_lines":[{"line_number":846,"context_line":"        try:"},{"line_number":847,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":848,"context_line":"        except Exception as e:"},{"line_number":849,"context_line":"            LOG.error(e)"},{"line_number":850,"context_line":"            LOG.error(_(\"Error performing restore from backup %s.\") %"},{"line_number":851,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":852,"context_line":"            self.status.set_status(instance.ServiceStatuses.FAILED)"},{"line_number":853,"context_line":"            raise"},{"line_number":854,"context_line":"        LOG.info(_(\"Restored database successfully.\"))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a98d1f4_f05588fa","line":851,"range":{"start_line":849,"start_character":1,"end_line":851,"end_character":40},"updated":"2016-10-04 12:33:59.000000000","message":"do you really need two consecutive lines to log this?","commit_id":"9fcf8928cd3e915bfe5284d6c185127affeaa5e5"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"eea62a74369044ad80a9bc033c8efc18806eaa24","unresolved":false,"context_lines":[{"line_number":846,"context_line":"        try:"},{"line_number":847,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":848,"context_line":"        except Exception as e:"},{"line_number":849,"context_line":"            LOG.error(e)"},{"line_number":850,"context_line":"            LOG.error(_(\"Error performing restore from backup %s.\") %"},{"line_number":851,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":852,"context_line":"            self.status.set_status(instance.ServiceStatuses.FAILED)"},{"line_number":853,"context_line":"            raise"},{"line_number":854,"context_line":"        LOG.info(_(\"Restored database successfully.\"))"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_616292da","line":851,"range":{"start_line":849,"start_character":1,"end_line":851,"end_character":40},"in_reply_to":"3a98d1f4_f05588fa","updated":"2016-10-04 14:26:58.000000000","message":"Two error-lines were in the original code (this is why I did not modify)","commit_id":"9fcf8928cd3e915bfe5284d6c185127affeaa5e5"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9b1604837d1dc55ec8cab6766f81fb0fc1c1e49a","unresolved":false,"context_lines":[{"line_number":841,"context_line":"        raise exception.DatastoreOperationNotSupported("},{"line_number":842,"context_line":"            operation\u003d\u0027demote_replication_master\u0027, datastore\u003dself.manager)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def restore_backup(self, backup_info, backup, context, restore_location):"},{"line_number":845,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":846,"context_line":"        try:"},{"line_number":847,"context_line":"            backup.restore(context, backup_info, restore_location)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_2f72317d","line":844,"updated":"2016-10-04 14:57:14.000000000","message":"With what you are proposing here, you are replacing execute_restore [1] with this method .\n\n1. https://github.com/openstack/trove/blob/master/trove/guestagent/backup/backupagent.py#L153\n\nHow is this method (restore_backup) better than execute_restore or why can you not just put the logging in execute_restore instead?","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9b1604837d1dc55ec8cab6766f81fb0fc1c1e49a","unresolved":false,"context_lines":[{"line_number":842,"context_line":"            operation\u003d\u0027demote_replication_master\u0027, datastore\u003dself.manager)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def restore_backup(self, backup_info, backup, context, restore_location):"},{"line_number":845,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":846,"context_line":"        try:"},{"line_number":847,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":848,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_84032c0f","line":845,"range":{"start_line":845,"start_character":57,"end_line":845,"end_character":58},"updated":"2016-10-04 14:57:14.000000000","message":",","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9b1604837d1dc55ec8cab6766f81fb0fc1c1e49a","unresolved":false,"context_lines":[{"line_number":842,"context_line":"            operation\u003d\u0027demote_replication_master\u0027, datastore\u003dself.manager)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def restore_backup(self, backup_info, backup, context, restore_location):"},{"line_number":845,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":846,"context_line":"        try:"},{"line_number":847,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":848,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_446a041c","line":845,"range":{"start_line":845,"start_character":17,"end_line":845,"end_character":18},"updated":"2016-10-04 14:57:14.000000000","message":"_LI","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"34b9f3986600c6b6b16cfc158fb3e864349fcff0","unresolved":false,"context_lines":[{"line_number":842,"context_line":"            operation\u003d\u0027demote_replication_master\u0027, datastore\u003dself.manager)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def restore_backup(self, backup_info, backup, context, restore_location):"},{"line_number":845,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":846,"context_line":"        try:"},{"line_number":847,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":848,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_2e5f8a73","line":845,"range":{"start_line":845,"start_character":17,"end_line":845,"end_character":18},"in_reply_to":"1a95cdbc_446a041c","updated":"2016-10-04 17:42:55.000000000","message":"this is not mandatory","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9b1604837d1dc55ec8cab6766f81fb0fc1c1e49a","unresolved":false,"context_lines":[{"line_number":846,"context_line":"        try:"},{"line_number":847,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":848,"context_line":"        except Exception as e:"},{"line_number":849,"context_line":"            LOG.error(e)"},{"line_number":850,"context_line":"            LOG.error(_(\"Error performing restore from backup %s.\") %"},{"line_number":851,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":852,"context_line":"            self.status.set_status(instance.ServiceStatuses.FAILED)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_e4d070cc","line":849,"range":{"start_line":849,"start_character":12,"end_line":849,"end_character":24},"updated":"2016-10-04 14:57:14.000000000","message":"You can join this message with the the one below it to make one call to LOG.error instead of two.","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9b1604837d1dc55ec8cab6766f81fb0fc1c1e49a","unresolved":false,"context_lines":[{"line_number":847,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":848,"context_line":"        except Exception as e:"},{"line_number":849,"context_line":"            LOG.error(e)"},{"line_number":850,"context_line":"            LOG.error(_(\"Error performing restore from backup %s.\") %"},{"line_number":851,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":852,"context_line":"            self.status.set_status(instance.ServiceStatuses.FAILED)"},{"line_number":853,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_642f00a2","line":850,"range":{"start_line":850,"start_character":67,"end_line":850,"end_character":69},"updated":"2016-10-04 14:57:14.000000000","message":",","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9b1604837d1dc55ec8cab6766f81fb0fc1c1e49a","unresolved":false,"context_lines":[{"line_number":847,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":848,"context_line":"        except Exception as e:"},{"line_number":849,"context_line":"            LOG.error(e)"},{"line_number":850,"context_line":"            LOG.error(_(\"Error performing restore from backup %s.\") %"},{"line_number":851,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":852,"context_line":"            self.status.set_status(instance.ServiceStatuses.FAILED)"},{"line_number":853,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_c47d34e9","line":850,"range":{"start_line":850,"start_character":22,"end_line":850,"end_character":23},"updated":"2016-10-04 14:57:14.000000000","message":"_LE","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"34b9f3986600c6b6b16cfc158fb3e864349fcff0","unresolved":false,"context_lines":[{"line_number":847,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":848,"context_line":"        except Exception as e:"},{"line_number":849,"context_line":"            LOG.error(e)"},{"line_number":850,"context_line":"            LOG.error(_(\"Error performing restore from backup %s.\") %"},{"line_number":851,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":852,"context_line":"            self.status.set_status(instance.ServiceStatuses.FAILED)"},{"line_number":853,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_4e54d653","line":850,"range":{"start_line":850,"start_character":22,"end_line":850,"end_character":23},"in_reply_to":"1a95cdbc_c47d34e9","updated":"2016-10-04 17:42:55.000000000","message":"this is not mandatory","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9b1604837d1dc55ec8cab6766f81fb0fc1c1e49a","unresolved":false,"context_lines":[{"line_number":851,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":852,"context_line":"            self.status.set_status(instance.ServiceStatuses.FAILED)"},{"line_number":853,"context_line":"            raise"},{"line_number":854,"context_line":"        LOG.info(_(\"Restored database successfully.\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_24db38ef","line":854,"range":{"start_line":854,"start_character":17,"end_line":854,"end_character":18},"updated":"2016-10-04 14:57:14.000000000","message":"_LI","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"34b9f3986600c6b6b16cfc158fb3e864349fcff0","unresolved":false,"context_lines":[{"line_number":851,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":852,"context_line":"            self.status.set_status(instance.ServiceStatuses.FAILED)"},{"line_number":853,"context_line":"            raise"},{"line_number":854,"context_line":"        LOG.info(_(\"Restored database successfully.\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_ae4b9aaf","line":854,"range":{"start_line":854,"start_character":17,"end_line":854,"end_character":18},"in_reply_to":"1a95cdbc_24db38ef","updated":"2016-10-04 17:42:55.000000000","message":"this is not mandatory","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9b1604837d1dc55ec8cab6766f81fb0fc1c1e49a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"1a95cdbc_2f13115e","line":855,"updated":"2016-10-04 14:57:14.000000000","message":"for proper use of i18n refer to the guidelines: http://docs.openstack.org/developer/oslo.i18n/guidelines.html","commit_id":"b3bddd389c9c286b5bf34580dae359cfee240412"}]}
