)]}'
{"etc/trove/trove-guestagent.conf.sample":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"729721f5bb12ff3fc1579785700b2d36b7cf0c86","unresolved":false,"context_lines":[{"line_number":148,"context_line":"# For db2, the following are the defaults for backup, and restore:"},{"line_number":149,"context_line":"# backup_strategy \u003d DB2Backup"},{"line_number":150,"context_line":"# backup_namespace \u003d trove.guestagent.strategies.backup.experimental.db2_impl"},{"line_number":151,"context_line":"# restore_namespace \u003d trove.guestagent.strategies.restore.experimental.db2_impl "}],"source_content_type":"application/octet-stream","patch_set":10,"id":"9a68dd71_47654f43","line":151,"range":{"start_line":151,"start_character":79,"end_line":151,"end_character":80},"updated":"2016-01-20 22:33:39.000000000","message":"Ishita, looks like an extra white space at the end of the above line","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e223ca66d1f31c422b96de1592920c33ef0dc54b","unresolved":false,"context_lines":[{"line_number":148,"context_line":"# For db2, the following are the defaults for backup, and restore:"},{"line_number":149,"context_line":"# backup_strategy \u003d DB2Backup"},{"line_number":150,"context_line":"# backup_namespace \u003d trove.guestagent.strategies.backup.experimental.db2_impl"},{"line_number":151,"context_line":"# restore_namespace \u003d trove.guestagent.strategies.restore.experimental.db2_impl "}],"source_content_type":"application/octet-stream","patch_set":10,"id":"9a68dd71_b9e8b07d","line":151,"range":{"start_line":151,"start_character":79,"end_line":151,"end_character":80},"in_reply_to":"9a68dd71_47654f43","updated":"2016-01-22 00:05:25.000000000","message":"Done","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"}],"trove/common/cfg.py":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"729721f5bb12ff3fc1579785700b2d36b7cf0c86","unresolved":false,"context_lines":[{"line_number":1127,"context_line":"                       \u0027db2_impl\u0027,"},{"line_number":1128,"context_line":"               help\u003d\u0027Namespace to load backup strategies from.\u0027,"},{"line_number":1129,"context_line":"               deprecated_name\u003d\u0027backup_namespace\u0027,"},{"line_number":1130,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027),"},{"line_number":1131,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":1132,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.experimental.\u0027"},{"line_number":1133,"context_line":"                       \u0027db2_impl\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_67e5f3a6","line":1130,"updated":"2016-01-20 22:33:39.000000000","message":"I dont think you need the deprecated_name and deprecated_group for this.","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e223ca66d1f31c422b96de1592920c33ef0dc54b","unresolved":false,"context_lines":[{"line_number":1127,"context_line":"                       \u0027db2_impl\u0027,"},{"line_number":1128,"context_line":"               help\u003d\u0027Namespace to load backup strategies from.\u0027,"},{"line_number":1129,"context_line":"               deprecated_name\u003d\u0027backup_namespace\u0027,"},{"line_number":1130,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027),"},{"line_number":1131,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":1132,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.experimental.\u0027"},{"line_number":1133,"context_line":"                       \u0027db2_impl\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_f44dcf72","line":1130,"in_reply_to":"9a68dd71_67e5f3a6","updated":"2016-01-22 00:05:25.000000000","message":"I left it in to be consistent with other datastores","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"}],"trove/guestagent/datastore/experimental/db2/manager.py":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"729721f5bb12ff3fc1579785700b2d36b7cf0c86","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        self.app.start_db()"},{"line_number":57,"context_line":"        if backup_info:"},{"line_number":58,"context_line":"            self._perform_restore(backup_info, context, mount_point, self.app)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def restart(self, context):"},{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":"        Restart this DB2 instance."}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_868d8833","line":59,"updated":"2016-01-20 22:33:39.000000000","message":"The parameter self.app in the above call is not being used anywhere in that function.","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e223ca66d1f31c422b96de1592920c33ef0dc54b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        self.app.start_db()"},{"line_number":57,"context_line":"        if backup_info:"},{"line_number":58,"context_line":"            self._perform_restore(backup_info, context, mount_point, self.app)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def restart(self, context):"},{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":"        Restart this DB2 instance."}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_2e56b35c","line":59,"in_reply_to":"9a68dd71_868d8833","updated":"2016-01-22 00:05:25.000000000","message":"Done","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"729721f5bb12ff3fc1579785700b2d36b7cf0c86","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        LOG.debug(\"Checking if root is enabled.\")"},{"line_number":156,"context_line":"        raise exception.DatastoreOperationNotSupported("},{"line_number":157,"context_line":"            operation\u003d\u0027is_root_enabled\u0027, datastore\u003dself.manager)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":160,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":161,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_267cdc71","line":158,"updated":"2016-01-20 22:33:39.000000000","message":"Ishita, I dont think you need to put the above methods in here since you are not implementing them. The defaults are already in the base class.","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e223ca66d1f31c422b96de1592920c33ef0dc54b","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        LOG.debug(\"Checking if root is enabled.\")"},{"line_number":156,"context_line":"        raise exception.DatastoreOperationNotSupported("},{"line_number":157,"context_line":"            operation\u003d\u0027is_root_enabled\u0027, datastore\u003dself.manager)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":160,"context_line":"        LOG.info(_(\"Restoring database from backup %s.\") % backup_info[\u0027id\u0027])"},{"line_number":161,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_8e48ff88","line":158,"in_reply_to":"9a68dd71_267cdc71","updated":"2016-01-22 00:05:25.000000000","message":"Done","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"0dc19cfc12a1f409deeea7634f54cc7e8e613374","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        LOG.debug(\"Creating backup.\")"},{"line_number":129,"context_line":"        backup.backup(context, backup_info)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def get_config_changes(self, cluster_config, mount_point\u003dNone):"},{"line_number":132,"context_line":"        LOG.debug(\"Get configuration changes\")"},{"line_number":133,"context_line":"        raise exception.DatastoreOperationNotSupported("},{"line_number":134,"context_line":"            operation\u003d\u0027get_configuration_changes\u0027, datastore\u003dself.manager)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a68dd71_c5c0b652","line":134,"range":{"start_line":131,"start_character":0,"end_line":134,"end_character":74},"updated":"2016-01-25 17:36:13.000000000","message":"This doesn\u0027t need to be added in.","commit_id":"12663a5843772531af10572658253593369ca12d"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"9aa51a90093fb0046868b5a9907b3afce0ad592c","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        LOG.debug(\"Creating backup.\")"},{"line_number":129,"context_line":"        backup.backup(context, backup_info)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def get_config_changes(self, cluster_config, mount_point\u003dNone):"},{"line_number":132,"context_line":"        LOG.debug(\"Get configuration changes\")"},{"line_number":133,"context_line":"        raise exception.DatastoreOperationNotSupported("},{"line_number":134,"context_line":"            operation\u003d\u0027get_configuration_changes\u0027, datastore\u003dself.manager)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_903140a5","line":134,"range":{"start_line":131,"start_character":0,"end_line":134,"end_character":74},"in_reply_to":"9a68dd71_c5c0b652","updated":"2016-01-27 21:56:02.000000000","message":"Done","commit_id":"12663a5843772531af10572658253593369ca12d"}],"trove/guestagent/datastore/experimental/db2/system.py":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"729721f5bb12ff3fc1579785700b2d36b7cf0c86","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    \"/opt/ibm/db2/V10.5/instance/db2iauto -off \" + DB2_INSTANCE_OWNER)"},{"line_number":22,"context_line":"START_DB2 \u003d \"db2start\""},{"line_number":23,"context_line":"STOP_DB2 \u003d \"db2 force application all; db2 terminate; db2stop\""},{"line_number":24,"context_line":"STOP_DB2_V2 \u003d \"db2 force application all; db2 terminate\""},{"line_number":25,"context_line":"DB2_STATUS \u003d (\"ps -ef | grep \" + DB2_INSTANCE_OWNER + \" | grep db2sysc |\""},{"line_number":26,"context_line":"              \"grep -v grep | wc -l\")"},{"line_number":27,"context_line":"CREATE_DB_COMMAND \u003d \"db2 create database %(dbname)s\""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_dd48275e","line":24,"range":{"start_line":24,"start_character":55,"end_line":24,"end_character":56},"updated":"2016-01-20 22:33:39.000000000","message":"Why not call this TERMINATE_DB2 and then STOP_DB2\u003dTERMINATE_DB2+ \"; db2stop\" something like that.","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e223ca66d1f31c422b96de1592920c33ef0dc54b","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    \"/opt/ibm/db2/V10.5/instance/db2iauto -off \" + DB2_INSTANCE_OWNER)"},{"line_number":22,"context_line":"START_DB2 \u003d \"db2start\""},{"line_number":23,"context_line":"STOP_DB2 \u003d \"db2 force application all; db2 terminate; db2stop\""},{"line_number":24,"context_line":"STOP_DB2_V2 \u003d \"db2 force application all; db2 terminate\""},{"line_number":25,"context_line":"DB2_STATUS \u003d (\"ps -ef | grep \" + DB2_INSTANCE_OWNER + \" | grep db2sysc |\""},{"line_number":26,"context_line":"              \"grep -v grep | wc -l\")"},{"line_number":27,"context_line":"CREATE_DB_COMMAND \u003d \"db2 create database %(dbname)s\""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_0e2c0faa","line":24,"range":{"start_line":24,"start_character":55,"end_line":24,"end_character":56},"in_reply_to":"9a68dd71_dd48275e","updated":"2016-01-22 00:05:25.000000000","message":"Done","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"}],"trove/guestagent/strategies/backup/experimental/db2_impl.py":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"729721f5bb12ff3fc1579785700b2d36b7cf0c86","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from trove.common import cfg"},{"line_number":18,"context_line":"from trove.common import exception"},{"line_number":19,"context_line":"from trove.common.i18n import _"},{"line_number":20,"context_line":"# from trove.common import utils"},{"line_number":21,"context_line":"from trove.guestagent.common import operating_system"},{"line_number":22,"context_line":"from trove.guestagent.datastore.experimental.db2 import service"},{"line_number":23,"context_line":"from trove.guestagent.datastore.experimental.db2 import system"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_e626c415","line":20,"range":{"start_line":20,"start_character":27,"end_line":20,"end_character":32},"updated":"2016-01-20 22:33:39.000000000","message":"need to remove the above line","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e223ca66d1f31c422b96de1592920c33ef0dc54b","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from trove.common import cfg"},{"line_number":18,"context_line":"from trove.common import exception"},{"line_number":19,"context_line":"from trove.common.i18n import _"},{"line_number":20,"context_line":"# from trove.common import utils"},{"line_number":21,"context_line":"from trove.guestagent.common import operating_system"},{"line_number":22,"context_line":"from trove.guestagent.datastore.experimental.db2 import service"},{"line_number":23,"context_line":"from trove.guestagent.datastore.experimental.db2 import system"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_6e134b67","line":20,"range":{"start_line":20,"start_character":27,"end_line":20,"end_character":32},"in_reply_to":"9a68dd71_e626c415","updated":"2016-01-22 00:05:25.000000000","message":"Done","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"729721f5bb12ff3fc1579785700b2d36b7cf0c86","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            for dbName in dbNames:"},{"line_number":67,"context_line":"                service.run_command(system.BACKUP_DB % {"},{"line_number":68,"context_line":"                    \u0027dbname\u0027: dbName, \u0027dir\u0027: DB2_BACKUP_DIR})"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":71,"context_line":"            LOG.debug(\"Caught exception when preparing the directory\")"},{"line_number":72,"context_line":"            self.cleanup()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_c91711ec","line":69,"updated":"2016-01-20 22:33:39.000000000","message":"why not do the above line in the first for loop itself instead.","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e223ca66d1f31c422b96de1592920c33ef0dc54b","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            for dbName in dbNames:"},{"line_number":67,"context_line":"                service.run_command(system.BACKUP_DB % {"},{"line_number":68,"context_line":"                    \u0027dbname\u0027: dbName, \u0027dir\u0027: DB2_BACKUP_DIR})"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":71,"context_line":"            LOG.debug(\"Caught exception when preparing the directory\")"},{"line_number":72,"context_line":"            self.cleanup()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_5427f163","line":69,"in_reply_to":"9a68dd71_c91711ec","updated":"2016-01-22 00:05:25.000000000","message":"Done","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"729721f5bb12ff3fc1579785700b2d36b7cf0c86","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        \"\"\""},{"line_number":92,"context_line":"        try:"},{"line_number":93,"context_line":"            dbs \u003d self.admin.list_databases()"},{"line_number":94,"context_line":"            size \u003d 0"},{"line_number":95,"context_line":"            for dbname in dbs:"},{"line_number":96,"context_line":"                out \u003d service.run_command(system.GET_DB_SIZE % {\u0027dbname\u0027:"},{"line_number":97,"context_line":"                                                                dbname})"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_acf18bcf","line":94,"updated":"2016-01-20 22:33:39.000000000","message":"You are calling self.admin.list_databases once in this function and again in _run_pre_backup. I think you can just call it once and use the database list in both these functions.","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e223ca66d1f31c422b96de1592920c33ef0dc54b","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        \"\"\""},{"line_number":92,"context_line":"        try:"},{"line_number":93,"context_line":"            dbs \u003d self.admin.list_databases()"},{"line_number":94,"context_line":"            size \u003d 0"},{"line_number":95,"context_line":"            for dbname in dbs:"},{"line_number":96,"context_line":"                out \u003d service.run_command(system.GET_DB_SIZE % {\u0027dbname\u0027:"},{"line_number":97,"context_line":"                                                                dbname})"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_b430ad9f","line":94,"in_reply_to":"9a68dd71_acf18bcf","updated":"2016-01-22 00:05:25.000000000","message":"Done. Created a list_dbnames function and called it from both estimate_dump size and _run_pre_backup.","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"0dc19cfc12a1f409deeea7634f54cc7e8e613374","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            operating_system.chown(DB2_BACKUP_DIR, system.DB2_INSTANCE_OWNER,"},{"line_number":55,"context_line":"                                   system.DB2_INSTANCE_OWNER, as_root\u003dTrue)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            service.run_command(system.TERMINATE_DB2)"},{"line_number":58,"context_line":"            \"\"\""},{"line_number":59,"context_line":"            dbNames \u003d []"},{"line_number":60,"context_line":"            databases, marker \u003d self.admin.list_databases()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a68dd71_a76b21b6","line":57,"updated":"2016-01-25 17:36:13.000000000","message":"I don\u0027t think TERMINATE_DB2 is good enough here. The problem is that you are forcing existing connections off and then closing your own, but it does not prevent new connections. If a user logs into a database between this call and the backup call then the backup will fail. Use this instead of the TERMINATE_DB2 commands: \"QUIESCE INSTANCE DB2INST1 RESTRICTED ACCESS IMMEDIATE FORCE CONNECTIONS\". This will close all existing connections immediately and prevent all non-sys connections from coming in.","commit_id":"12663a5843772531af10572658253593369ca12d"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"9aa51a90093fb0046868b5a9907b3afce0ad592c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            operating_system.chown(DB2_BACKUP_DIR, system.DB2_INSTANCE_OWNER,"},{"line_number":55,"context_line":"                                   system.DB2_INSTANCE_OWNER, as_root\u003dTrue)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            service.run_command(system.TERMINATE_DB2)"},{"line_number":58,"context_line":"            \"\"\""},{"line_number":59,"context_line":"            dbNames \u003d []"},{"line_number":60,"context_line":"            databases, marker \u003d self.admin.list_databases()"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_bfc8c775","line":57,"in_reply_to":"9a68dd71_a76b21b6","updated":"2016-01-27 21:56:02.000000000","message":"Good catch, thanks! I\u0027ve switched from the terminate commands to these.","commit_id":"12663a5843772531af10572658253593369ca12d"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"0dc19cfc12a1f409deeea7634f54cc7e8e613374","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            for dbName in dbNames:"},{"line_number":68,"context_line":"                service.run_command(system.BACKUP_DB % {"},{"line_number":69,"context_line":"                    \u0027dbname\u0027: dbName, \u0027dir\u0027: DB2_BACKUP_DIR})"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":72,"context_line":"            LOG.debug(\"Caught exception when preparing the directory\")"},{"line_number":73,"context_line":"            self.cleanup()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a68dd71_67f0c9c9","line":70,"updated":"2016-01-25 17:36:13.000000000","message":"Now that the backups are done unquiesce the instance with \"UNQUIESCE INSTANCE DB2INST1\".","commit_id":"12663a5843772531af10572658253593369ca12d"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"9aa51a90093fb0046868b5a9907b3afce0ad592c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            for dbName in dbNames:"},{"line_number":68,"context_line":"                service.run_command(system.BACKUP_DB % {"},{"line_number":69,"context_line":"                    \u0027dbname\u0027: dbName, \u0027dir\u0027: DB2_BACKUP_DIR})"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":72,"context_line":"            LOG.debug(\"Caught exception when preparing the directory\")"},{"line_number":73,"context_line":"            self.cleanup()"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_dfc5835b","line":70,"in_reply_to":"9a68dd71_67f0c9c9","updated":"2016-01-27 21:56:02.000000000","message":"Done","commit_id":"12663a5843772531af10572658253593369ca12d"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"72c031efa1ba99f50d1026fd201d554bd89305e0","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                               \u0027avail\u0027: avail})"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            operating_system.create_directory(DB2_BACKUP_DIR, as_root\u003dTrue)"},{"line_number":54,"context_line":"            operating_system.chown(DB2_BACKUP_DIR, system.DB2_INSTANCE_OWNER,"},{"line_number":55,"context_line":"                                   system.DB2_INSTANCE_OWNER, as_root\u003dTrue)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            service.run_command(system.QUIESCE_DB2)"},{"line_number":58,"context_line":"            dbNames \u003d self.list_dbnames()"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a57f1b5_92212450","line":55,"range":{"start_line":54,"start_character":12,"end_line":55,"end_character":75},"updated":"2016-02-10 18:17:48.000000000","message":"No need for two separate calls here. The \u0027create_directory\u0027 function accepts optional \u0027user\u0027 and \u0027group\u0027 arguments.","commit_id":"2bfa8abda7d88cc2a80b3b9a98e0f6298f29d8a0"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"4a909e4160329403236b0e74f6535d64d6cff161","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                               \u0027avail\u0027: avail})"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            operating_system.create_directory(DB2_BACKUP_DIR, as_root\u003dTrue)"},{"line_number":54,"context_line":"            operating_system.chown(DB2_BACKUP_DIR, system.DB2_INSTANCE_OWNER,"},{"line_number":55,"context_line":"                                   system.DB2_INSTANCE_OWNER, as_root\u003dTrue)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            service.run_command(system.QUIESCE_DB2)"},{"line_number":58,"context_line":"            dbNames \u003d self.list_dbnames()"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_2b6990f9","line":55,"range":{"start_line":54,"start_character":12,"end_line":55,"end_character":75},"in_reply_to":"3a57f1b5_92212450","updated":"2016-02-24 09:57:39.000000000","message":"Done","commit_id":"2bfa8abda7d88cc2a80b3b9a98e0f6298f29d8a0"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"ee52445e55bf030a1a3db997f6afa0a029ebdeda","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 IBM Corp"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":17,"id":"9aed3d3a_3f26c716","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2016-02-25 17:14:21.000000000","message":"(+0) I guess it could be 2015-2016 now ;)","commit_id":"35471ce9a1f85eb9069650671d596514f510eb25"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"af410b323821d26e4bd2030016852a14a568e2b9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 IBM Corp"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":17,"id":"9aed3d3a_39d89fef","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"in_reply_to":"9aed3d3a_3f26c716","updated":"2016-02-29 21:22:05.000000000","message":"Done","commit_id":"35471ce9a1f85eb9069650671d596514f510eb25"}],"trove/guestagent/strategies/restore/experimental/db2_impl.py":[{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"ee52445e55bf030a1a3db997f6afa0a029ebdeda","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 IBM Corp"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":17,"id":"9aed3d3a_1fd823ef","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2016-02-25 17:14:21.000000000","message":"(+0) ditto","commit_id":"35471ce9a1f85eb9069650671d596514f510eb25"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"af410b323821d26e4bd2030016852a14a568e2b9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 IBM Corp"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":17,"id":"9aed3d3a_d9ed3390","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"in_reply_to":"9aed3d3a_1fd823ef","updated":"2016-02-29 21:22:05.000000000","message":"Done","commit_id":"35471ce9a1f85eb9069650671d596514f510eb25"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"ee52445e55bf030a1a3db997f6afa0a029ebdeda","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                 self.restore_location)"},{"line_number":48,"context_line":"        operating_system.chmod(self.restore_location, FileMode.SET_FULL,"},{"line_number":49,"context_line":"                               as_root\u003dTrue)"},{"line_number":50,"context_line":"        utils.clean_out(self.restore_location)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def post_restore(self):"},{"line_number":53,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"9aed3d3a_c211c4b1","line":50,"range":{"start_line":50,"start_character":24,"end_line":50,"end_character":45},"updated":"2016-02-25 17:14:21.000000000","message":"(+0) I\u0027m not sure if this will work, since your restore location is DB2_BACKUP_DIR and I believe (IIRC) the restore_location gets set to the mount point by default.  You may need to override it in __init__ to get the functionality to work.","commit_id":"35471ce9a1f85eb9069650671d596514f510eb25"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"af410b323821d26e4bd2030016852a14a568e2b9","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                 self.restore_location)"},{"line_number":48,"context_line":"        operating_system.chmod(self.restore_location, FileMode.SET_FULL,"},{"line_number":49,"context_line":"                               as_root\u003dTrue)"},{"line_number":50,"context_line":"        utils.clean_out(self.restore_location)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def post_restore(self):"},{"line_number":53,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"9aed3d3a_57c81ea8","line":50,"range":{"start_line":50,"start_character":24,"end_line":50,"end_character":45},"in_reply_to":"9aed3d3a_c211c4b1","updated":"2016-02-29 21:22:05.000000000","message":"Done","commit_id":"35471ce9a1f85eb9069650671d596514f510eb25"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"af410b323821d26e4bd2030016852a14a568e2b9","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                 self.restore_location)"},{"line_number":48,"context_line":"        operating_system.chmod(self.restore_location, FileMode.SET_FULL,"},{"line_number":49,"context_line":"                               as_root\u003dTrue)"},{"line_number":50,"context_line":"        utils.clean_out(self.restore_location)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def post_restore(self):"},{"line_number":53,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"9aed3d3a_ac44c1b6","line":50,"range":{"start_line":50,"start_character":24,"end_line":50,"end_character":45},"in_reply_to":"9aed3d3a_c211c4b1","updated":"2016-02-29 21:22:05.000000000","message":"Done","commit_id":"35471ce9a1f85eb9069650671d596514f510eb25"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"ae1154becfbb8959cb8564a9076c42e6177dbfa1","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        self.admin \u003d service.DB2Admin()"},{"line_number":43,"context_line":"        self.restore_location \u003d DB2_BACKUP_DIR"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def pre_restore(self):"},{"line_number":46,"context_line":"        self.app.stop_db()"},{"line_number":47,"context_line":"        LOG.info(_(\"Cleaning out restore location pre: %s.\"),"},{"line_number":48,"context_line":"                 self.restore_location)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afc51ec_c8ed5c27","line":45,"updated":"2016-03-11 15:16:36.000000000","message":"Ishita, what is the purpose of this method. I am not sure it\u0027s needed. I was getting an error in this method, specifically on line 49 complaining that there was no such file or directory. I ran my tests without this method and it worked fine.","commit_id":"9cb23a15fd1253f80a22016f96486025149195df"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"849c6dca376b37bef2c304c598eb42701b91a8db","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        self.admin \u003d service.DB2Admin()"},{"line_number":43,"context_line":"        self.restore_location \u003d DB2_BACKUP_DIR"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def pre_restore(self):"},{"line_number":46,"context_line":"        self.app.stop_db()"},{"line_number":47,"context_line":"        LOG.info(_(\"Cleaning out restore location pre: %s.\"),"},{"line_number":48,"context_line":"                 self.restore_location)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3afc51ec_c02517c3","line":45,"in_reply_to":"3afc51ec_c8ed5c27","updated":"2016-03-12 06:37:56.000000000","message":"The idea was simply to clean the directory before the backup from swift is untarred and placed there but I tested it too and the location doesn\u0027t exist so there is nothing to clean up. I\u0027ve removed the method in this patch set.","commit_id":"9cb23a15fd1253f80a22016f96486025149195df"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"9c6d5b682e68d0a738605d3eb12daf20aab61a89","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":38,"context_line":"        super(DB2Backup, self).__init__(*args, **kwargs)"},{"line_number":39,"context_line":"        self.appStatus \u003d service.DB2AppStatus()"},{"line_number":40,"context_line":"        self.app \u003d service.DB2App(self.appStatus)"},{"line_number":41,"context_line":"        self.admin \u003d service.DB2Admin()"},{"line_number":42,"context_line":"        self.restore_location \u003d DB2_BACKUP_DIR"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def post_restore(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1af94dfe_ef93f2f8","line":41,"range":{"start_line":39,"start_character":0,"end_line":41,"end_character":39},"updated":"2016-03-15 18:12:45.000000000","message":"Looking through the code again, these don\u0027t seem to be used anywhere and could probably be removed if follow-up work is done here (like to fix https://bugs.launchpad.net/trove/+bug/1557694 ;) )","commit_id":"421689e14fb639f0df59468a065578117328bf59"}],"trove/tests/unittests/guestagent/test_db2_manager.py":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"729721f5bb12ff3fc1579785700b2d36b7cf0c86","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            backup.restore.assert_any_call(self.context,"},{"line_number":146,"context_line":"                                           backup_info,"},{"line_number":147,"context_line":"                                           \u0027/home/db2inst1/db2inst1\u0027)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_restart(self):"},{"line_number":150,"context_line":"        mock_status \u003d MagicMock()"},{"line_number":151,"context_line":"        self.manager.appStatus \u003d mock_status"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_f2dbdaeb","line":148,"updated":"2016-01-20 22:33:39.000000000","message":"you dont have a testcase that will actually hit the above case. You need to add a testcase where backup_id is not None.","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e223ca66d1f31c422b96de1592920c33ef0dc54b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            backup.restore.assert_any_call(self.context,"},{"line_number":146,"context_line":"                                           backup_info,"},{"line_number":147,"context_line":"                                           \u0027/home/db2inst1/db2inst1\u0027)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_restart(self):"},{"line_number":150,"context_line":"        mock_status \u003d MagicMock()"},{"line_number":151,"context_line":"        self.manager.appStatus \u003d mock_status"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_c5649223","line":148,"in_reply_to":"9a68dd71_f2dbdaeb","updated":"2016-01-22 00:05:25.000000000","message":"Done","commit_id":"539a9ba4a86eadad46ad9ea8831cc97449c905eb"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"ee52445e55bf030a1a3db997f6afa0a029ebdeda","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _prepare_dynamic(self, packages\u003dNone, databases\u003dNone, users\u003dNone,"},{"line_number":97,"context_line":"                         config_content\u003dNone, device_path\u003d\u0027/dev/vdb\u0027,"},{"line_number":98,"context_line":"                         is_db_installed\u003dTrue, backup_id\u003dNone, overrides\u003dNone):"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        backup_info \u003d {\u0027id\u0027: backup_id,"},{"line_number":101,"context_line":"                       \u0027location\u0027: \u0027fake-location\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9aed3d3a_3fd1a7fc","line":98,"range":{"start_line":98,"start_character":47,"end_line":98,"end_character":61},"updated":"2016-02-25 17:14:21.000000000","message":"You didn\u0027t add a test (like test_prepare_backup) where you pass in a backup_id, so this code is never executed.","commit_id":"35471ce9a1f85eb9069650671d596514f510eb25"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"af410b323821d26e4bd2030016852a14a568e2b9","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _prepare_dynamic(self, packages\u003dNone, databases\u003dNone, users\u003dNone,"},{"line_number":97,"context_line":"                         config_content\u003dNone, device_path\u003d\u0027/dev/vdb\u0027,"},{"line_number":98,"context_line":"                         is_db_installed\u003dTrue, backup_id\u003dNone, overrides\u003dNone):"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        backup_info \u003d {\u0027id\u0027: backup_id,"},{"line_number":101,"context_line":"                       \u0027location\u0027: \u0027fake-location\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9aed3d3a_0614a99d","line":98,"range":{"start_line":98,"start_character":47,"end_line":98,"end_character":61},"in_reply_to":"9aed3d3a_3fd1a7fc","updated":"2016-02-29 21:22:05.000000000","message":"Done","commit_id":"35471ce9a1f85eb9069650671d596514f510eb25"}]}
