)]}'
{"trove/taskmanager/models.py":[{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"7949d25999af1bb8103a2473c0505b71411b9770","unresolved":false,"context_lines":[{"line_number":1046,"context_line":"        LOG.debug(\"Begin _delete_resources for instance %s\" % self.id)"},{"line_number":1047,"context_line":"        server_id \u003d self.db_info.compute_instance_id"},{"line_number":1048,"context_line":"        old_server \u003d self.nova_client.servers.get(server_id)"},{"line_number":1049,"context_line":"        LOG.debug(\"Stopping datastore on instance %s before deleting any \""},{"line_number":1050,"context_line":"                  \"resources.\" % self.id)"},{"line_number":1051,"context_line":"        try:"},{"line_number":1052,"context_line":"            if self.server_status_matches([\u0027ACTIVE\u0027, \u0027SHUTDOWN\u0027], server\u003dself):"},{"line_number":1053,"context_line":"                self.guest.stop_db()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_974043a7","line":1050,"range":{"start_line":1049,"start_character":0,"end_line":1050,"end_character":41},"updated":"2016-06-06 21:08:18.000000000","message":"This should be moved to the \u0027if\u0027 block, since it\u0027s conditional now.","commit_id":"3f514787a8f11fe77639060bb50d7683953ba2c0"},{"author":{"_account_id":5293,"name":"Nikhil","email":"SlickNik@gmail.com","username":"slicknik"},"change_message_id":"e8736d57af0b3516933ca6679a295b6b076a6e99","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"        try:"},{"line_number":1050,"context_line":"            if self.server_status_matches([\u0027ACTIVE\u0027, \u0027SHUTDOWN\u0027], server\u003dself):"},{"line_number":1051,"context_line":"                LOG.debug(\"Stopping datastore on instance %s before deleting \""},{"line_number":1052,"context_line":"                          \"any resources.\" % self.id)"},{"line_number":1053,"context_line":"                self.guest.stop_db()"},{"line_number":1054,"context_line":"        except Exception:"},{"line_number":1055,"context_line":"            LOG.exception(_(\"Error stopping the datastore before attempting \""}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_9f6f552a","line":1052,"updated":"2016-06-08 09:02:09.000000000","message":"If the instance is in SHUTDOWN state, the datastore is already stopped. In that case, I don\u0027t think a stop_db is needed, and the resource can probably be cleaned up.","commit_id":"25ad89fd1d807e4130c763818532075b463536aa"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"dba661169d9934850cc0aac6877938dd9aeb89ff","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"        try:"},{"line_number":1050,"context_line":"            if self.server_status_matches([\u0027ACTIVE\u0027, \u0027SHUTDOWN\u0027], server\u003dself):"},{"line_number":1051,"context_line":"                LOG.debug(\"Stopping datastore on instance %s before deleting \""},{"line_number":1052,"context_line":"                          \"any resources.\" % self.id)"},{"line_number":1053,"context_line":"                self.guest.stop_db()"},{"line_number":1054,"context_line":"        except Exception:"},{"line_number":1055,"context_line":"            LOG.exception(_(\"Error stopping the datastore before attempting \""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a9d85d2_a52604b8","line":1052,"in_reply_to":"5a9d85d2_228a0ac0","updated":"2016-06-20 18:14:18.000000000","message":"Maybe also:\n\n  # The server may have already been marked as \u0027SHUTDOWN\u0027\n  # but attempt anyways since it\u0027s probably still running.\n  # We specifically *don\u0027t* want to run this if the server\n  # is in ERROR or FAILED state, since it\u0027ll result in a\n  # (relatively) long timeout.\n  if self.server_status_matches( ... ):","commit_id":"25ad89fd1d807e4130c763818532075b463536aa"},{"author":{"_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"},"change_message_id":"4d7adc813d3a2f0842f53d042a34f136f917b6b6","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"        try:"},{"line_number":1050,"context_line":"            if self.server_status_matches([\u0027ACTIVE\u0027, \u0027SHUTDOWN\u0027], server\u003dself):"},{"line_number":1051,"context_line":"                LOG.debug(\"Stopping datastore on instance %s before deleting \""},{"line_number":1052,"context_line":"                          \"any resources.\" % self.id)"},{"line_number":1053,"context_line":"                self.guest.stop_db()"},{"line_number":1054,"context_line":"        except Exception:"},{"line_number":1055,"context_line":"            LOG.exception(_(\"Error stopping the datastore before attempting \""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a9d85d2_a531e40d","line":1052,"in_reply_to":"5a9d85d2_a52604b8","updated":"2016-06-20 18:33:18.000000000","message":"Sure, I\u0027ll add the comments in.","commit_id":"25ad89fd1d807e4130c763818532075b463536aa"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"056f38881c29ce0b3ebfb6d2fcfa4a2023ce44d0","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"        try:"},{"line_number":1050,"context_line":"            if self.server_status_matches([\u0027ACTIVE\u0027, \u0027SHUTDOWN\u0027], server\u003dself):"},{"line_number":1051,"context_line":"                LOG.debug(\"Stopping datastore on instance %s before deleting \""},{"line_number":1052,"context_line":"                          \"any resources.\" % self.id)"},{"line_number":1053,"context_line":"                self.guest.stop_db()"},{"line_number":1054,"context_line":"        except Exception:"},{"line_number":1055,"context_line":"            LOG.exception(_(\"Error stopping the datastore before attempting \""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a9d85d2_228a0ac0","line":1052,"in_reply_to":"7aa08908_18e426de","updated":"2016-06-20 18:11:53.000000000","message":"Tested - if this checks for \u0027ACTIVE\u0027 only then the code doesn\u0027t run at all, so it must already be switched to \u0027SHUTDOWN\u0027 even if the command hasn\u0027t run yet.  In theory we could probably just check for \u0027SHUTDOWN\u0027 but it\u0027s safer to do it this way, and (slightly) less confusing.  Maybe a comment is in order:\n\n  # The server may have already been marked as \u0027SHUTDOWN\u0027\n  # but attempt anyways since it\u0027s probably still running\n  if self.server_status_matches( ... ):","commit_id":"25ad89fd1d807e4130c763818532075b463536aa"},{"author":{"_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"},"change_message_id":"69674a08d821dca19b09f606b735e8c36031131e","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"        try:"},{"line_number":1050,"context_line":"            if self.server_status_matches([\u0027ACTIVE\u0027, \u0027SHUTDOWN\u0027], server\u003dself):"},{"line_number":1051,"context_line":"                LOG.debug(\"Stopping datastore on instance %s before deleting \""},{"line_number":1052,"context_line":"                          \"any resources.\" % self.id)"},{"line_number":1053,"context_line":"                self.guest.stop_db()"},{"line_number":1054,"context_line":"        except Exception:"},{"line_number":1055,"context_line":"            LOG.exception(_(\"Error stopping the datastore before attempting \""}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_18e426de","line":1052,"in_reply_to":"7aa08908_95bd986a","updated":"2016-06-13 19:26:59.000000000","message":"The instance is in ACTIVE state before line 1050. On line 1050 when we check the status of the instance, it checks the status on the taskmanager which is DELETING and changes the status of the instance to SHUTDOWN. I don\u0027t believe the db has been stopped by this point.","commit_id":"25ad89fd1d807e4130c763818532075b463536aa"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"5d5933833495f09f4232788d28820f6bb2e2115e","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"        try:"},{"line_number":1050,"context_line":"            if self.server_status_matches([\u0027ACTIVE\u0027, \u0027SHUTDOWN\u0027], server\u003dself):"},{"line_number":1051,"context_line":"                LOG.debug(\"Stopping datastore on instance %s before deleting \""},{"line_number":1052,"context_line":"                          \"any resources.\" % self.id)"},{"line_number":1053,"context_line":"                self.guest.stop_db()"},{"line_number":1054,"context_line":"        except Exception:"},{"line_number":1055,"context_line":"            LOG.exception(_(\"Error stopping the datastore before attempting \""}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_95bd986a","line":1052,"in_reply_to":"7aa08908_9f6f552a","updated":"2016-06-13 10:52:53.000000000","message":"Yes, that could save some time so it is worth making the change.","commit_id":"25ad89fd1d807e4130c763818532075b463536aa"}]}
