)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"e7e99d7e9b28afb187164149e89d3fc31b00451d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     John Griffith \u003cjohn.griffith8@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-10 11:33:06 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Move replication_status update to service.py"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We were using host_init to read replication_status from the"},{"line_number":10,"context_line":"driver and update the service entry in the DB.  It turns out"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5aef4532_a699437b","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":44},"updated":"2016-03-10 18:40:12.000000000","message":"That\u0027s a little out of sync with the code.","commit_id":"541f616cb715c133e5c4a791c11f50313ec0f238"}],"cinder/volume/manager.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"16c2f4a09b2dda7741427e7c1fb196257cc58670","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        stats \u003d self.driver.get_volume_stats(refresh\u003dTrue)"},{"line_number":512,"context_line":"        if stats and stats.get(\u0027replication\u0027, False):"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"            @periodic_task.periodic_task"},{"line_number":515,"context_line":"            def run_replication_task(self, ctxt):"},{"line_number":516,"context_line":"                self._update_replication_relationship_status(ctxt)"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"            self.add_periodic_task(run_replication_task)"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"},{"line_number":521,"context_line":"        try:"},{"line_number":522,"context_line":"            # NOTE(jdg): may be some things to think about here in failover"},{"line_number":523,"context_line":"            # scenarios"},{"line_number":524,"context_line":"            service \u003d objects.Service.get_by_args("},{"line_number":525,"context_line":"                context.get_admin_context(),"},{"line_number":526,"context_line":"                svc_host,"},{"line_number":527,"context_line":"                \u0027cinder-volume\u0027)"},{"line_number":528,"context_line":"        except exception.ServiceNotFound:"},{"line_number":529,"context_line":"            # FIXME(jdg): no idea what we\u0027d do if we hit this case"},{"line_number":530,"context_line":"            LOG.info(_LI(\"Service not found for updating \""},{"line_number":531,"context_line":"                         \"replication_status.\"))"},{"line_number":532,"context_line":"        else:"},{"line_number":533,"context_line":"            if service.replication_status \u003d\u003d ("},{"line_number":534,"context_line":"                    fields.ReplicationStatus.FAILED_OVER):"},{"line_number":535,"context_line":"                pass"},{"line_number":536,"context_line":"            elif stats and stats.get(\u0027replication_enabled\u0027, False):"},{"line_number":537,"context_line":"                service.replication_status \u003d fields.ReplicationStatus.ENABLED"},{"line_number":538,"context_line":"            else:"},{"line_number":539,"context_line":"                service.replication_status \u003d fields.ReplicationStatus.DISABLED"},{"line_number":540,"context_line":"            service.save()"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"        LOG.info(_LI(\"Driver initialization completed successfully.\"),"},{"line_number":543,"context_line":"                 resource\u003d{\u0027type\u0027: \u0027driver\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_788ed82e","side":"PARENT","line":540,"range":{"start_line":514,"start_character":0,"end_line":540,"end_character":26},"updated":"2016-03-10 10:37:30.000000000","message":"Why not simply move whole that stuff into init_host_with_rpc()? It seems that when it is called the service entry is always already in the DB.","commit_id":"b043410f3921c6f1246fd34ebb5fc26b62a6e427"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"69fab519315072bd104b539be94cbecaf0d98b3e","unresolved":false,"context_lines":[{"line_number":519,"context_line":"        LOG.info(_LI(\"Driver initialization completed successfully.\"),"},{"line_number":520,"context_line":"                 resource\u003d{\u0027type\u0027: \u0027driver\u0027,"},{"line_number":521,"context_line":"                           \u0027id\u0027: self.driver.__class__.__name__})"},{"line_number":522,"context_line":"        return replication_status"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    def is_working(self):"},{"line_number":525,"context_line":"        \"\"\"Return if Manager is ready to accept requests."}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_7e6a56b4","line":522,"range":{"start_line":522,"start_character":15,"end_line":522,"end_character":33},"updated":"2016-03-10 00:09:40.000000000","message":"NOTE, I didn\u0027t put a TODO here because we\u0027re on a TODO eradication plan :)\n\nBUT... we should at some point create a generic DS to pass \"any\" service updates similar to what we do currently with model_update for volumes.","commit_id":"00ba7d35b35d8208b85c53319f3dc236bf8650b0"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"1c6c6a58cd8cdc9f4c2b64916c722d132c2ed560","unresolved":false,"context_lines":[{"line_number":529,"context_line":"            LOG.error(_LE(\"Service not found for updating \""},{"line_number":530,"context_line":"                          \"replication_status.\"))"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"        if stats and stats.get(\u0027replication\u0027, False):"},{"line_number":533,"context_line":"            if service.replication_status \u003d\u003d ("},{"line_number":534,"context_line":"                    fields.ReplicationStatus.FAILED_OVER):"},{"line_number":535,"context_line":"                pass"},{"line_number":536,"context_line":"            elif stats and stats.get(\u0027replication_enabled\u0027, False):"},{"line_number":537,"context_line":"                service.replication_status \u003d fields.ReplicationStatus.ENABLED"},{"line_number":538,"context_line":"        else:"},{"line_number":539,"context_line":"            service.replication_status \u003d fields.ReplicationStatus.DISABLED"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        service.save()"},{"line_number":542,"context_line":"        LOG.info(_LI(\"Driver post RPC initialization completed successfully.\"),"},{"line_number":543,"context_line":"                 resource\u003d{\u0027type\u0027: \u0027driver\u0027,"},{"line_number":544,"context_line":"                           \u0027id\u0027: self.driver.__class__.__name__})"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_0bf5a0eb","line":541,"range":{"start_line":532,"start_character":0,"end_line":541,"end_character":22},"updated":"2016-03-10 18:18:24.000000000","message":"This will fail if ServiceNotFound is caught. We should either keep it in try-except clause\u0027s else block or reraise the exception in except clause. Personally I\u0027m in favor of the second solution.","commit_id":"d33334135a25c4c205a629aabccfeed4306cc6fe"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"267e401a29ab6ccd8e43000b8bfd724475e34ae9","unresolved":false,"context_lines":[{"line_number":529,"context_line":"            LOG.error(_LE(\"Service not found for updating \""},{"line_number":530,"context_line":"                          \"replication_status.\"))"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"        if stats and stats.get(\u0027replication\u0027, False):"},{"line_number":533,"context_line":"            if service.replication_status \u003d\u003d ("},{"line_number":534,"context_line":"                    fields.ReplicationStatus.FAILED_OVER):"},{"line_number":535,"context_line":"                pass"},{"line_number":536,"context_line":"            elif stats and stats.get(\u0027replication_enabled\u0027, False):"},{"line_number":537,"context_line":"                service.replication_status \u003d fields.ReplicationStatus.ENABLED"},{"line_number":538,"context_line":"        else:"},{"line_number":539,"context_line":"            service.replication_status \u003d fields.ReplicationStatus.DISABLED"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        service.save()"},{"line_number":542,"context_line":"        LOG.info(_LI(\"Driver post RPC initialization completed successfully.\"),"},{"line_number":543,"context_line":"                 resource\u003d{\u0027type\u0027: \u0027driver\u0027,"},{"line_number":544,"context_line":"                           \u0027id\u0027: self.driver.__class__.__name__})"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_66945b8a","line":541,"range":{"start_line":532,"start_character":0,"end_line":541,"end_character":22},"in_reply_to":"5aef4532_0bf5a0eb","updated":"2016-03-10 18:35:09.000000000","message":"Done","commit_id":"d33334135a25c4c205a629aabccfeed4306cc6fe"}]}
