)]}'
{"trove/guestagent/datastore/service.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"098051ec61216af2095efef8be02ea33eb927d31","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def set_status(self, status, force\u003dFalse):"},{"line_number":107,"context_line":"        \"\"\"Use conductor to update the DB app status.\"\"\""},{"line_number":108,"context_line":"        if not force and self.status \u003d\u003d instance.ServiceStatuses.BUILDING:"},{"line_number":109,"context_line":"            LOG.debug(\"Prepare has not run yet, skipping heartbeat.\")"},{"line_number":110,"context_line":"            return"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_2cb38e0b","line":108,"updated":"2015-08-21 05:36:09.000000000","message":"Just wondering if we shouldn\u0027t also include BUILD_PENDING and FAILED states.","commit_id":"446146d6bb760b2077f1f72b75da74edae029b0b"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"0a30d4bda3b2193f1695e543246cd674f7d58a90","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def set_status(self, status, force\u003dFalse):"},{"line_number":107,"context_line":"        \"\"\"Use conductor to update the DB app status.\"\"\""},{"line_number":108,"context_line":"        if not force and self.status \u003d\u003d instance.ServiceStatuses.BUILDING:"},{"line_number":109,"context_line":"            LOG.debug(\"Prepare has not run yet, skipping heartbeat.\")"},{"line_number":110,"context_line":"            return"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_6e666552","line":108,"range":{"start_line":108,"start_character":25,"end_line":108,"end_character":73},"updated":"2015-08-31 19:10:51.000000000","message":"The first time this is run, self.status could be \u0027None\u0027 in which case the test will fail (and if the database happens to be running at the time, will set the state to \u0027running\u0027).  I suspect this might take more time to get right, but if we\u0027re going to use the current status, how about:\n\n  if not force and not self.is_installed:","commit_id":"446146d6bb760b2077f1f72b75da74edae029b0b"},{"author":{"_account_id":14823,"name":"Pete MacKinnon","email":"pmackinn@redhat.com","username":"pmackinn"},"change_message_id":"05292baaeacc8bf5c4ef15548d535bcec5b75e4f","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def set_status(self, status, force\u003dFalse):"},{"line_number":107,"context_line":"        \"\"\"Use conductor to update the DB app status.\"\"\""},{"line_number":108,"context_line":"        if not force and self.status \u003d\u003d instance.ServiceStatuses.BUILDING:"},{"line_number":109,"context_line":"            LOG.debug(\"Prepare has not run yet, skipping heartbeat.\")"},{"line_number":110,"context_line":"            return"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_c0a872de","line":108,"in_reply_to":"fa1b9901_2cb38e0b","updated":"2015-08-21 16:16:25.000000000","message":"+1 might be cleaner per Petr\u0027s suggestion","commit_id":"446146d6bb760b2077f1f72b75da74edae029b0b"},{"author":{"_account_id":13355,"name":"Edmond Kotowski","email":"ekotowski@gmail.com","username":"ekotowski"},"change_message_id":"0c17c24a13c3640f04af29e1bf540b047290077b","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def set_status(self, status, force\u003dFalse):"},{"line_number":107,"context_line":"        \"\"\"Use conductor to update the DB app status.\"\"\""},{"line_number":108,"context_line":"        if not force and self.status \u003d\u003d instance.ServiceStatuses.BUILDING:"},{"line_number":109,"context_line":"            LOG.debug(\"Prepare has not run yet, skipping heartbeat.\")"},{"line_number":110,"context_line":"            return"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_18ec0cf2","line":108,"in_reply_to":"fa1b9901_c0a872de","updated":"2015-08-25 22:57:11.000000000","message":"Yeah I agree FAILED and BUILD_PENDING should not skip heart beat. I will make this change and test it.","commit_id":"446146d6bb760b2077f1f72b75da74edae029b0b"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"d2ea945d5e110170e8a54ca7c413a9fd1da4f748","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            status \u003d\u003d instance.ServiceStatuses.BUILD_PENDING)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        if (not force_heartbeat_status and not force and"},{"line_number":113,"context_line":"                self.status \u003d\u003d instance.ServiceStatuses.BUILDING):"},{"line_number":114,"context_line":"            LOG.debug(\"Prepare has not run yet, skipping heartbeat.\")"},{"line_number":115,"context_line":"            return"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_a86470b8","line":113,"range":{"start_line":113,"start_character":56,"end_line":113,"end_character":64},"updated":"2015-08-31 20:08:44.000000000","message":"I don\u0027t mind if this fix isn\u0027t perfect (as I think there could be more than one \u0027gotcha\u0027 here), however we should at least check for NEW as well ...","commit_id":"b07c432e3ee4799c0877b1e821ba78ddc9131d55"},{"author":{"_account_id":13355,"name":"Edmond Kotowski","email":"ekotowski@gmail.com","username":"ekotowski"},"change_message_id":"2e0b04c4c4fed19deb120d487a5309827df347c6","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            status \u003d\u003d instance.ServiceStatuses.BUILD_PENDING)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        if (not force_heartbeat_status and not force and"},{"line_number":113,"context_line":"                self.status \u003d\u003d instance.ServiceStatuses.BUILDING):"},{"line_number":114,"context_line":"            LOG.debug(\"Prepare has not run yet, skipping heartbeat.\")"},{"line_number":115,"context_line":"            return"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_48dcb445","line":113,"in_reply_to":"da20952f_a86470b8","updated":"2015-08-31 20:10:51.000000000","message":"Yeah NEW definitely should be here. BUILD_PENDING cannot because its what prepare calls for clusters which is why I made it a force heartbeat status.","commit_id":"b07c432e3ee4799c0877b1e821ba78ddc9131d55"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a2d6742e7827384f5d5aad91806ef3de916c6ebd","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        LOG.debug(\"Successfully cast set_status.\")"},{"line_number":128,"context_line":"        self.status \u003d status"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def update(self):"},{"line_number":131,"context_line":"        \"\"\"Find and report status of DB on this machine."},{"line_number":132,"context_line":"        The database is updated and the status is also returned."},{"line_number":133,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_992ea5a3","line":130,"range":{"start_line":130,"start_character":8,"end_line":130,"end_character":14},"updated":"2015-08-31 19:39:16.000000000","message":"Seems like somebody has already been trying to circumvent this issue. Maybe we should really be calling update(...) and not set_status (except when the guest-agent needs to set status itself). Also note the class comment.","commit_id":"b07c432e3ee4799c0877b1e821ba78ddc9131d55"},{"author":{"_account_id":13355,"name":"Edmond Kotowski","email":"ekotowski@gmail.com","username":"ekotowski"},"change_message_id":"10dbab1a8c940bce4dfd21588213f26b1ac0f2df","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        LOG.debug(\"Successfully cast set_status.\")"},{"line_number":128,"context_line":"        self.status \u003d status"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def update(self):"},{"line_number":131,"context_line":"        \"\"\"Find and report status of DB on this machine."},{"line_number":132,"context_line":"        The database is updated and the status is also returned."},{"line_number":133,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_748e382f","line":130,"in_reply_to":"da20952f_992ea5a3","updated":"2015-08-31 19:47:26.000000000","message":"The problem is the guest_agent calling set_status with status RUNNING before prepare has even ran and stopped the datastore service from running. Then the prepare stops the service and the heartbeat is back to BUILDING. I just read Peter\u0027s recent comment about putting:\nif not force and not self.is_installed instead of just checking \u003d\u003d BUILDING. I am going to test that because if makes sense now that I think about it.","commit_id":"b07c432e3ee4799c0877b1e821ba78ddc9131d55"}]}
