)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"fdda4042701d3d304f8c72da3278fa0778cbe0ba","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"WIP"},{"line_number":14,"context_line":"****************"},{"line_number":15,"context_line":"TODO List:"},{"line_number":16,"context_line":"* Fix up devref docs"},{"line_number":17,"context_line":"* Add unit tests"},{"line_number":18,"context_line":"* Handle the init calls"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3a57f1b5_d56094d1","line":15,"updated":"2016-02-12 01:12:24.000000000","message":"Need to move the api\u0027s from the volume controller too, right?","commit_id":"87afbe2b419b11b0fc759c63d6b5ee00846e0c7e"}],"cinder/api/contrib/admin_actions.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"09b4a2dd1c5aba762cdaf15f94e36e444dc4eb45","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":275,"context_line":"        self.authorize(context, \u0027failover_replication\u0027)"},{"line_number":276,"context_line":"        secondary_id \u003d body[\u0027os-failover_replication\u0027].get(\u0027secondary_id\u0027,"},{"line_number":277,"context_line":"                                                           None)"},{"line_number":278,"context_line":"        freeze \u003d body[\u0027os-failover_replication\u0027].get(\u0027freeze\u0027, False)"},{"line_number":279,"context_line":"        return self.volume_api.failover_replication("},{"line_number":280,"context_line":"            context, host,"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_f747e8b9","line":277,"updated":"2016-02-17 03:25:03.000000000","message":"Nit: None is the default value, so not really necessary. Don\u0027t really care if it\u0027s changed or not, but thought I would point it out if you happen to want to change it.","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"44575d26a330dfc2fa14d8eecc92ce0fed51908b","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":275,"context_line":"        self.authorize(context, \u0027failover_replication\u0027)"},{"line_number":276,"context_line":"        secondary_id \u003d body[\u0027os-failover_replication\u0027].get(\u0027secondary_id\u0027,"},{"line_number":277,"context_line":"                                                           None)"},{"line_number":278,"context_line":"        freeze \u003d body[\u0027os-failover_replication\u0027].get(\u0027freeze\u0027, False)"},{"line_number":279,"context_line":"        return self.volume_api.failover_replication("},{"line_number":280,"context_line":"            context, host,"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_7ea2639a","line":277,"in_reply_to":"dae33548_f747e8b9","updated":"2016-02-17 18:29:07.000000000","message":"Done","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"36f459afd563917d368a76c86e1022e4251d1155","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            context, host,"},{"line_number":280,"context_line":"            freeze, secondary_id)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    @wsgi.action(\u0027os-freeze_host\u0027)"},{"line_number":283,"context_line":"    def _freeze_host(self, req, host, body):"},{"line_number":284,"context_line":"        \"\"\"Freeze a c-vol service."},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        Admin only method, used to freeze"},{"line_number":287,"context_line":"        a backend (c-vol) service.  Freeze means"},{"line_number":288,"context_line":"        that the control plane is set to a ReadOnly"},{"line_number":289,"context_line":"        state on the indicated service.  There can be"},{"line_number":290,"context_line":"        no creates of new volume, or modification to"},{"line_number":291,"context_line":"        existing volumes, however the existing volumes"},{"line_number":292,"context_line":"        are still available for things like attach/detach"},{"line_number":293,"context_line":"        and R/W IO from Instance.  Same effect as if"},{"line_number":294,"context_line":"        one were to disable the scheduler for this host."},{"line_number":295,"context_line":"        host is the output from `cinder service-list`"},{"line_number":296,"context_line":"        \"\"\""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":299,"context_line":"        self.authorize(context, \u0027freeze_host\u0027)"},{"line_number":300,"context_line":"        self.volume_api.freeze_host(context, host)"},{"line_number":301,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    @wsgi.action(\u0027os-thaw_host\u0027)"},{"line_number":304,"context_line":"    def _thaw_host(self, req, host, body):"},{"line_number":305,"context_line":"        \"\"\"Thaw (unfreeze) a frozen c-vol service."},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        Admin only method, used to thaw"},{"line_number":308,"context_line":"        a previously frozen backend (c-vol) service."},{"line_number":309,"context_line":"        host is the output from `cinder service-list`"},{"line_number":310,"context_line":"        \"\"\""},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":313,"context_line":"        self.authorize(context, \u0027thaw_host\u0027)"},{"line_number":314,"context_line":"        self.volume_api.thaw_host(context, host)"},{"line_number":315,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    @wsgi.action(\u0027os-list_replication_targets\u0027)"},{"line_number":318,"context_line":"    def _list_replication_targets(self, req, host, body):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_efea2dda","line":315,"range":{"start_line":282,"start_character":4,"end_line":315,"end_character":45},"updated":"2016-02-18 01:31:12.000000000","message":"These go away, they\u0027re in services module which is more appropriate given what they do.","commit_id":"1728237f27c2ccbf4a87a7ef1d7262ed2418f7d6"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"e27607eef95dba2d86584cadfbd587820e23fd48","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            context, host,"},{"line_number":280,"context_line":"            freeze, secondary_id)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    @wsgi.action(\u0027os-freeze_host\u0027)"},{"line_number":283,"context_line":"    def _freeze_host(self, req, host, body):"},{"line_number":284,"context_line":"        \"\"\"Freeze a c-vol service."},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        Admin only method, used to freeze"},{"line_number":287,"context_line":"        a backend (c-vol) service.  Freeze means"},{"line_number":288,"context_line":"        that the control plane is set to a ReadOnly"},{"line_number":289,"context_line":"        state on the indicated service.  There can be"},{"line_number":290,"context_line":"        no creates of new volume, or modification to"},{"line_number":291,"context_line":"        existing volumes, however the existing volumes"},{"line_number":292,"context_line":"        are still available for things like attach/detach"},{"line_number":293,"context_line":"        and R/W IO from Instance.  Same effect as if"},{"line_number":294,"context_line":"        one were to disable the scheduler for this host."},{"line_number":295,"context_line":"        host is the output from `cinder service-list`"},{"line_number":296,"context_line":"        \"\"\""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":299,"context_line":"        self.authorize(context, \u0027freeze_host\u0027)"},{"line_number":300,"context_line":"        self.volume_api.freeze_host(context, host)"},{"line_number":301,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    @wsgi.action(\u0027os-thaw_host\u0027)"},{"line_number":304,"context_line":"    def _thaw_host(self, req, host, body):"},{"line_number":305,"context_line":"        \"\"\"Thaw (unfreeze) a frozen c-vol service."},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        Admin only method, used to thaw"},{"line_number":308,"context_line":"        a previously frozen backend (c-vol) service."},{"line_number":309,"context_line":"        host is the output from `cinder service-list`"},{"line_number":310,"context_line":"        \"\"\""},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":313,"context_line":"        self.authorize(context, \u0027thaw_host\u0027)"},{"line_number":314,"context_line":"        self.volume_api.thaw_host(context, host)"},{"line_number":315,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    @wsgi.action(\u0027os-list_replication_targets\u0027)"},{"line_number":318,"context_line":"    def _list_replication_targets(self, req, host, body):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_181519e4","line":315,"range":{"start_line":282,"start_character":4,"end_line":315,"end_character":45},"in_reply_to":"dae33548_efea2dda","updated":"2016-02-18 03:37:57.000000000","message":"Whats the plan for the other two api\u0027s? They don\u0027t really make sense to be on the volume controller now either, are they headed to the service one too? Or new replication endpoint(s)?","commit_id":"1728237f27c2ccbf4a87a7ef1d7262ed2418f7d6"}],"cinder/api/contrib/services.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"3d871fa146a1c11e24d604c8147d2702f81e88ce","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        root.set(\u0027binary\u0027)"},{"line_number":68,"context_line":"        root.set(\u0027status\u0027)"},{"line_number":69,"context_line":"        root.set(\u0027disabled_reason\u0027)"},{"line_number":70,"context_line":"        elem.set(\u0027replication_status\u0027)"},{"line_number":71,"context_line":"        elem.set(\u0027active_backend_id\u0027)"},{"line_number":72,"context_line":"        elem.set(\u0027frozen\u0027)"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_92846a0b","line":70,"range":{"start_line":70,"start_character":8,"end_line":70,"end_character":12},"updated":"2016-02-18 02:07:34.000000000","message":"Copy/paste error?","commit_id":"1728237f27c2ccbf4a87a7ef1d7262ed2418f7d6"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8553a06a3172473ae0d4485924b722bbf5d7bbf6","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                                  body[\u0027host\u0027],"},{"line_number":197,"context_line":"                                  body.get(\u0027backend_id\u0027,"},{"line_number":198,"context_line":"                                           None))"},{"line_number":199,"context_line":"        elif id \u003d\u003d \"list_targets\":"},{"line_number":200,"context_line":"            return self._list_targets(context, body[\u0027host\u0027])"},{"line_number":201,"context_line":"        else:"},{"line_number":202,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003d_(\"Unknown action\"))"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"bae84128_8e390aa7","line":200,"range":{"start_line":199,"start_character":0,"end_line":200,"end_character":60},"updated":"2016-02-23 10:50:48.000000000","message":"Is list_targets a good fit for PUT call?","commit_id":"1a66e6db3522b140116b9f4b998fc76803a567fc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"b1cbfc3468e92e02a839f516f61bd8d93139d46a","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                                  body[\u0027host\u0027],"},{"line_number":197,"context_line":"                                  body.get(\u0027backend_id\u0027,"},{"line_number":198,"context_line":"                                           None))"},{"line_number":199,"context_line":"        elif id \u003d\u003d \"list_targets\":"},{"line_number":200,"context_line":"            return self._list_targets(context, body[\u0027host\u0027])"},{"line_number":201,"context_line":"        else:"},{"line_number":202,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003d_(\"Unknown action\"))"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"bae84128_a8001867","line":200,"range":{"start_line":199,"start_character":0,"end_line":200,"end_character":60},"in_reply_to":"bae84128_8e390aa7","updated":"2016-02-24 01:13:11.000000000","message":"Good point, doesn\u0027t really belong here.  Moved it to part of get_capabilities and just nixed the whole call altogether.","commit_id":"1a66e6db3522b140116b9f4b998fc76803a567fc"}],"cinder/db/sqlalchemy/migrate_repo/versions/064_add_replication_info_to_service.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7c9a6af5b6493a291ef6db8ffa15fda65c5daf85","unresolved":false,"context_lines":[{"line_number":1,"context_line":"from sqlalchemy import Column"},{"line_number":2,"context_line":"from sqlalchemy import Boolean, MetaData, String, Table"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_f7ff3f32","line":1,"updated":"2016-02-03 18:05:49.000000000","message":"Don\u0027t forget license header for final version.","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c780e101c318c8cca82aa5eafa00fbd8da1b5c57","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    services \u003d Table(\u0027services\u0027, meta, autoload\u003dTrue)"},{"line_number":23,"context_line":"    replication_status \u003d Column(\u0027replication_status\u0027, String(length\u003d36))"},{"line_number":24,"context_line":"    active_backend_id \u003d Column(\u0027active_backend_id\u0027, String(length\u003d255))"},{"line_number":25,"context_line":"    frozen \u003d Column(\u0027frozen\u0027, Boolean)"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_d095e140","line":23,"range":{"start_line":23,"start_character":4,"end_line":23,"end_character":72},"updated":"2016-02-15 16:02:43.000000000","message":"This has a default on the model, why not adding it here?","commit_id":"23fa7832935dd32b67122541034b84f9b8e6e1b7"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c780e101c318c8cca82aa5eafa00fbd8da1b5c57","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    services \u003d Table(\u0027services\u0027, meta, autoload\u003dTrue)"},{"line_number":23,"context_line":"    replication_status \u003d Column(\u0027replication_status\u0027, String(length\u003d36))"},{"line_number":24,"context_line":"    active_backend_id \u003d Column(\u0027active_backend_id\u0027, String(length\u003d255))"},{"line_number":25,"context_line":"    frozen \u003d Column(\u0027frozen\u0027, Boolean)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    services.create_column(replication_status)"},{"line_number":28,"context_line":"    services.create_column(frozen)"}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_10a0e99e","line":25,"range":{"start_line":25,"start_character":4,"end_line":25,"end_character":38},"updated":"2016-02-15 16:02:43.000000000","message":"ditto","commit_id":"23fa7832935dd32b67122541034b84f9b8e6e1b7"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c780e101c318c8cca82aa5eafa00fbd8da1b5c57","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    services.create_column(frozen)"},{"line_number":29,"context_line":"    services.create_column(active_backend_id)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    services.update().values(replication_status\u003d\"not-capable\").execute()"},{"line_number":32,"context_line":"    services.update().values(frozen\u003dFalse).execute()"},{"line_number":33,"context_line":"    services.update().values(active_backend_id\u003d\"default\").execute()"}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_5088b122","line":33,"range":{"start_line":31,"start_character":0,"end_line":33,"end_character":67},"updated":"2016-02-15 16:02:43.000000000","message":"This will lock the table for a moment, but we don\u0027t expect to have several millions of services, so it shouldn\u0027t be a problem. But how about shrinking this into one SQL query?","commit_id":"23fa7832935dd32b67122541034b84f9b8e6e1b7"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"a1ffe4a7260363f86c5c3276536769f13bd47d7e","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    replication_status \u003d Column(\u0027replication_status\u0027, String(length\u003d36),"},{"line_number":24,"context_line":"                                default\u003d\"not-capable\")"},{"line_number":25,"context_line":"    active_backend_id \u003d Column(\u0027active_backend_id\u0027, String(length\u003d255),"},{"line_number":26,"context_line":"                               default\u003d\"default\")"},{"line_number":27,"context_line":"    frozen \u003d Column(\u0027frozen\u0027, Boolean, default\u003dFalse)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    services.create_column(replication_status)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_3456b729","line":26,"range":{"start_line":26,"start_character":31,"end_line":26,"end_character":48},"updated":"2016-02-15 20:25:02.000000000","message":"From IRC:\n\n \u003cjgriffith\u003e dulek: so it *means* just the NORMAL backend is in use.. no replication target etc... and YES, you\u0027re correct, I think Null is more appropriate\n\nSo we don\u0027t need to specify default key argument here.","commit_id":"5bd0eb42829623b0da4e98960c8d2b7ca8e8374e"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"5e72a45179a63ae397c0097a08ab0bd44cb1d0db","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    replication_status \u003d Column(\u0027replication_status\u0027, String(length\u003d36),"},{"line_number":24,"context_line":"                                default\u003d\"not-capable\")"},{"line_number":25,"context_line":"    active_backend_id \u003d Column(\u0027active_backend_id\u0027, String(length\u003d255),"},{"line_number":26,"context_line":"                               default\u003d\"default\")"},{"line_number":27,"context_line":"    frozen \u003d Column(\u0027frozen\u0027, Boolean, default\u003dFalse)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    services.create_column(replication_status)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_63a07ff5","line":26,"range":{"start_line":26,"start_character":31,"end_line":26,"end_character":48},"in_reply_to":"dae33548_3456b729","updated":"2016-02-15 22:29:23.000000000","message":"Done","commit_id":"5bd0eb42829623b0da4e98960c8d2b7ca8e8374e"}],"cinder/db/sqlalchemy/models.py":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"f908883bb08eefcb6bc1f24efa8e954167058d2a","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    object_current_version \u003d Column(String(36))"},{"line_number":79,"context_line":"    object_available_version \u003d Column(String(36))"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    # replication_status can be: enabled, disabled, not-capable, error,"},{"line_number":82,"context_line":"    # failed-over"},{"line_number":83,"context_line":"    replication_status \u003d Column(String(255), default\u003d\"not-configured\")"},{"line_number":84,"context_line":"    active_backend_id \u003d Column(String(255))"},{"line_number":85,"context_line":"    frozen \u003d Column(Boolean, default\u003dFalse)"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_36eb1415","line":83,"range":{"start_line":81,"start_character":4,"end_line":83,"end_character":70},"updated":"2016-02-06 02:16:38.000000000","message":"Should the comment be updated to have \u0027not-configured\u0027 as a valid status? or should we set the default to disabled or something?","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    object_current_version \u003d Column(String(36))"},{"line_number":79,"context_line":"    object_available_version \u003d Column(String(36))"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    # replication_status can be: enabled, disabled, not-capable, error,"},{"line_number":82,"context_line":"    # failed-over"},{"line_number":83,"context_line":"    replication_status \u003d Column(String(255), default\u003d\"not-configured\")"},{"line_number":84,"context_line":"    active_backend_id \u003d Column(String(255))"},{"line_number":85,"context_line":"    frozen \u003d Column(Boolean, default\u003dFalse)"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_8edb887b","line":83,"range":{"start_line":81,"start_character":4,"end_line":83,"end_character":70},"in_reply_to":"5a5ae5dd_36eb1415","updated":"2016-02-10 20:19:43.000000000","message":"Done","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"}],"cinder/exception.py":[{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"41a239f2a3ea0f19e11f1cd124dee88af6459d14","unresolved":false,"context_lines":[{"line_number":678,"context_line":"                \"Volume %(volume_ref)s already managed.\")"},{"line_number":679,"context_line":""},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"class InvalidReplicationTarget(Invalid):"},{"line_number":682,"context_line":"    message \u003d _(\"Invalid Replication Target (backend_id): %(reason)s\")"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_ec2609cd","line":681,"updated":"2016-02-16 20:22:04.000000000","message":"Is backend_id supposed to be substitutable, i.e. %(backend_id)s","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":678,"context_line":"                \"Volume %(volume_ref)s already managed.\")"},{"line_number":679,"context_line":""},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"class InvalidReplicationTarget(Invalid):"},{"line_number":682,"context_line":"    message \u003d _(\"Invalid Replication Target (backend_id): %(reason)s\")"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_85ff4b66","line":681,"in_reply_to":"dae33548_ec2609cd","updated":"2016-02-16 23:34:50.000000000","message":"Done","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"41a239f2a3ea0f19e11f1cd124dee88af6459d14","unresolved":false,"context_lines":[{"line_number":683,"context_line":""},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"class UnableToFailOver(CinderException):"},{"line_number":686,"context_line":"    message \u003d _(\"Unable to failover to replication target (backend-id):\""},{"line_number":687,"context_line":"                \"%(reason)s).\")"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_2c311106","line":686,"updated":"2016-02-16 20:22:04.000000000","message":"Same question as above","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":683,"context_line":""},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"class UnableToFailOver(CinderException):"},{"line_number":686,"context_line":"    message \u003d _(\"Unable to failover to replication target (backend-id):\""},{"line_number":687,"context_line":"                \"%(reason)s).\")"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_65020771","line":686,"in_reply_to":"dae33548_2c311106","updated":"2016-02-16 23:34:50.000000000","message":"Done","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"}],"cinder/objects/base.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"96f0be97f6348f423424718adb53b81f7121f8d5","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                         \u0027ConsistencyGroup\u0027: \u00271.2\u0027,"},{"line_number":97,"context_line":"                         \u0027ConsistencyGroupList\u0027: \u00271.1\u0027, \u0027Service\u0027: \u00271.1\u0027,"},{"line_number":98,"context_line":"                         \u0027Volume\u0027: \u00271.3\u0027, \u0027VolumeTypeList\u0027: \u00271.1\u0027})"},{"line_number":99,"context_line":"OBJ_VERSIONS.add(\u00271.3\u0027, {\u0027Service\u0027: \u00271.3\u0027, \u0027ServiceList\u0027: \u00271.1\u0027})"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class CinderObjectRegistry(base.VersionedObjectRegistry):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_04ef1d88","line":99,"range":{"start_line":99,"start_character":0,"end_line":99,"end_character":65},"updated":"2016-02-04 11:19:28.000000000","message":"Actually you\u0027re supposed to add a new version. So this line should stay as it is, and you should add below:\n\n OBJ_VERSIONS.add(\u00271.2\u0027, {\u0027Service\u0027: \u00271.3\u0027})","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"20ad688e4be7673cb3a272518a7cfb02e0291afe","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                         \u0027ConsistencyGroup\u0027: \u00271.2\u0027,"},{"line_number":97,"context_line":"                         \u0027ConsistencyGroupList\u0027: \u00271.1\u0027, \u0027Service\u0027: \u00271.1\u0027,"},{"line_number":98,"context_line":"                         \u0027Volume\u0027: \u00271.3\u0027, \u0027VolumeTypeList\u0027: \u00271.1\u0027})"},{"line_number":99,"context_line":"OBJ_VERSIONS.add(\u00271.3\u0027, {\u0027Service\u0027: \u00271.3\u0027, \u0027ServiceList\u0027: \u00271.1\u0027})"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class CinderObjectRegistry(base.VersionedObjectRegistry):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_da9470e3","line":99,"range":{"start_line":99,"start_character":0,"end_line":99,"end_character":65},"in_reply_to":"5a5ae5dd_04ef1d88","updated":"2016-02-04 15:55:48.000000000","message":"Done","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"}],"cinder/objects/fields.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"9d0b35edcb2e09af23113ff45d89d277ecf547b5","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    FAILING_OVER \u003d \u0027failing-over\u0027"},{"line_number":74,"context_line":"    FAILOVER_ERROR \u003d \u0027failover-error\u0027"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    ALL \u003d (ERROR, ENABLED, DISABLED, NOT_CAPABLE, FAILOVER_ERROR)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def __init__(self):"},{"line_number":79,"context_line":"        super(ReplicationStatus, self).__init__("}],"source_content_type":"text/x-python","patch_set":27,"id":"bae84128_c74d74c5","line":76,"range":{"start_line":76,"start_character":4,"end_line":76,"end_character":65},"updated":"2016-02-24 10:38:15.000000000","message":"Whoops, looks like you\u0027ve missed FAILING_OVER here.","commit_id":"967c34a489fbeb3022eeadbb7c48e325b6a33716"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"0a442d3ea8cc2b974c7920c462cdf1093b484974","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    NOT_CAPABLE \u003d \u0027not-capable\u0027"},{"line_number":73,"context_line":"    FAILING_OVER \u003d \u0027failing-over\u0027"},{"line_number":74,"context_line":"    FAILOVER_ERROR \u003d \u0027failover-error\u0027"},{"line_number":75,"context_line":"    FAILOVER_ERROR \u003d \u0027failover-error\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    ALL \u003d (ERROR, ENABLED, DISABLED, NOT_CAPABLE, FAILOVER_ERROR, FAILING_OVER)"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"bae84128_c062653d","line":75,"range":{"start_line":75,"start_character":0,"end_line":75,"end_character":37},"updated":"2016-02-24 16:11:33.000000000","message":"Aww… Duplicated? Won\u0027t it fail pep8?","commit_id":"c9c8d66bdd7d305ca2134904eca28bf2024da3a7"}],"cinder/objects/service.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c780e101c318c8cca82aa5eafa00fbd8da1b5c57","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \u0027object_current_version\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        # Replication properties"},{"line_number":57,"context_line":"        \u0027replication_status\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":58,"context_line":"        \u0027frozen\u0027: fields.BooleanField(default\u003dFalse),"},{"line_number":59,"context_line":"        \u0027active_backend_id\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":60,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_f073c54b","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":64},"updated":"2016-02-15 16:02:43.000000000","message":"This has a default on the model, why not here?","commit_id":"23fa7832935dd32b67122541034b84f9b8e6e1b7"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c780e101c318c8cca82aa5eafa00fbd8da1b5c57","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        # Replication properties"},{"line_number":57,"context_line":"        \u0027replication_status\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":58,"context_line":"        \u0027frozen\u0027: fields.BooleanField(default\u003dFalse),"},{"line_number":59,"context_line":"        \u0027active_backend_id\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":60,"context_line":"    }"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_90999971","line":58,"range":{"start_line":58,"start_character":8,"end_line":58,"end_character":9},"updated":"2016-02-15 16:02:43.000000000","message":"Isn\u0027t this nullable in the model? Maybe it shouldn\u0027t?","commit_id":"23fa7832935dd32b67122541034b84f9b8e6e1b7"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8553a06a3172473ae0d4485924b722bbf5d7bbf6","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \u0027object_current_version\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        # Replication properties"},{"line_number":55,"context_line":"        \u0027replication_status\u0027: fields.StringField("},{"line_number":56,"context_line":"            nullable\u003dTrue,"},{"line_number":57,"context_line":"            default\u003d\"not-capable\"),"},{"line_number":58,"context_line":"        \u0027frozen\u0027: fields.BooleanField(default\u003dFalse),"},{"line_number":59,"context_line":"        \u0027active_backend_id\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":60,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":26,"id":"bae84128_aee04efb","line":57,"range":{"start_line":55,"start_character":0,"end_line":57,"end_character":35},"updated":"2016-02-23 10:50:48.000000000","message":"It would be cool to model it as enum (take a look on [1] for an example).\n\n[1] https://github.com/openstack/cinder/blob/master/cinder/objects/fields.py#L26-L39","commit_id":"1a66e6db3522b140116b9f4b998fc76803a567fc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"b1cbfc3468e92e02a839f516f61bd8d93139d46a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \u0027object_current_version\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        # Replication properties"},{"line_number":55,"context_line":"        \u0027replication_status\u0027: fields.StringField("},{"line_number":56,"context_line":"            nullable\u003dTrue,"},{"line_number":57,"context_line":"            default\u003d\"not-capable\"),"},{"line_number":58,"context_line":"        \u0027frozen\u0027: fields.BooleanField(default\u003dFalse),"},{"line_number":59,"context_line":"        \u0027active_backend_id\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":60,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":26,"id":"bae84128_882ef4f8","line":57,"range":{"start_line":55,"start_character":0,"end_line":57,"end_character":35},"in_reply_to":"bae84128_aee04efb","updated":"2016-02-24 01:13:11.000000000","message":"Yeah, was going to come back to that.. but we know how that goes :)\n\nTake a look, I think I got it all right, but would be great to get your eyes on it.","commit_id":"1a66e6db3522b140116b9f4b998fc76803a567fc"}],"cinder/tests/unit/test_migrations.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"424096294e857b41ef54b3439e85403dbdd3f70e","unresolved":false,"context_lines":[{"line_number":725,"context_line":"        self.assertIsInstance(volume_type_projects.c.id.type,"},{"line_number":726,"context_line":"                              self.INTEGER_TYPE)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    def _check_064(self, engine, data):"},{"line_number":729,"context_line":"        services \u003d db_utils.get_table(engine, \u0027services\u0027)"},{"line_number":730,"context_line":"        self.assertIsInstance(services.c.replication_status.type,"},{"line_number":731,"context_line":"                              self.VARCHAR_TYPE)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_b6a451a6","line":728,"updated":"2016-02-04 04:59:23.000000000","message":"Should this be 063?","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c8edebb032f89be79e1a164739cef385d4888827","unresolved":false,"context_lines":[{"line_number":725,"context_line":"        self.assertIsInstance(volume_type_projects.c.id.type,"},{"line_number":726,"context_line":"                              self.INTEGER_TYPE)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    def _check_064(self, engine, data):"},{"line_number":729,"context_line":"        services \u003d db_utils.get_table(engine, \u0027services\u0027)"},{"line_number":730,"context_line":"        self.assertIsInstance(services.c.replication_status.type,"},{"line_number":731,"context_line":"                              self.VARCHAR_TYPE)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_6f64b9e3","line":728,"range":{"start_line":728,"start_character":8,"end_line":728,"end_character":18},"updated":"2016-02-16 16:07:15.000000000","message":"Should this be 63 instead?","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":725,"context_line":"        self.assertIsInstance(volume_type_projects.c.id.type,"},{"line_number":726,"context_line":"                              self.INTEGER_TYPE)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    def _check_064(self, engine, data):"},{"line_number":729,"context_line":"        services \u003d db_utils.get_table(engine, \u0027services\u0027)"},{"line_number":730,"context_line":"        self.assertIsInstance(services.c.replication_status.type,"},{"line_number":731,"context_line":"                              self.VARCHAR_TYPE)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_c2d2e9ff","line":728,"range":{"start_line":728,"start_character":8,"end_line":728,"end_character":18},"in_reply_to":"dae33548_6f64b9e3","updated":"2016-02-16 23:34:50.000000000","message":"Nope, there\u0027s a 63 to drop iscsi targets table, this migration is in fact 64.","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"}],"cinder/volume/api.py":[{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":1687,"context_line":"                                                vref,"},{"line_number":1688,"context_line":"                                                secondary)"},{"line_number":1689,"context_line":""},{"line_number":1690,"context_line":"    @wrap_check_policy"},{"line_number":1691,"context_line":"    @valid_replication_volume"},{"line_number":1692,"context_line":"    def list_replication_targets(self, ctxt, volume):"},{"line_number":1693,"context_line":""},{"line_number":1694,"context_line":"        # NOTE(jdg): This collects info for the specified volume"},{"line_number":1695,"context_line":"        # it is NOT an error if the volume is not being replicated"},{"line_number":1696,"context_line":"        # also, would be worth having something at a backend/host"},{"line_number":1697,"context_line":"        # level to show an admin how a backend is configured."},{"line_number":1698,"context_line":"        return self.volume_rpcapi.list_replication_targets(ctxt, volume)"},{"line_number":1699,"context_line":""},{"line_number":1700,"context_line":"    def check_volume_filters(self, filters):"},{"line_number":1701,"context_line":"        booleans \u003d self.db.get_booleans_for_table(\u0027volume\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_f7497ed1","side":"PARENT","line":1698,"range":{"start_line":1690,"start_character":4,"end_line":1698,"end_character":72},"updated":"2016-02-03 18:13:24.000000000","message":"Doesn\u0027t this replication version support having multiple backends to replicate to? That was my understanding from reading the spec. If so, I think listing the available backend devices to fail-over to would be beneficial.","commit_id":"7a6f1d8a445fe0820d584222401114ff6a1f8244"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    cinder.policy.enforce(context, _action, target)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def valid_replication_volume(func):"},{"line_number":121,"context_line":"    \"\"\"Check that the volume is capable of replication."},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    This decorator requires the first 3 args of the wrapped function"},{"line_number":124,"context_line":"    to be (self, context, volume)"},{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":"    @functools.wraps(func)"},{"line_number":127,"context_line":"    def wrapped(self, context, volume, *args, **kwargs):"},{"line_number":128,"context_line":"        rep_capable \u003d False"},{"line_number":129,"context_line":"        if volume.get(\u0027volume_type_id\u0027, None):"},{"line_number":130,"context_line":"            extra_specs \u003d volume_types.get_volume_type_extra_specs("},{"line_number":131,"context_line":"                volume.get(\u0027volume_type_id\u0027))"},{"line_number":132,"context_line":"            rep_capable \u003d extra_specs.get(\u0027replication_enabled\u0027,"},{"line_number":133,"context_line":"                                          False) \u003d\u003d \"\u003cis\u003e True\""},{"line_number":134,"context_line":"        if not rep_capable:"},{"line_number":135,"context_line":"            msg \u003d _(\"Volume is not a replication enabled volume, \""},{"line_number":136,"context_line":"                    \"replication operations can only be performed \""},{"line_number":137,"context_line":"                    \"on volumes that are of type replication_enabled.\")"},{"line_number":138,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":139,"context_line":"        return func(self, context, volume, *args, **kwargs)"},{"line_number":140,"context_line":"    return wrapped"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class API(base.Base):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_77e7cee4","line":140,"range":{"start_line":120,"start_character":0,"end_line":140,"end_character":18},"updated":"2016-02-03 18:13:24.000000000","message":"This should be reworked to ensure the entire backend is a valid replication device instead of per volume.","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":1580,"context_line":"        return snapshot_object"},{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":"    @wrap_check_policy"},{"line_number":1583,"context_line":"    @valid_replication_volume"},{"line_number":1584,"context_line":"    def enable_replication(self, ctxt, host):"},{"line_number":1585,"context_line":"        \"\"\"Enable replication on a replication capable/configured driver.\"\"\""},{"line_number":1586,"context_line":"        elevated \u003d ctxt.elevated()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_f7765e3d","line":1583,"range":{"start_line":1583,"start_character":4,"end_line":1583,"end_character":29},"updated":"2016-02-03 18:13:24.000000000","message":"This check should be modified now that we are no longer volume based.","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":1601,"context_line":"        self.volume_rpcapi.enable_replication(ctxt, host)"},{"line_number":1602,"context_line":""},{"line_number":1603,"context_line":"    @wrap_check_policy"},{"line_number":1604,"context_line":"    @valid_replication_volume"},{"line_number":1605,"context_line":"    def disable_replication(self, ctxt, host):"},{"line_number":1606,"context_line":"        elevated \u003d ctxt.elevated()"},{"line_number":1607,"context_line":"        svc_host \u003d volume_utils.extract_host(host, \u0027backend\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_d7948238","line":1604,"range":{"start_line":1604,"start_character":4,"end_line":1604,"end_character":29},"updated":"2016-02-03 18:13:24.000000000","message":"same","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":1621,"context_line":"        self.volume_rpcapi.disable_replication(ctxt, host)"},{"line_number":1622,"context_line":""},{"line_number":1623,"context_line":"    @wrap_check_policy"},{"line_number":1624,"context_line":"    @valid_replication_volume"},{"line_number":1625,"context_line":"    def failover_replication(self,"},{"line_number":1626,"context_line":"                             ctxt,"},{"line_number":1627,"context_line":"                             host,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_57cf3256","line":1624,"range":{"start_line":1624,"start_character":3,"end_line":1624,"end_character":29},"updated":"2016-02-03 18:13:24.000000000","message":"same","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":1644,"context_line":"        self.volume_rpcapi.failover_replication(ctxt, host, freeze, secondary)"},{"line_number":1645,"context_line":""},{"line_number":1646,"context_line":"    @wrap_check_policy"},{"line_number":1647,"context_line":"    @valid_replication_volume"},{"line_number":1648,"context_line":"    def freeze_host(self, ctxt, host):"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"        elevated \u003d ctxt.elevated()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_7744ae73","line":1647,"range":{"start_line":1647,"start_character":4,"end_line":1647,"end_character":29},"updated":"2016-02-03 18:13:24.000000000","message":"same","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":1661,"context_line":"        self.volume_rpcapi.freeze_host(ctxt, host)"},{"line_number":1662,"context_line":""},{"line_number":1663,"context_line":"    @wrap_check_policy"},{"line_number":1664,"context_line":"    @valid_replication_volume"},{"line_number":1665,"context_line":"    def thaw_host(self, ctxt, host):"},{"line_number":1666,"context_line":""},{"line_number":1667,"context_line":"        elevated \u003d ctxt.elevated()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_d74fa290","line":1664,"range":{"start_line":1664,"start_character":4,"end_line":1664,"end_character":29},"updated":"2016-02-03 18:13:24.000000000","message":"same","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":1662,"context_line":""},{"line_number":1663,"context_line":"    @wrap_check_policy"},{"line_number":1664,"context_line":"    @valid_replication_volume"},{"line_number":1665,"context_line":"    def thaw_host(self, ctxt, host):"},{"line_number":1666,"context_line":""},{"line_number":1667,"context_line":"        elevated \u003d ctxt.elevated()"},{"line_number":1668,"context_line":"        svc_host \u003d volume_utils.extract_host(host, \u0027backend\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_77126e64","line":1665,"range":{"start_line":1665,"start_character":8,"end_line":1665,"end_character":17},"updated":"2016-02-03 18:13:24.000000000","message":"This should be consistent. Either unfreeze or thaw.","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":1673,"context_line":"            {\u0027frozen\u0027: False}, expected)"},{"line_number":1674,"context_line":"        if not result:"},{"line_number":1675,"context_line":"            LOG.error(_LE(\u0027Host is NOT Frozen.\u0027))"},{"line_number":1676,"context_line":"        self.volume_rpcapi.thaw_host(ctxt, host)"},{"line_number":1677,"context_line":""},{"line_number":1678,"context_line":"    def check_volume_filters(self, filters):"},{"line_number":1679,"context_line":"        booleans \u003d self.db.get_booleans_for_table(\u0027volume\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_372636cf","line":1676,"range":{"start_line":1676,"start_character":8,"end_line":1676,"end_character":48},"updated":"2016-02-03 18:13:24.000000000","message":"the volume rcapi has this as unfreeze_host rather than thaw_host","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"424096294e857b41ef54b3439e85403dbdd3f70e","unresolved":false,"context_lines":[{"line_number":1673,"context_line":"            {\u0027frozen\u0027: False}, expected)"},{"line_number":1674,"context_line":"        if not result:"},{"line_number":1675,"context_line":"            LOG.error(_LE(\u0027Host is NOT Frozen.\u0027))"},{"line_number":1676,"context_line":"        self.volume_rpcapi.thaw_host(ctxt, host)"},{"line_number":1677,"context_line":""},{"line_number":1678,"context_line":"    def check_volume_filters(self, filters):"},{"line_number":1679,"context_line":"        booleans \u003d self.db.get_booleans_for_table(\u0027volume\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_f612c961","line":1676,"range":{"start_line":1676,"start_character":8,"end_line":1676,"end_character":48},"in_reply_to":"5a5ae5dd_372636cf","updated":"2016-02-04 04:59:23.000000000","message":"+1","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1751d176d4ef4ca9e3c2b1b2d83cf1e8f0242f5","unresolved":false,"context_lines":[{"line_number":1587,"context_line":"                             freeze\u003dTrue,"},{"line_number":1588,"context_line":"                             secondary_id\u003dNone):"},{"line_number":1589,"context_line":""},{"line_number":1590,"context_line":"        elevated \u003d ctxt.elevated()"},{"line_number":1591,"context_line":"        svc_host \u003d volume_utils.extract_host(host, \u0027backend\u0027)"},{"line_number":1592,"context_line":"        service \u003d objects.Service.get_by_host_and_topic("},{"line_number":1593,"context_line":"            elevated, svc_host, CONF.volume_topic)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_9dc16231","line":1590,"updated":"2016-02-10 02:56:39.000000000","message":"These API\u0027s are admin API\u0027s, right?  So should we check if the context has admin role and fail it if not admin, instead of elevating it always?","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":1587,"context_line":"                             freeze\u003dTrue,"},{"line_number":1588,"context_line":"                             secondary_id\u003dNone):"},{"line_number":1589,"context_line":""},{"line_number":1590,"context_line":"        elevated \u003d ctxt.elevated()"},{"line_number":1591,"context_line":"        svc_host \u003d volume_utils.extract_host(host, \u0027backend\u0027)"},{"line_number":1592,"context_line":"        service \u003d objects.Service.get_by_host_and_topic("},{"line_number":1593,"context_line":"            elevated, svc_host, CONF.volume_topic)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_f3abb787","line":1590,"in_reply_to":"3a57f1b5_0655fd4e","updated":"2016-02-10 20:19:43.000000000","message":"Not sure I follow the discussion... there\u0027s a wrap_check_policy decorator on the method to handle policy settings.\n\nThe elevated seems appropriate, particularly if we use policy and someone wants to enable for non-admin user no?","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"bb96c606b047ec2321894553c1a3a632eefc08e4","unresolved":false,"context_lines":[{"line_number":1587,"context_line":"                             freeze\u003dTrue,"},{"line_number":1588,"context_line":"                             secondary_id\u003dNone):"},{"line_number":1589,"context_line":""},{"line_number":1590,"context_line":"        elevated \u003d ctxt.elevated()"},{"line_number":1591,"context_line":"        svc_host \u003d volume_utils.extract_host(host, \u0027backend\u0027)"},{"line_number":1592,"context_line":"        service \u003d objects.Service.get_by_host_and_topic("},{"line_number":1593,"context_line":"            elevated, svc_host, CONF.volume_topic)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_f4517963","line":1590,"in_reply_to":"3a57f1b5_9dc16231","updated":"2016-02-10 13:29:18.000000000","message":"IMO the admin check should be in policy, not enforced in code - several teams are trying to move to more nuanced set of roles than admin / not admin. To start with, it can be useful to be able to separate \u0027block admin\u0027 from \u0027swift admin\u0027 and such. Further to that, a large org might well want to separate out \u0027replication admin\u0027 from certain other block admin tasks, e.g. system admin .v. help desk type roles.\n\nAll of this is possible via policy, without any cinder work, as long as the cinder admin code paths are coded as John has done here.","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"ae38ae9a36b9eea395583f215f4bf7a036e09fb1","unresolved":false,"context_lines":[{"line_number":1587,"context_line":"                             freeze\u003dTrue,"},{"line_number":1588,"context_line":"                             secondary_id\u003dNone):"},{"line_number":1589,"context_line":""},{"line_number":1590,"context_line":"        elevated \u003d ctxt.elevated()"},{"line_number":1591,"context_line":"        svc_host \u003d volume_utils.extract_host(host, \u0027backend\u0027)"},{"line_number":1592,"context_line":"        service \u003d objects.Service.get_by_host_and_topic("},{"line_number":1593,"context_line":"            elevated, svc_host, CONF.volume_topic)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_0655fd4e","line":1590,"in_reply_to":"3a57f1b5_f4517963","updated":"2016-02-10 17:25:04.000000000","message":"Getting enforced in policy sounds right, but I don\u0027t think we need to elevate the context here.  Thoughts?","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ef4f3ff7c1fb0418a3de94ec4d5864a1942d6672","unresolved":false,"context_lines":[{"line_number":1599,"context_line":"                expected[\u0027replication_status\u0027])"},{"line_number":1600,"context_line":"            msg \u003d (_(\u0027Host replication_status must be %s to failover.\u0027)"},{"line_number":1601,"context_line":"                   % expected_status)"},{"line_number":1602,"context_line":"            LOG.error(msg)"},{"line_number":1603,"context_line":"        self.volume_rpcapi.failover_replication(ctxt, host, freeze,"},{"line_number":1604,"context_line":"                                                secondary_id)"},{"line_number":1605,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_3871cc44","line":1602,"range":{"start_line":1602,"start_character":12,"end_line":1602,"end_character":26},"updated":"2016-02-05 19:48:00.000000000","message":"Do we want just an error message here and not an exception?","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"f908883bb08eefcb6bc1f24efa8e954167058d2a","unresolved":false,"context_lines":[{"line_number":1599,"context_line":"                expected[\u0027replication_status\u0027])"},{"line_number":1600,"context_line":"            msg \u003d (_(\u0027Host replication_status must be %s to failover.\u0027)"},{"line_number":1601,"context_line":"                   % expected_status)"},{"line_number":1602,"context_line":"            LOG.error(msg)"},{"line_number":1603,"context_line":"        self.volume_rpcapi.failover_replication(ctxt, host, freeze,"},{"line_number":1604,"context_line":"                                                secondary_id)"},{"line_number":1605,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_56d7b04a","line":1602,"range":{"start_line":1602,"start_character":12,"end_line":1602,"end_character":26},"in_reply_to":"5a5ae5dd_3871cc44","updated":"2016-02-06 02:16:38.000000000","message":"We probably want to raise an exception if its not in a valid status.","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":1599,"context_line":"                expected[\u0027replication_status\u0027])"},{"line_number":1600,"context_line":"            msg \u003d (_(\u0027Host replication_status must be %s to failover.\u0027)"},{"line_number":1601,"context_line":"                   % expected_status)"},{"line_number":1602,"context_line":"            LOG.error(msg)"},{"line_number":1603,"context_line":"        self.volume_rpcapi.failover_replication(ctxt, host, freeze,"},{"line_number":1604,"context_line":"                                                secondary_id)"},{"line_number":1605,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_03a56a45","line":1602,"range":{"start_line":1602,"start_character":12,"end_line":1602,"end_character":26},"in_reply_to":"5a5ae5dd_56d7b04a","updated":"2016-02-10 20:19:43.000000000","message":"I plan to raise, keep in mind this isn\u0027t *done*.  In the case of a host that doesn\u0027t support replication or isn\u0027t configured I\u0027m raising \"InvalidInput\"","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1751d176d4ef4ca9e3c2b1b2d83cf1e8f0242f5","unresolved":false,"context_lines":[{"line_number":1607,"context_line":"    @valid_replication_volume"},{"line_number":1608,"context_line":"    def freeze_host(self, ctxt, host):"},{"line_number":1609,"context_line":""},{"line_number":1610,"context_line":"        elevated \u003d ctxt.elevated()"},{"line_number":1611,"context_line":"        svc_host \u003d volume_utils.extract_host(host, \u0027backend\u0027)"},{"line_number":1612,"context_line":"        service \u003d objects.Service.get_by_host_and_topic("},{"line_number":1613,"context_line":"            elevated, svc_host, CONF.volume_topic)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_3dddce14","line":1610,"updated":"2016-02-10 02:56:39.000000000","message":"Same comment here.","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":1607,"context_line":"    @valid_replication_volume"},{"line_number":1608,"context_line":"    def freeze_host(self, ctxt, host):"},{"line_number":1609,"context_line":""},{"line_number":1610,"context_line":"        elevated \u003d ctxt.elevated()"},{"line_number":1611,"context_line":"        svc_host \u003d volume_utils.extract_host(host, \u0027backend\u0027)"},{"line_number":1612,"context_line":"        service \u003d objects.Service.get_by_host_and_topic("},{"line_number":1613,"context_line":"            elevated, svc_host, CONF.volume_topic)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_939b6372","line":1610,"in_reply_to":"3a57f1b5_3dddce14","updated":"2016-02-10 20:19:43.000000000","message":"Same question as the other one","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1751d176d4ef4ca9e3c2b1b2d83cf1e8f0242f5","unresolved":false,"context_lines":[{"line_number":1624,"context_line":"    @valid_replication_volume"},{"line_number":1625,"context_line":"    def thaw_host(self, ctxt, host):"},{"line_number":1626,"context_line":""},{"line_number":1627,"context_line":"        elevated \u003d ctxt.elevated()"},{"line_number":1628,"context_line":"        svc_host \u003d volume_utils.extract_host(host, \u0027backend\u0027)"},{"line_number":1629,"context_line":"        service \u003d objects.Service.get_by_host_and_topic("},{"line_number":1630,"context_line":"            elevated, svc_host, CONF.volume_topic)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_5de20ad7","line":1627,"updated":"2016-02-10 02:56:39.000000000","message":"Same here.","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":1624,"context_line":"    @valid_replication_volume"},{"line_number":1625,"context_line":"    def thaw_host(self, ctxt, host):"},{"line_number":1626,"context_line":""},{"line_number":1627,"context_line":"        elevated \u003d ctxt.elevated()"},{"line_number":1628,"context_line":"        svc_host \u003d volume_utils.extract_host(host, \u0027backend\u0027)"},{"line_number":1629,"context_line":"        service \u003d objects.Service.get_by_host_and_topic("},{"line_number":1630,"context_line":"            elevated, svc_host, CONF.volume_topic)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_f382d7ff","line":1627,"in_reply_to":"3a57f1b5_5de20ad7","updated":"2016-02-10 20:19:43.000000000","message":"and same","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1751d176d4ef4ca9e3c2b1b2d83cf1e8f0242f5","unresolved":false,"context_lines":[{"line_number":1633,"context_line":"            {\u0027frozen\u0027: False}, expected)"},{"line_number":1634,"context_line":"        if not result:"},{"line_number":1635,"context_line":"            LOG.error(_LE(\u0027Host is NOT Frozen.\u0027))"},{"line_number":1636,"context_line":"        self.volume_rpcapi.thaw_host(ctxt, host)"},{"line_number":1637,"context_line":""},{"line_number":1638,"context_line":"    def check_volume_filters(self, filters):"},{"line_number":1639,"context_line":"        booleans \u003d self.db.get_booleans_for_table(\u0027volume\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_fd59768f","line":1636,"updated":"2016-02-10 02:56:39.000000000","message":"It is unfreeze_host in rpcapi.py.","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":1633,"context_line":"            {\u0027frozen\u0027: False}, expected)"},{"line_number":1634,"context_line":"        if not result:"},{"line_number":1635,"context_line":"            LOG.error(_LE(\u0027Host is NOT Frozen.\u0027))"},{"line_number":1636,"context_line":"        self.volume_rpcapi.thaw_host(ctxt, host)"},{"line_number":1637,"context_line":""},{"line_number":1638,"context_line":"    def check_volume_filters(self, filters):"},{"line_number":1639,"context_line":"        booleans \u003d self.db.get_booleans_for_table(\u0027volume\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_d378fb2d","line":1636,"in_reply_to":"3a57f1b5_fd59768f","updated":"2016-02-10 20:19:43.000000000","message":"Done","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c8edebb032f89be79e1a164739cef385d4888827","unresolved":false,"context_lines":[{"line_number":1689,"context_line":""},{"line_number":1690,"context_line":"    @wrap_check_policy"},{"line_number":1691,"context_line":"    @valid_replication_volume"},{"line_number":1692,"context_line":"    def list_replication_targets(self, ctxt, volume):"},{"line_number":1693,"context_line":""},{"line_number":1694,"context_line":"        # NOTE(jdg): This collects info for the specified volume"},{"line_number":1695,"context_line":"        # it is NOT an error if the volume is not being replicated"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_6f5799ce","side":"PARENT","line":1692,"range":{"start_line":1692,"start_character":4,"end_line":1692,"end_character":53},"updated":"2016-02-16 16:07:15.000000000","message":"list_replication_targets should be brought back here as well.","commit_id":"7b428a9aac5fdc839549e0d204f6da92a0f780a5"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c8edebb032f89be79e1a164739cef385d4888827","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    cinder.policy.enforce(context, _action, target)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def valid_replication_volume(func):"},{"line_number":121,"context_line":"    \"\"\"Check that the volume is capable of replication."},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    This decorator requires the first 3 args of the wrapped function"},{"line_number":124,"context_line":"    to be (self, context, volume)"},{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":"    @functools.wraps(func)"},{"line_number":127,"context_line":"    def wrapped(self, context, volume, *args, **kwargs):"},{"line_number":128,"context_line":"        rep_capable \u003d False"},{"line_number":129,"context_line":"        if volume.get(\u0027volume_type_id\u0027, None):"},{"line_number":130,"context_line":"            extra_specs \u003d volume_types.get_volume_type_extra_specs("},{"line_number":131,"context_line":"                volume.get(\u0027volume_type_id\u0027))"},{"line_number":132,"context_line":"            rep_capable \u003d extra_specs.get(\u0027replication_enabled\u0027,"},{"line_number":133,"context_line":"                                          False) \u003d\u003d \"\u003cis\u003e True\""},{"line_number":134,"context_line":"        if not rep_capable:"},{"line_number":135,"context_line":"            msg \u003d _(\"Volume is not a replication enabled volume, \""},{"line_number":136,"context_line":"                    \"replication operations can only be performed \""},{"line_number":137,"context_line":"                    \"on volumes that are of type replication_enabled.\")"},{"line_number":138,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":139,"context_line":"        return func(self, context, volume, *args, **kwargs)"},{"line_number":140,"context_line":"    return wrapped"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class API(base.Base):"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_6f05d9ba","line":140,"range":{"start_line":120,"start_character":0,"end_line":140,"end_character":18},"updated":"2016-02-16 16:07:15.000000000","message":"This should be removed or modified to represent an entire backend rather than a single volume.","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    cinder.policy.enforce(context, _action, target)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def valid_replication_volume(func):"},{"line_number":121,"context_line":"    \"\"\"Check that the volume is capable of replication."},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    This decorator requires the first 3 args of the wrapped function"},{"line_number":124,"context_line":"    to be (self, context, volume)"},{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":"    @functools.wraps(func)"},{"line_number":127,"context_line":"    def wrapped(self, context, volume, *args, **kwargs):"},{"line_number":128,"context_line":"        rep_capable \u003d False"},{"line_number":129,"context_line":"        if volume.get(\u0027volume_type_id\u0027, None):"},{"line_number":130,"context_line":"            extra_specs \u003d volume_types.get_volume_type_extra_specs("},{"line_number":131,"context_line":"                volume.get(\u0027volume_type_id\u0027))"},{"line_number":132,"context_line":"            rep_capable \u003d extra_specs.get(\u0027replication_enabled\u0027,"},{"line_number":133,"context_line":"                                          False) \u003d\u003d \"\u003cis\u003e True\""},{"line_number":134,"context_line":"        if not rep_capable:"},{"line_number":135,"context_line":"            msg \u003d _(\"Volume is not a replication enabled volume, \""},{"line_number":136,"context_line":"                    \"replication operations can only be performed \""},{"line_number":137,"context_line":"                    \"on volumes that are of type replication_enabled.\")"},{"line_number":138,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":139,"context_line":"        return func(self, context, volume, *args, **kwargs)"},{"line_number":140,"context_line":"    return wrapped"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class API(base.Base):"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_0327c1ca","line":140,"range":{"start_line":120,"start_character":0,"end_line":140,"end_character":18},"in_reply_to":"dae33548_6f05d9ba","updated":"2016-02-16 23:34:50.000000000","message":"This is \"old\" code that has nothing to do with Cheesecake.  It will be removed entireley when I\u0027m ready to do another duel with unit tests and cleanup.","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c8edebb032f89be79e1a164739cef385d4888827","unresolved":false,"context_lines":[{"line_number":1580,"context_line":"        return snapshot_object"},{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":"    @wrap_check_policy"},{"line_number":1583,"context_line":"    @valid_replication_volume"},{"line_number":1584,"context_line":"    def failover_replication(self,"},{"line_number":1585,"context_line":"                             ctxt,"},{"line_number":1586,"context_line":"                             host,"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_0fda4d78","line":1583,"range":{"start_line":1583,"start_character":4,"end_line":1583,"end_character":29},"updated":"2016-02-16 16:07:15.000000000","message":"These should be removed/modified in order to represent a replicated backend now that we are not calling these API methods on individual volumes.","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":1580,"context_line":"        return snapshot_object"},{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":"    @wrap_check_policy"},{"line_number":1583,"context_line":"    @valid_replication_volume"},{"line_number":1584,"context_line":"    def failover_replication(self,"},{"line_number":1585,"context_line":"                             ctxt,"},{"line_number":1586,"context_line":"                             host,"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_631ccd77","line":1583,"range":{"start_line":1583,"start_character":4,"end_line":1583,"end_character":29},"in_reply_to":"dae33548_0fda4d78","updated":"2016-02-16 23:34:50.000000000","message":"Yep, thanks!","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c8edebb032f89be79e1a164739cef385d4888827","unresolved":false,"context_lines":[{"line_number":1607,"context_line":"        return active_backend_id"},{"line_number":1608,"context_line":""},{"line_number":1609,"context_line":"    @wrap_check_policy"},{"line_number":1610,"context_line":"    @valid_replication_volume"},{"line_number":1611,"context_line":"    def freeze_host(self, ctxt, host):"},{"line_number":1612,"context_line":""},{"line_number":1613,"context_line":"        elevated \u003d ctxt.elevated()"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_6fe95914","line":1610,"range":{"start_line":1610,"start_character":4,"end_line":1610,"end_character":29},"updated":"2016-02-16 16:07:15.000000000","message":"Same","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":1607,"context_line":"        return active_backend_id"},{"line_number":1608,"context_line":""},{"line_number":1609,"context_line":"    @wrap_check_policy"},{"line_number":1610,"context_line":"    @valid_replication_volume"},{"line_number":1611,"context_line":"    def freeze_host(self, ctxt, host):"},{"line_number":1612,"context_line":""},{"line_number":1613,"context_line":"        elevated \u003d ctxt.elevated()"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_c54033a8","line":1610,"range":{"start_line":1610,"start_character":4,"end_line":1610,"end_character":29},"in_reply_to":"dae33548_6fe95914","updated":"2016-02-16 23:34:50.000000000","message":"Done","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"41a239f2a3ea0f19e11f1cd124dee88af6459d14","unresolved":false,"context_lines":[{"line_number":1621,"context_line":"            msg \u003d _LE(\u0027Host is already Frozen.\u0027)"},{"line_number":1622,"context_line":"            LOG.error(msg)"},{"line_number":1623,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1624,"context_line":""},{"line_number":1625,"context_line":"        # Set to disabled to keep scheduler calls from being sent?"},{"line_number":1626,"context_line":"        self.volume_rpcapi.freeze_host(ctxt, host)"},{"line_number":1627,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_4c861566","line":1624,"updated":"2016-02-16 20:22:04.000000000","message":"Seems like this comment is a statement, not question.  Could be slightly confusing as is","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":1621,"context_line":"            msg \u003d _LE(\u0027Host is already Frozen.\u0027)"},{"line_number":1622,"context_line":"            LOG.error(msg)"},{"line_number":1623,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1624,"context_line":""},{"line_number":1625,"context_line":"        # Set to disabled to keep scheduler calls from being sent?"},{"line_number":1626,"context_line":"        self.volume_rpcapi.freeze_host(ctxt, host)"},{"line_number":1627,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_a5224fff","line":1624,"in_reply_to":"dae33548_4c861566","updated":"2016-02-16 23:34:50.000000000","message":"Done","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c8edebb032f89be79e1a164739cef385d4888827","unresolved":false,"context_lines":[{"line_number":1626,"context_line":"        self.volume_rpcapi.freeze_host(ctxt, host)"},{"line_number":1627,"context_line":""},{"line_number":1628,"context_line":"    @wrap_check_policy"},{"line_number":1629,"context_line":"    @valid_replication_volume"},{"line_number":1630,"context_line":"    def thaw_host(self, ctxt, host):"},{"line_number":1631,"context_line":""},{"line_number":1632,"context_line":"        elevated \u003d ctxt.elevated()"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_8fd49d47","line":1629,"range":{"start_line":1629,"start_character":4,"end_line":1629,"end_character":29},"updated":"2016-02-16 16:07:15.000000000","message":"Same","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":1626,"context_line":"        self.volume_rpcapi.freeze_host(ctxt, host)"},{"line_number":1627,"context_line":""},{"line_number":1628,"context_line":"    @wrap_check_policy"},{"line_number":1629,"context_line":"    @valid_replication_volume"},{"line_number":1630,"context_line":"    def thaw_host(self, ctxt, host):"},{"line_number":1631,"context_line":""},{"line_number":1632,"context_line":"        elevated \u003d ctxt.elevated()"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_05221b00","line":1629,"range":{"start_line":1629,"start_character":4,"end_line":1629,"end_character":29},"in_reply_to":"dae33548_8fd49d47","updated":"2016-02-16 23:34:50.000000000","message":"Done","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"050b468a307b1417cc254f494a5914040462a86e","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"        result \u003d service.conditional_update("},{"line_number":1598,"context_line":"            {\u0027frozen\u0027: True}, expected)"},{"line_number":1599,"context_line":"        if not result:"},{"line_number":1600,"context_line":"            msg \u003d _LE(\u0027Host is already Frozen.\u0027)"},{"line_number":1601,"context_line":"            LOG.error(msg)"},{"line_number":1602,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1603,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"bae84128_81dbf8ec","line":1600,"updated":"2016-02-25 16:24:35.000000000","message":"This should be _ instead of _LE because it is in the exception.","commit_id":"3ee45099a75d89d8654a76ceb8fcafd3e7ec1365"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"cee8eeb61e98f3fd0c6dc8470396faa612c5c2d5","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"        result \u003d service.conditional_update("},{"line_number":1598,"context_line":"            {\u0027frozen\u0027: True}, expected)"},{"line_number":1599,"context_line":"        if not result:"},{"line_number":1600,"context_line":"            msg \u003d _LE(\u0027Host is already Frozen.\u0027)"},{"line_number":1601,"context_line":"            LOG.error(msg)"},{"line_number":1602,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1603,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_c22544af","line":1600,"in_reply_to":"9aed3d3a_7f1def65","updated":"2016-02-25 17:04:53.000000000","message":"Sure.","commit_id":"3ee45099a75d89d8654a76ceb8fcafd3e7ec1365"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"d849e6c7efb60e7d90644d487a851c4091c812ac","unresolved":false,"context_lines":[{"line_number":1597,"context_line":"        result \u003d service.conditional_update("},{"line_number":1598,"context_line":"            {\u0027frozen\u0027: True}, expected)"},{"line_number":1599,"context_line":"        if not result:"},{"line_number":1600,"context_line":"            msg \u003d _LE(\u0027Host is already Frozen.\u0027)"},{"line_number":1601,"context_line":"            LOG.error(msg)"},{"line_number":1602,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1603,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_7f1def65","line":1600,"in_reply_to":"bae84128_81dbf8ec","updated":"2016-02-25 16:50:48.000000000","message":"Good catch. Can we fix in a follow up?","commit_id":"3ee45099a75d89d8654a76ceb8fcafd3e7ec1365"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"050b468a307b1417cc254f494a5914040462a86e","unresolved":false,"context_lines":[{"line_number":1618,"context_line":"        result \u003d service.conditional_update("},{"line_number":1619,"context_line":"            {\u0027frozen\u0027: False}, expected)"},{"line_number":1620,"context_line":"        if not result:"},{"line_number":1621,"context_line":"            msg \u003d _LE(\u0027Host is NOT Frozen.\u0027)"},{"line_number":1622,"context_line":"            LOG.error(msg)"},{"line_number":1623,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1624,"context_line":"        if not self.volume_rpcapi.thaw_host(ctxt, host):"}],"source_content_type":"text/x-python","patch_set":33,"id":"bae84128_21a2ec4b","line":1621,"updated":"2016-02-25 16:24:35.000000000","message":"Same here","commit_id":"3ee45099a75d89d8654a76ceb8fcafd3e7ec1365"}],"cinder/volume/driver.py":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"f908883bb08eefcb6bc1f24efa8e954167058d2a","unresolved":false,"context_lines":[{"line_number":1836,"context_line":"        raise NotImplementedError()"},{"line_number":1837,"context_line":""},{"line_number":1838,"context_line":"    @abc.abstractmethod"},{"line_number":1839,"context_line":"    def list_replication_targets(self, context, vref):"},{"line_number":1840,"context_line":"        \"\"\"Provide a means to obtain replication targets for a volume."},{"line_number":1841,"context_line":""},{"line_number":1842,"context_line":"        This method is used to query a backend to get the current"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_9650c8d5","side":"PARENT","line":1839,"updated":"2016-02-06 02:16:38.000000000","message":"where did we land on this? should we keep it but just have it return a list of target id\u0027s? (like the thing that would need to be passed in to failover?)","commit_id":"7a6f1d8a445fe0820d584222401114ff6a1f8244"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"f908883bb08eefcb6bc1f24efa8e954167058d2a","unresolved":false,"context_lines":[{"line_number":1750,"context_line":"    \"\"\""},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"    @abc.abstractmethod"},{"line_number":1753,"context_line":"    def enable_replication(self, context):"},{"line_number":1754,"context_line":"        \"\"\"Enable replication on a replication capable backend/host."},{"line_number":1755,"context_line":""},{"line_number":1756,"context_line":"        :param context: security context"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_165b78f7","line":1753,"updated":"2016-02-06 02:16:38.000000000","message":"The enable/disable driver methods should be removed now, right?","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":1750,"context_line":"    \"\"\""},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"    @abc.abstractmethod"},{"line_number":1753,"context_line":"    def enable_replication(self, context):"},{"line_number":1754,"context_line":"        \"\"\"Enable replication on a replication capable backend/host."},{"line_number":1755,"context_line":""},{"line_number":1756,"context_line":"        :param context: security context"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_a366d627","line":1753,"in_reply_to":"5a5ae5dd_165b78f7","updated":"2016-02-10 20:19:43.000000000","message":"Oops, yes","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c3d6e94acfab3e8708d4180f912b9cb3078663f3","unresolved":false,"context_lines":[{"line_number":1768,"context_line":"        raise NotImplementedError()"},{"line_number":1769,"context_line":""},{"line_number":1770,"context_line":"    @abc.abstractmethod"},{"line_number":1771,"context_line":"    def replication_failover(self, context, secondary):"},{"line_number":1772,"context_line":"        \"\"\"Force failover to a secondary replication target."},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"        Instructs the driver to fail-over to the specified replication"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_603a14e9","line":1771,"updated":"2016-02-06 22:00:25.000000000","message":"Swanson brought up a good point about failover I hadn\u0027t considered when talking through this.\n\nOn calling failover I think we\u0027ll need to pass in a list of the volumes to be failed over, even if we are failing over the entire backend. The reason for this is we can\u0027t assume the entire array is dedicated to OpenStack.\n\nWe may have a mix of volumes being replications from array A to array B. On failover to array B we would ideally want to try to kill any replications from the B side to prevent data corruption from any outstanding IO on A that make it through.\n\nIn order to know which replications to kill, we need to know the set of volumes affected. We can\u0027t just look for all volumes replicated from A because we may have some non-OpenStack volumes being replicated that should not be modified.\n\nThoughts?","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":1768,"context_line":"        raise NotImplementedError()"},{"line_number":1769,"context_line":""},{"line_number":1770,"context_line":"    @abc.abstractmethod"},{"line_number":1771,"context_line":"    def replication_failover(self, context, secondary):"},{"line_number":1772,"context_line":"        \"\"\"Force failover to a secondary replication target."},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"        Instructs the driver to fail-over to the specified replication"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_636c5e08","line":1771,"in_reply_to":"5a5ae5dd_603a14e9","updated":"2016-02-10 20:19:43.000000000","message":"Driver should be able to determine which of it\u0027s volumes are OpenStack or for this particular deployment and do what\u0027s needed on it\u0027s own.\n\nThis sort of goes against the use case we talked about though... if the cluster blows up, the cluster blows up.  Also, if they have things conifgured such that they\u0027re using multiple consumers and replicating to the same backend that\u0027s actually easier I think","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":12112,"name":"Tom Swanson","email":"tom_swanson@dell.com","username":"tomswanson"},"change_message_id":"aa868df1c75d26659801acaa14dd22c167d884be","unresolved":false,"context_lines":[{"line_number":1768,"context_line":"        raise NotImplementedError()"},{"line_number":1769,"context_line":""},{"line_number":1770,"context_line":"    @abc.abstractmethod"},{"line_number":1771,"context_line":"    def replication_failover(self, context, secondary):"},{"line_number":1772,"context_line":"        \"\"\"Force failover to a secondary replication target."},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"        Instructs the driver to fail-over to the specified replication"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_2ff4db58","line":1771,"in_reply_to":"5a5ae5dd_603a14e9","updated":"2016-02-08 17:30:00.000000000","message":"Me and Sean discussed this.  We\u0027re good as designed.","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":12112,"name":"Tom Swanson","email":"tom_swanson@dell.com","username":"tomswanson"},"change_message_id":"aa868df1c75d26659801acaa14dd22c167d884be","unresolved":false,"context_lines":[{"line_number":1779,"context_line":""},{"line_number":1780,"context_line":"        :param context: security context"},{"line_number":1781,"context_line":"        :param secondary: Specifies rep target to fail over to"},{"line_number":1782,"context_line":"        :response: active_backend_id"},{"line_number":1783,"context_line":"        \"\"\""},{"line_number":1784,"context_line":"        raise NotImplementedError()"},{"line_number":1785,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_6f7bb3be","line":1782,"range":{"start_line":1782,"start_character":19,"end_line":1782,"end_character":36},"updated":"2016-02-08 17:30:00.000000000","message":"I presume we get this back somewhere?  Failover for the Dell driver would be a non event other than making sure the given secondary exists and can be reached.","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c8edebb032f89be79e1a164739cef385d4888827","unresolved":false,"context_lines":[{"line_number":1836,"context_line":"        raise NotImplementedError()"},{"line_number":1837,"context_line":""},{"line_number":1838,"context_line":"    @abc.abstractmethod"},{"line_number":1839,"context_line":"    def list_replication_targets(self, context, vref):"},{"line_number":1840,"context_line":"        \"\"\"Provide a means to obtain replication targets for a volume."},{"line_number":1841,"context_line":""},{"line_number":1842,"context_line":"        This method is used to query a backend to get the current"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_4f9c5569","side":"PARENT","line":1839,"range":{"start_line":1839,"start_character":4,"end_line":1839,"end_character":54},"updated":"2016-02-16 16:07:15.000000000","message":"list_replication_targets should be brought back here as well","commit_id":"7b428a9aac5fdc839549e0d204f6da92a0f780a5"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":1836,"context_line":"        raise NotImplementedError()"},{"line_number":1837,"context_line":""},{"line_number":1838,"context_line":"    @abc.abstractmethod"},{"line_number":1839,"context_line":"    def list_replication_targets(self, context, vref):"},{"line_number":1840,"context_line":"        \"\"\"Provide a means to obtain replication targets for a volume."},{"line_number":1841,"context_line":""},{"line_number":1842,"context_line":"        This method is used to query a backend to get the current"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_222f55f7","side":"PARENT","line":1839,"range":{"start_line":1839,"start_character":4,"end_line":1839,"end_character":54},"in_reply_to":"dae33548_4f9c5569","updated":"2016-02-16 23:34:50.000000000","message":"I\u0027d prefer to leave it out... it\u0027s sort of  useless IMO, if you want to know what the targets are, look at the config file","commit_id":"7b428a9aac5fdc839549e0d204f6da92a0f780a5"},{"author":{"_account_id":14274,"name":"XinXiaohui","email":"xiaohui.xin@intel.com","username":"XinXiaohui"},"change_message_id":"89f0a7e1d02f9b58b5b87fa259bb05af9d604944","unresolved":false,"context_lines":[{"line_number":1662,"context_line":"    def list_replication_targets(self):"},{"line_number":1663,"context_line":"        \"\"\"Retrieve list of configured/available replication targets."},{"line_number":1664,"context_line":""},{"line_number":1665,"context_line":"        Returns a list of backend_id\u0027s cooresponding to the available"},{"line_number":1666,"context_line":"        replication targets that have been succesfully configured on the"},{"line_number":1667,"context_line":"        backend.  One of these id\u0027s can be used for the failover command."},{"line_number":1668,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_22d4a71e","line":1665,"range":{"start_line":1665,"start_character":39,"end_line":1665,"end_character":52},"updated":"2016-02-21 08:01:06.000000000","message":"s/cooresponding/corresponding","commit_id":"a5531346431d540c53acee30dffd0e3f1201c2f0"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"fedf03492fe9c95cafd16f0ae07f213d749b7ac7","unresolved":false,"context_lines":[{"line_number":1662,"context_line":"    def list_replication_targets(self):"},{"line_number":1663,"context_line":"        \"\"\"Retrieve list of configured/available replication targets."},{"line_number":1664,"context_line":""},{"line_number":1665,"context_line":"        Returns a list of backend_id\u0027s cooresponding to the available"},{"line_number":1666,"context_line":"        replication targets that have been succesfully configured on the"},{"line_number":1667,"context_line":"        backend.  One of these id\u0027s can be used for the failover command."},{"line_number":1668,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_678a2fc1","line":1665,"range":{"start_line":1665,"start_character":39,"end_line":1665,"end_character":52},"in_reply_to":"bae84128_22d4a71e","updated":"2016-02-22 04:43:08.000000000","message":"Done","commit_id":"a5531346431d540c53acee30dffd0e3f1201c2f0"},{"author":{"_account_id":14274,"name":"XinXiaohui","email":"xiaohui.xin@intel.com","username":"XinXiaohui"},"change_message_id":"89f0a7e1d02f9b58b5b87fa259bb05af9d604944","unresolved":false,"context_lines":[{"line_number":1668,"context_line":"        \"\"\""},{"line_number":1669,"context_line":"        raise NotImplementedError()"},{"line_number":1670,"context_line":""},{"line_number":1671,"context_line":"    def failover_host(self, context, volumes, secondary_id\u003dNone):"},{"line_number":1672,"context_line":"        \"\"\"Failover a backend to a secondary replication target."},{"line_number":1673,"context_line":""},{"line_number":1674,"context_line":"        Instructs a replication capable/configured backend to failover"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_3824d6ad","line":1671,"range":{"start_line":1671,"start_character":8,"end_line":1671,"end_character":21},"updated":"2016-02-21 08:01:06.000000000","message":"You have called the function in volume/manager.c in line 3232, but the parameter order is not consistent. In there, you called it as driver.failover_host(context, secondary_id, volumes).","commit_id":"a5531346431d540c53acee30dffd0e3f1201c2f0"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"fedf03492fe9c95cafd16f0ae07f213d749b7ac7","unresolved":false,"context_lines":[{"line_number":1668,"context_line":"        \"\"\""},{"line_number":1669,"context_line":"        raise NotImplementedError()"},{"line_number":1670,"context_line":""},{"line_number":1671,"context_line":"    def failover_host(self, context, volumes, secondary_id\u003dNone):"},{"line_number":1672,"context_line":"        \"\"\"Failover a backend to a secondary replication target."},{"line_number":1673,"context_line":""},{"line_number":1674,"context_line":"        Instructs a replication capable/configured backend to failover"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_47856bab","line":1671,"range":{"start_line":1671,"start_character":8,"end_line":1671,"end_character":21},"in_reply_to":"bae84128_3824d6ad","updated":"2016-02-22 04:43:08.000000000","message":"Done","commit_id":"a5531346431d540c53acee30dffd0e3f1201c2f0"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c4a0bd9c1862ae0e6784fc2654b1ad7380124393","unresolved":false,"context_lines":[{"line_number":1659,"context_line":"        \"\"\""},{"line_number":1660,"context_line":"        return True"},{"line_number":1661,"context_line":""},{"line_number":1662,"context_line":"    def list_replication_targets(self):"},{"line_number":1663,"context_line":"        \"\"\"Retrieve list of configured/available replication targets."},{"line_number":1664,"context_line":""},{"line_number":1665,"context_line":"        Returns a list of backend_id\u0027s coresponding to the available"}],"source_content_type":"text/x-python","patch_set":26,"id":"bae84128_7c45806e","line":1662,"range":{"start_line":1662,"start_character":4,"end_line":1662,"end_character":38},"updated":"2016-02-22 18:32:23.000000000","message":"this should take context as a parameter as well","commit_id":"1a66e6db3522b140116b9f4b998fc76803a567fc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"b1cbfc3468e92e02a839f516f61bd8d93139d46a","unresolved":false,"context_lines":[{"line_number":1659,"context_line":"        \"\"\""},{"line_number":1660,"context_line":"        return True"},{"line_number":1661,"context_line":""},{"line_number":1662,"context_line":"    def list_replication_targets(self):"},{"line_number":1663,"context_line":"        \"\"\"Retrieve list of configured/available replication targets."},{"line_number":1664,"context_line":""},{"line_number":1665,"context_line":"        Returns a list of backend_id\u0027s coresponding to the available"}],"source_content_type":"text/x-python","patch_set":26,"id":"bae84128_ba7b7e27","line":1662,"range":{"start_line":1662,"start_character":4,"end_line":1662,"end_character":38},"in_reply_to":"bae84128_7c45806e","updated":"2016-02-24 01:13:11.000000000","message":"If you need the context I can add it, but I\u0027m not sure why you say it\u0027s needed:","commit_id":"1a66e6db3522b140116b9f4b998fc76803a567fc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"9546c7b9f8db348997797b6a2ca4016838e75498","unresolved":false,"context_lines":[{"line_number":1659,"context_line":"        \"\"\""},{"line_number":1660,"context_line":"        return True"},{"line_number":1661,"context_line":""},{"line_number":1662,"context_line":"    def list_replication_targets(self):"},{"line_number":1663,"context_line":"        \"\"\"Retrieve list of configured/available replication targets."},{"line_number":1664,"context_line":""},{"line_number":1665,"context_line":"        Returns a list of backend_id\u0027s coresponding to the available"}],"source_content_type":"text/x-python","patch_set":26,"id":"bae84128_ff74db36","line":1662,"range":{"start_line":1662,"start_character":4,"end_line":1662,"end_character":38},"in_reply_to":"bae84128_7c45806e","updated":"2016-02-22 21:22:33.000000000","message":"Not following why?  Manager is calling it without sending a context; is there a valid reason we want a context here?  Not objecting, just looking for some detail.","commit_id":"1a66e6db3522b140116b9f4b998fc76803a567fc"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"6bde96a439e6964b0a13e27cbf487a292a194aed","unresolved":false,"context_lines":[{"line_number":1686,"context_line":"                   and model update for volumes"},{"line_number":1687,"context_line":"        \"\"\""},{"line_number":1688,"context_line":""},{"line_number":1689,"context_line":"        # Example volume_updates data structure:"},{"line_number":1690,"context_line":"        # [{\u0027volume_id\u0027: \u003ccinder-uuid\u003e,"},{"line_number":1691,"context_line":"        #   \u0027updates\u0027: {\u0027provider_id\u0027: 8,"},{"line_number":1692,"context_line":"        #               \u0027replication_status\u0027: \u0027failed-over\u0027,"},{"line_number":1693,"context_line":"        #               \u0027replication_extended_status\u0027: \u0027whatever\u0027,...}},]"},{"line_number":1694,"context_line":"        raise NotImplementedError()"},{"line_number":1695,"context_line":""},{"line_number":1696,"context_line":"    def get_replication_updates(self, context):"}],"source_content_type":"text/x-python","patch_set":32,"id":"bae84128_4fa944df","line":1693,"range":{"start_line":1689,"start_character":7,"end_line":1693,"end_character":73},"updated":"2016-02-25 02:35:01.000000000","message":"Should probably remove this","commit_id":"6c287f7e77e5804841c0c4219717b1e59f9eca54"}],"cinder/volume/manager.py":[{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":3236,"context_line":"        LOG.info(_LI(\"Disabled replication processes on backend.\"))"},{"line_number":3237,"context_line":"        return True"},{"line_number":3238,"context_line":""},{"line_number":3239,"context_line":"    def failover_replication(self, context, host\u003dNone):"},{"line_number":3240,"context_line":"        \"\"\"Failover a backend to a secondary replication target."},{"line_number":3241,"context_line":""},{"line_number":3242,"context_line":"        Instructs a replication capable/configured backend to failover"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_17fa1a43","line":3239,"range":{"start_line":3239,"start_character":44,"end_line":3239,"end_character":54},"updated":"2016-02-03 18:13:24.000000000","message":"So the idea here is we have another configured cinder backend that represents the backend to fail-over to? So the original driver instance does not handle all provisioning requests from here on out?","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"752611dda3d956ba4ccf94933bc71290dfb6042f","unresolved":false,"context_lines":[{"line_number":3236,"context_line":"        LOG.info(_LI(\"Disabled replication processes on backend.\"))"},{"line_number":3237,"context_line":"        return True"},{"line_number":3238,"context_line":""},{"line_number":3239,"context_line":"    def failover_replication(self, context, host\u003dNone):"},{"line_number":3240,"context_line":"        \"\"\"Failover a backend to a secondary replication target."},{"line_number":3241,"context_line":""},{"line_number":3242,"context_line":"        Instructs a replication capable/configured backend to failover"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_2587cfb6","line":3239,"range":{"start_line":3239,"start_character":44,"end_line":3239,"end_character":54},"in_reply_to":"5a5ae5dd_17fa1a43","updated":"2016-02-04 00:11:08.000000000","message":"No, I chose a VERY poor name for the parameter.  This should be:\n\"backend_id\" or whatever we specified as the ID for the targets in the cinder.conf file.\n\nI\u0027ll make sure that\u0027s fixed in the next push.","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7c9a6af5b6493a291ef6db8ffa15fda65c5daf85","unresolved":false,"context_lines":[{"line_number":3242,"context_line":"        Instructs a replication capable/configured backend to failover"},{"line_number":3243,"context_line":"        to one of it\u0027s secondary replication targets. host\u003dNone is"},{"line_number":3244,"context_line":"        an acceptable input, and leaves it to the driver to failover"},{"line_number":3245,"context_line":"        to the only configured target, or to choose a target on it\u0027s"},{"line_number":3246,"context_line":"        own."},{"line_number":3247,"context_line":""},{"line_number":3248,"context_line":"        :param context: security context"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_77b4aef1","line":3245,"range":{"start_line":3245,"start_character":64,"end_line":3245,"end_character":66},"updated":"2016-02-03 18:05:49.000000000","message":"/it\u0027s/its/ :P","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7c9a6af5b6493a291ef6db8ffa15fda65c5daf85","unresolved":false,"context_lines":[{"line_number":3253,"context_line":"        try:"},{"line_number":3254,"context_line":"            self.driver.failover_replication(context,"},{"line_number":3255,"context_line":"                                             host)"},{"line_number":3256,"context_line":"        except exception.CinderException:"},{"line_number":3257,"context_line":"            pass"},{"line_number":3258,"context_line":"        except Exception:"},{"line_number":3259,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_179d3a65","line":3256,"updated":"2016-02-03 18:05:49.000000000","message":"We can probably remove the CinderException handler since the next Exception one will catch it too and does the same thing.\n\nIf something does happen in failover_replication, is there anything to do here? It just falls through to say it was successful no matter what happens.","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7c9a6af5b6493a291ef6db8ffa15fda65c5daf85","unresolved":false,"context_lines":[{"line_number":3261,"context_line":"        return True"},{"line_number":3262,"context_line":""},{"line_number":3263,"context_line":"    def freeze_host(self, context):"},{"line_number":3264,"context_line":"        \"\"\"Freeze managemnt plane on this backend."},{"line_number":3265,"context_line":""},{"line_number":3266,"context_line":"        Basically puts the control/management plane into a"},{"line_number":3267,"context_line":"        Read Only state.  We should handle this in the scheduler,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_17abfa75","line":3264,"range":{"start_line":3264,"start_character":18,"end_line":3264,"end_character":27},"updated":"2016-02-03 18:05:49.000000000","message":"management","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7c9a6af5b6493a291ef6db8ffa15fda65c5daf85","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"        needs/wants to do something specific on the backend."},{"line_number":3270,"context_line":""},{"line_number":3271,"context_line":"        :param context: security context"},{"line_number":3272,"context_line":"        \"\"\""},{"line_number":3273,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3274,"context_line":"        return True"},{"line_number":3275,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_d7e242d5","line":3272,"updated":"2016-02-03 18:05:49.000000000","message":"self.driver.freeze_backend() ?","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"424096294e857b41ef54b3439e85403dbdd3f70e","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"        needs/wants to do something specific on the backend."},{"line_number":3270,"context_line":""},{"line_number":3271,"context_line":"        :param context: security context"},{"line_number":3272,"context_line":"        \"\"\""},{"line_number":3273,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3274,"context_line":"        return True"},{"line_number":3275,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_d6fead37","line":3272,"in_reply_to":"5a5ae5dd_d7e242d5","updated":"2016-02-04 04:59:23.000000000","message":"+1","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"1c1a19b5103a234f8ecb218f3113745912527bdd","unresolved":false,"context_lines":[{"line_number":3274,"context_line":"        return True"},{"line_number":3275,"context_line":""},{"line_number":3276,"context_line":"    def unfreeze_host(self, context):"},{"line_number":3277,"context_line":"        \"\"\"UnFreeze managemnt plane on this backend."},{"line_number":3278,"context_line":""},{"line_number":3279,"context_line":"        Basically puts the control/management plane back into"},{"line_number":3280,"context_line":"        a normal state.  We should handle this in the scheduler,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_578732b5","line":3277,"range":{"start_line":3277,"start_character":20,"end_line":3277,"end_character":29},"updated":"2016-02-03 18:13:24.000000000","message":"management","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7c9a6af5b6493a291ef6db8ffa15fda65c5daf85","unresolved":false,"context_lines":[{"line_number":3282,"context_line":"        needs/wants to do something specific on the backend."},{"line_number":3283,"context_line":""},{"line_number":3284,"context_line":"        :param context: security context"},{"line_number":3285,"context_line":"        \"\"\""},{"line_number":3286,"context_line":"        LOG.info(_LI(\"Unfroze backend successfully.\"))"},{"line_number":3287,"context_line":"        return True"},{"line_number":3288,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_97eccac8","line":3285,"updated":"2016-02-03 18:05:49.000000000","message":"self.driver.unfreeze_backend() ?","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"424096294e857b41ef54b3439e85403dbdd3f70e","unresolved":false,"context_lines":[{"line_number":3282,"context_line":"        needs/wants to do something specific on the backend."},{"line_number":3283,"context_line":""},{"line_number":3284,"context_line":"        :param context: security context"},{"line_number":3285,"context_line":"        \"\"\""},{"line_number":3286,"context_line":"        LOG.info(_LI(\"Unfroze backend successfully.\"))"},{"line_number":3287,"context_line":"        return True"},{"line_number":3288,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_96f8354b","line":3285,"in_reply_to":"5a5ae5dd_97eccac8","updated":"2016-02-04 04:59:23.000000000","message":"+1","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1751d176d4ef4ca9e3c2b1b2d83cf1e8f0242f5","unresolved":false,"context_lines":[{"line_number":204,"context_line":"class VolumeManager(manager.SchedulerDependentManager):"},{"line_number":205,"context_line":"    \"\"\"Manages attachable block storage devices.\"\"\""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    RPC_API_VERSION \u003d \u00271.37\u0027"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_7de586a6","line":207,"updated":"2016-02-10 02:56:39.000000000","message":"1.38","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":204,"context_line":"class VolumeManager(manager.SchedulerDependentManager):"},{"line_number":205,"context_line":"    \"\"\"Manages attachable block storage devices.\"\"\""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    RPC_API_VERSION \u003d \u00271.37\u0027"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_5393ab4f","line":207,"in_reply_to":"3a57f1b5_7de586a6","updated":"2016-02-10 20:19:43.000000000","message":"Done","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ef4f3ff7c1fb0418a3de94ec4d5864a1942d6672","unresolved":false,"context_lines":[{"line_number":3209,"context_line":"            self.driver.failover_replication(context,"},{"line_number":3210,"context_line":"                                             bakckend_id)"},{"line_number":3211,"context_line":"        except exception.CinderException:"},{"line_number":3212,"context_line":"            pass"},{"line_number":3213,"context_line":"        except Exception:"},{"line_number":3214,"context_line":"            pass"},{"line_number":3215,"context_line":"        LOG.info(_LI(\"Failed over to replication target successfully.\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_783e6429","line":3212,"range":{"start_line":3212,"start_character":12,"end_line":3212,"end_character":16},"updated":"2016-02-05 19:48:00.000000000","message":"Planning to add new exceptions here?","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"f908883bb08eefcb6bc1f24efa8e954167058d2a","unresolved":false,"context_lines":[{"line_number":3209,"context_line":"            self.driver.failover_replication(context,"},{"line_number":3210,"context_line":"                                             bakckend_id)"},{"line_number":3211,"context_line":"        except exception.CinderException:"},{"line_number":3212,"context_line":"            pass"},{"line_number":3213,"context_line":"        except Exception:"},{"line_number":3214,"context_line":"            pass"},{"line_number":3215,"context_line":"        LOG.info(_LI(\"Failed over to replication target successfully.\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_f60c9ced","line":3212,"range":{"start_line":3212,"start_character":12,"end_line":3212,"end_character":16},"in_reply_to":"5a5ae5dd_783e6429","updated":"2016-02-06 02:16:38.000000000","message":"If we are, I would like to request a shared one drivers can use to basically say \"the specified secondary is invalid, but you can still try and fail-over with a different one\"","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1751d176d4ef4ca9e3c2b1b2d83cf1e8f0242f5","unresolved":false,"context_lines":[{"line_number":3225,"context_line":""},{"line_number":3226,"context_line":"        :param context: security context"},{"line_number":3227,"context_line":"        \"\"\""},{"line_number":3228,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3229,"context_line":"        return True"},{"line_number":3230,"context_line":""},{"line_number":3231,"context_line":"    def unfreeze_host(self, context):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_7d4906d0","line":3228,"updated":"2016-02-10 02:56:39.000000000","message":"Do we need to call the driver function freeze_backend?","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":3225,"context_line":""},{"line_number":3226,"context_line":"        :param context: security context"},{"line_number":3227,"context_line":"        \"\"\""},{"line_number":3228,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3229,"context_line":"        return True"},{"line_number":3230,"context_line":""},{"line_number":3231,"context_line":"    def unfreeze_host(self, context):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_b3a45fa6","line":3228,"in_reply_to":"3a57f1b5_7d4906d0","updated":"2016-02-10 20:19:43.000000000","message":"Done","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1751d176d4ef4ca9e3c2b1b2d83cf1e8f0242f5","unresolved":false,"context_lines":[{"line_number":3238,"context_line":""},{"line_number":3239,"context_line":"        :param context: security context"},{"line_number":3240,"context_line":"        \"\"\""},{"line_number":3241,"context_line":"        LOG.info(_LI(\"Unfroze backend successfully.\"))"},{"line_number":3242,"context_line":"        return True"},{"line_number":3243,"context_line":""},{"line_number":3244,"context_line":"    def manage_existing_snapshot(self, ctxt, snapshot, ref\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_fd0bb67b","line":3241,"updated":"2016-02-10 02:56:39.000000000","message":"Do we need to call the driver function unfreeze_backend?","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":3238,"context_line":""},{"line_number":3239,"context_line":"        :param context: security context"},{"line_number":3240,"context_line":"        \"\"\""},{"line_number":3241,"context_line":"        LOG.info(_LI(\"Unfroze backend successfully.\"))"},{"line_number":3242,"context_line":"        return True"},{"line_number":3243,"context_line":""},{"line_number":3244,"context_line":"    def manage_existing_snapshot(self, ctxt, snapshot, ref\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_93a9237e","line":3241,"in_reply_to":"3a57f1b5_fd0bb67b","updated":"2016-02-10 20:19:43.000000000","message":"Done","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"fdda4042701d3d304f8c72da3278fa0778cbe0ba","unresolved":false,"context_lines":[{"line_number":461,"context_line":""},{"line_number":462,"context_line":"        # conditionally run replication status task"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        # FIXME(jdg): This should go away or be handled differently"},{"line_number":465,"context_line":"        #  if/when we\u0027re ready for V2 replication"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        stats \u003d self.driver.get_volume_stats(refresh\u003dTrue)"},{"line_number":468,"context_line":"        if stats and stats.get(\u0027replication\u0027, False):"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"            @periodic_task.periodic_task"},{"line_number":471,"context_line":"            def run_replication_task(self, ctxt):"},{"line_number":472,"context_line":"                self._update_replication_relationship_status(ctxt)"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"            self.add_periodic_task(run_replication_task)"},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        LOG.info(_LI(\"Driver initialization completed successfully.\"),"},{"line_number":477,"context_line":"                 resource\u003d{\u0027type\u0027: \u0027driver\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a57f1b5_404b842a","line":474,"range":{"start_line":464,"start_character":8,"end_line":474,"end_character":56},"updated":"2016-02-12 01:12:24.000000000","message":"Can we delete/disable this yet?","commit_id":"87afbe2b419b11b0fc759c63d6b5ee00846e0c7e"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"fdda4042701d3d304f8c72da3278fa0778cbe0ba","unresolved":false,"context_lines":[{"line_number":3213,"context_line":"            context.elevated, svc_host,"},{"line_number":3214,"context_line":"            CONF.volume_topic)"},{"line_number":3215,"context_line":"        volumes \u003d objects.VolumeList.get_all_by_host(context, self.host)"},{"line_number":3216,"context_line":"        try:"},{"line_number":3217,"context_line":"            active_backend_id \u003d self.driver.failover_replication("},{"line_number":3218,"context_line":"                context,"},{"line_number":3219,"context_line":"                secondary_backend_id,"},{"line_number":3220,"context_line":"                volumes)"},{"line_number":3221,"context_line":"        except exception.VolumeDriverException:"},{"line_number":3222,"context_line":"            LOG.exception(_LE(\"Failed failover_replication call to driver\"))"},{"line_number":3223,"context_line":"            service.status \u003d \u0027error\u0027"},{"line_number":3224,"context_line":"            service.save()"},{"line_number":3225,"context_line":"            return None"},{"line_number":3226,"context_line":"        # NOTE(jdg) currently this is a call so we\u0027re waiting for the response"},{"line_number":3227,"context_line":"        # back at the API layer. This may or may not be problematic for some"},{"line_number":3228,"context_line":"        # backends (rpc timeout?)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a57f1b5_d5041419","line":3225,"range":{"start_line":3216,"start_character":8,"end_line":3225,"end_character":23},"updated":"2016-02-12 01:12:24.000000000","message":"Can we add a mechanism here for a driver to handle an invalid \u0027secondary\u0027 argument?\n\nRight now the driver could either ignore it and run as if one was not specified, not do anything but get the status to \u0027failed-over\u0027, or raise an exception to get an \u0027error\u0027 state.\n\nI see a few ways we could deal with this. We could allow for a model_update from the driver so it could return back a status\u003d\u0027enabled\u0027 or whatever kind of thing to essentially turn the driver method into a noop. We could also have some shared driver exception defined and caught here to signify that, it could leave the status alone and since we are blocking it could even give back a 400 or something for the failover command. I tend to favor the exception, but maybe the model update maybe wouldn\u0027t be so bad since we are already specifying a new active_backend_id anyway.\n\nMaybe in the future, if we have a list_replication_targets driver api, the c-api service could call and block on that to validate that secondary matches one of the id\u0027s, then call (or cast) the failover call if it passed that first round of validation. But, for our first (second?) iteration our validation can only happen in the driver.\n\nAnyway... for now what I want to avoid is a typo in the failover command to cause the backend to be stuck in a state that is actually OK to try and failover again, but to un-stick the cinder side we need to modify the db to sync the status to real-life. Make sense?","commit_id":"87afbe2b419b11b0fc759c63d6b5ee00846e0c7e"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c780e101c318c8cca82aa5eafa00fbd8da1b5c57","unresolved":false,"context_lines":[{"line_number":3259,"context_line":"        return True"},{"line_number":3260,"context_line":""},{"line_number":3261,"context_line":"    def thaw_host(self, context):"},{"line_number":3262,"context_line":"        \"\"\"UnFreeze managemnt plane on this backend."},{"line_number":3263,"context_line":""},{"line_number":3264,"context_line":"        Basically puts the control/management plane back into"},{"line_number":3265,"context_line":"        a normal state.  We should handle this in the scheduler,"}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_50b6f1dc","line":3262,"range":{"start_line":3262,"start_character":20,"end_line":3262,"end_character":29},"updated":"2016-02-15 16:02:43.000000000","message":"typo","commit_id":"23fa7832935dd32b67122541034b84f9b8e6e1b7"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c780e101c318c8cca82aa5eafa00fbd8da1b5c57","unresolved":false,"context_lines":[{"line_number":3263,"context_line":""},{"line_number":3264,"context_line":"        Basically puts the control/management plane back into"},{"line_number":3265,"context_line":"        a normal state.  We should handle this in the scheduler,"},{"line_number":3266,"context_line":"        however this is provided to let the driver know incase it"},{"line_number":3267,"context_line":"        needs/wants to do something specific on the backend."},{"line_number":3268,"context_line":""},{"line_number":3269,"context_line":"        :param context: security context"}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_90b079df","line":3266,"range":{"start_line":3266,"start_character":56,"end_line":3266,"end_character":62},"updated":"2016-02-15 16:02:43.000000000","message":"typo","commit_id":"23fa7832935dd32b67122541034b84f9b8e6e1b7"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c8edebb032f89be79e1a164739cef385d4888827","unresolved":false,"context_lines":[{"line_number":3423,"context_line":"                              volume[\u0027id\u0027],"},{"line_number":3424,"context_line":"                              {\u0027replication_status\u0027: \u0027failed-over\u0027})"},{"line_number":3425,"context_line":""},{"line_number":3426,"context_line":"    def list_replication_targets(self, context, volume):"},{"line_number":3427,"context_line":"        \"\"\"Provide a means to obtain replication targets for a volume."},{"line_number":3428,"context_line":""},{"line_number":3429,"context_line":"        This method is used to query a backend to get the current"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_efac49a2","side":"PARENT","line":3426,"range":{"start_line":3426,"start_character":4,"end_line":3426,"end_character":56},"updated":"2016-02-16 16:07:15.000000000","message":"list_replication_targets should be brought back here as well.","commit_id":"7b428a9aac5fdc839549e0d204f6da92a0f780a5"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c8edebb032f89be79e1a164739cef385d4888827","unresolved":false,"context_lines":[{"line_number":3209,"context_line":"                volume.save()"},{"line_number":3210,"context_line":""},{"line_number":3211,"context_line":"    # Replication V2 methods"},{"line_number":3212,"context_line":"    def failover_replication(self, context,"},{"line_number":3213,"context_line":"                             freeze\u003dTrue, secondary_backend_id\u003dNone):"},{"line_number":3214,"context_line":"        \"\"\"Failover a backend to a secondary replication target."},{"line_number":3215,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_a47a68ef","line":3212,"range":{"start_line":3212,"start_character":8,"end_line":3212,"end_character":28},"updated":"2016-02-16 16:07:15.000000000","message":"In regards to recovering from a fail-over, is the driver expected to return the active_backend_id as \u0027default\u0027?","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":3209,"context_line":"                volume.save()"},{"line_number":3210,"context_line":""},{"line_number":3211,"context_line":"    # Replication V2 methods"},{"line_number":3212,"context_line":"    def failover_replication(self, context,"},{"line_number":3213,"context_line":"                             freeze\u003dTrue, secondary_backend_id\u003dNone):"},{"line_number":3214,"context_line":"        \"\"\"Failover a backend to a secondary replication target."},{"line_number":3215,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_65b4c7d0","line":3212,"range":{"start_line":3212,"start_character":8,"end_line":3212,"end_character":28},"in_reply_to":"dae33548_a47a68ef","updated":"2016-02-16 23:34:50.000000000","message":"In Raleigh we discussed that \"bringing things back\" was not something we were going to mess with here.  The idea being based on the use case that the original backend melted in a fire... it\u0027s gone, there\u0027s no coming back from that.  It\u0027ll be up to the admin to figure out how to bring the secondary online as a permanent resource and migrate volumes etc.\n\nWe could make it something that toggles, but that doesn\u0027t really fit the use case, and it really has some pretty significant downsides.  Might be a good follow up item, but we start boiling the ocean again if that\u0027s a requirement in the first iteration IMO.","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"41a239f2a3ea0f19e11f1cd124dee88af6459d14","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"                secondary_backend_id,"},{"line_number":3238,"context_line":"                volumes)"},{"line_number":3239,"context_line":"        except exception.UnableToFailOver:"},{"line_number":3240,"context_line":"            LOG.exception("},{"line_number":3241,"context_line":"                _LE(\"Failed failover_replication call to driver: %s\"))"},{"line_number":3242,"context_line":"            service.replication_status \u003d \"failover-error\""},{"line_number":3243,"context_line":"            LOG.error("}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_4c93b54f","line":3240,"updated":"2016-02-16 20:22:04.000000000","message":"Should this pass in arg to substitute for %s?","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bef0510bb280f3ba455c0c024b0f50224109754f","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"                secondary_backend_id,"},{"line_number":3238,"context_line":"                volumes)"},{"line_number":3239,"context_line":"        except exception.UnableToFailOver:"},{"line_number":3240,"context_line":"            LOG.exception("},{"line_number":3241,"context_line":"                _LE(\"Failed failover_replication call to driver: %s\"))"},{"line_number":3242,"context_line":"            service.replication_status \u003d \"failover-error\""},{"line_number":3243,"context_line":"            LOG.error("}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_c514b345","line":3240,"in_reply_to":"dae33548_4c93b54f","updated":"2016-02-16 23:34:50.000000000","message":"That would be useful wouldn\u0027t it :)","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"09b4a2dd1c5aba762cdaf15f94e36e444dc4eb45","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"                secondary_backend_id,"},{"line_number":3238,"context_line":"                volumes)"},{"line_number":3239,"context_line":"        except exception.UnableToFailOver as exc:"},{"line_number":3240,"context_line":"            LOG.exception(_LE(\"Failed to perform replication failover: \"), exc)"},{"line_number":3241,"context_line":"            service.replication_status \u003d \"failover-error\""},{"line_number":3242,"context_line":"        except exception.InvalidReplicationTarget as exc:"},{"line_number":3243,"context_line":"            LOG.exception(_LE(\"Failed to perform replication failover: \"), exc)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_3765d01d","line":3240,"updated":"2016-02-17 03:25:03.000000000","message":"I don\u0027t believe you want to pass in an exception object to LOG.exception.","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"44575d26a330dfc2fa14d8eecc92ce0fed51908b","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"                secondary_backend_id,"},{"line_number":3238,"context_line":"                volumes)"},{"line_number":3239,"context_line":"        except exception.UnableToFailOver as exc:"},{"line_number":3240,"context_line":"            LOG.exception(_LE(\"Failed to perform replication failover: \"), exc)"},{"line_number":3241,"context_line":"            service.replication_status \u003d \"failover-error\""},{"line_number":3242,"context_line":"        except exception.InvalidReplicationTarget as exc:"},{"line_number":3243,"context_line":"            LOG.exception(_LE(\"Failed to perform replication failover: \"), exc)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_5eae7f81","line":3240,"in_reply_to":"dae33548_3765d01d","updated":"2016-02-17 18:29:07.000000000","message":"Done","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"09b4a2dd1c5aba762cdaf15f94e36e444dc4eb45","unresolved":false,"context_lines":[{"line_number":3240,"context_line":"            LOG.exception(_LE(\"Failed to perform replication failover: \"), exc)"},{"line_number":3241,"context_line":"            service.replication_status \u003d \"failover-error\""},{"line_number":3242,"context_line":"        except exception.InvalidReplicationTarget as exc:"},{"line_number":3243,"context_line":"            LOG.exception(_LE(\"Failed to perform replication failover: \"), exc)"},{"line_number":3244,"context_line":"            service.replication_status \u003d \"enabled\""},{"line_number":3245,"context_line":"        except exception.VolumeDriverException as exc:"},{"line_number":3246,"context_line":"            # NOTE(jdg): Drivers need to be aware if they fail during"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_176a4cee","line":3243,"updated":"2016-02-17 03:25:03.000000000","message":"Same.","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"44575d26a330dfc2fa14d8eecc92ce0fed51908b","unresolved":false,"context_lines":[{"line_number":3240,"context_line":"            LOG.exception(_LE(\"Failed to perform replication failover: \"), exc)"},{"line_number":3241,"context_line":"            service.replication_status \u003d \"failover-error\""},{"line_number":3242,"context_line":"        except exception.InvalidReplicationTarget as exc:"},{"line_number":3243,"context_line":"            LOG.exception(_LE(\"Failed to perform replication failover: \"), exc)"},{"line_number":3244,"context_line":"            service.replication_status \u003d \"enabled\""},{"line_number":3245,"context_line":"        except exception.VolumeDriverException as exc:"},{"line_number":3246,"context_line":"            # NOTE(jdg): Drivers need to be aware if they fail during"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_3eb3bbea","line":3243,"in_reply_to":"dae33548_176a4cee","updated":"2016-02-17 18:29:07.000000000","message":"Done","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"09b4a2dd1c5aba762cdaf15f94e36e444dc4eb45","unresolved":false,"context_lines":[{"line_number":3248,"context_line":"            # and make sure the driver state is such that the original"},{"line_number":3249,"context_line":"            # backend is still set as primary as per driver memory"},{"line_number":3250,"context_line":"            LOG.exception(_LE(\"Failed failover_replication call to driver\"),"},{"line_number":3251,"context_line":"                          exc)"},{"line_number":3252,"context_line":"            service.status \u003d \u0027error\u0027"},{"line_number":3253,"context_line":"            service.save()"},{"line_number":3254,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_b779e0ca","line":3251,"updated":"2016-02-17 03:25:03.000000000","message":"Same.","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"44575d26a330dfc2fa14d8eecc92ce0fed51908b","unresolved":false,"context_lines":[{"line_number":3248,"context_line":"            # and make sure the driver state is such that the original"},{"line_number":3249,"context_line":"            # backend is still set as primary as per driver memory"},{"line_number":3250,"context_line":"            LOG.exception(_LE(\"Failed failover_replication call to driver\"),"},{"line_number":3251,"context_line":"                          exc)"},{"line_number":3252,"context_line":"            service.status \u003d \u0027error\u0027"},{"line_number":3253,"context_line":"            service.save()"},{"line_number":3254,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_dec28f33","line":3251,"in_reply_to":"dae33548_b779e0ca","updated":"2016-02-17 18:29:07.000000000","message":"Done","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"9ae970f475de64318eabdeb7ea0589134b96f967","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"                secondary_backend_id,"},{"line_number":3238,"context_line":"                volumes)"},{"line_number":3239,"context_line":"        except exception.UnableToFailOver as exc:"},{"line_number":3240,"context_line":"            LOG.error(_LE(\"Failed to perform replication failover: \"), exc)"},{"line_number":3241,"context_line":"            service.replication_status \u003d \"failover-error\""},{"line_number":3242,"context_line":"        except exception.InvalidReplicationTarget as exc:"},{"line_number":3243,"context_line":"            LOG.error(_LE(\"Failed to perform replication failover: \"), exc)"}],"source_content_type":"text/x-python","patch_set":16,"id":"dae33548_d5c6ea66","line":3240,"updated":"2016-02-17 20:08:28.000000000","message":"But now you need to add a formatting arg to include the exception in the string. (\"Failed... %s\", ex)\n\nI would probably go with:\n\n    LOG.exception(_LE(\"Failed to perform replication failover.\"))","commit_id":"c889112a5d4ee7d7a970ab6ba3608f3158cf54e7"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"e27607eef95dba2d86584cadfbd587820e23fd48","unresolved":false,"context_lines":[{"line_number":1943,"context_line":"                # queue it to be sent to the Schedulers."},{"line_number":1944,"context_line":"                self.update_service_capabilities(volume_stats)"},{"line_number":1945,"context_line":""},{"line_number":1946,"context_line":"                if volume_stats.get(\u0027replication_enabled\u0027, False):"},{"line_number":1947,"context_line":"                    # replciation_status provides a concise update of"},{"line_number":1948,"context_line":"                    # replicating volumes and any error conditions"},{"line_number":1949,"context_line":"                    # detected by the driver.  The intent is we don\u0027t"},{"line_number":1950,"context_line":"                    # expect/worry about updates so long as nothing"},{"line_number":1951,"context_line":"                    # changes, but if something goes wrong this is a"},{"line_number":1952,"context_line":"                    # handy mechanism to update the manager and the db"},{"line_number":1953,"context_line":"                    # possibly let the admin/user be notified"},{"line_number":1954,"context_line":""},{"line_number":1955,"context_line":"                    # TODO(jdg): Refactor the check/update pieces to a"},{"line_number":1956,"context_line":"                    # helper method we can share"},{"line_number":1957,"context_line":"                    # We want to leverage some of the same update model"},{"line_number":1958,"context_line":"                    # that we have in the targets update call"},{"line_number":1959,"context_line":""},{"line_number":1960,"context_line":"                    replication_updates \u003d ("},{"line_number":1961,"context_line":"                        self.driver.get_replication_updates(context))"},{"line_number":1962,"context_line":"                    for update in replication_updates:"},{"line_number":1963,"context_line":"                        pass"},{"line_number":1964,"context_line":""},{"line_number":1965,"context_line":"    def _append_volume_stats(self, vol_stats):"},{"line_number":1966,"context_line":"        pools \u003d vol_stats.get(\u0027pools\u0027, None)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_839edab6","line":1963,"range":{"start_line":1946,"start_character":16,"end_line":1963,"end_character":28},"updated":"2016-02-18 03:37:57.000000000","message":"We spoke about it in irc, but figured I\u0027d put a note on here (mainly so I don\u0027t forget again :P) We should probably either block this call on the drivers for v2+ replication or add a default noop implementation of get_replication_updates. As-is drivers need to implement the method or this blows up.","commit_id":"1728237f27c2ccbf4a87a7ef1d7262ed2418f7d6"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"36f459afd563917d368a76c86e1022e4251d1155","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"                secondary_backend_id,"},{"line_number":3238,"context_line":"                volumes)"},{"line_number":3239,"context_line":"        except exception.UnableToFailOver as exc:"},{"line_number":3240,"context_line":"            LOG.error(_LE(\"Failed to perform replication failover: \"), exc)"},{"line_number":3241,"context_line":"            service.replication_status \u003d \"failover-error\""},{"line_number":3242,"context_line":"        except exception.InvalidReplicationTarget as exc:"},{"line_number":3243,"context_line":"            LOG.error(_LE(\"Failed to perform replication failover: \"), exc)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_8f84410b","line":3240,"range":{"start_line":3240,"start_character":0,"end_line":3240,"end_character":75},"updated":"2016-02-18 01:31:12.000000000","message":"Still need to fix this one :)","commit_id":"1728237f27c2ccbf4a87a7ef1d7262ed2418f7d6"},{"author":{"_account_id":14274,"name":"XinXiaohui","email":"xiaohui.xin@intel.com","username":"XinXiaohui"},"change_message_id":"496edbe384fc126187596cf47eeff1b035791e53","unresolved":false,"context_lines":[{"line_number":3222,"context_line":"        if needed."},{"line_number":3223,"context_line":""},{"line_number":3224,"context_line":"        :param context: security context"},{"line_number":3225,"context_line":"        :param backend_id: Specifies rep target backend to fail over to"},{"line_number":3226,"context_line":"        :param volumes: List of volume objects the Cinder host has"},{"line_number":3227,"context_line":"        :returns : ID of the backend that was failed-over to"},{"line_number":3228,"context_line":"        \"\"\""},{"line_number":3229,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"dae33548_d99eceb7","line":3226,"range":{"start_line":3225,"start_character":8,"end_line":3226,"end_character":66},"updated":"2016-02-19 07:12:03.000000000","message":"The comments are not consistent with the parameters.","commit_id":"4e930ca394a707e7517b0ed1db49b598d80513c1"},{"author":{"_account_id":14274,"name":"XinXiaohui","email":"xiaohui.xin@intel.com","username":"XinXiaohui"},"change_message_id":"496edbe384fc126187596cf47eeff1b035791e53","unresolved":false,"context_lines":[{"line_number":3251,"context_line":"                      exc)"},{"line_number":3252,"context_line":"            service.status \u003d \u0027error\u0027"},{"line_number":3253,"context_line":"            service.save()"},{"line_number":3254,"context_line":"        finally:"},{"line_number":3255,"context_line":"            LOG.error("},{"line_number":3256,"context_line":"                _LE(\"Error encountered during failover on host: \""},{"line_number":3257,"context_line":"                    \"%(host)s invalid target ID %(backend_id)\"),"},{"line_number":3258,"context_line":"                {\u0027host\u0027: self.host, \u0027backend_id\u0027:"},{"line_number":3259,"context_line":"                 secondary_backend_id})"},{"line_number":3260,"context_line":"            return None"},{"line_number":3261,"context_line":""},{"line_number":3262,"context_line":"        service.status \u003d \u0027failed_over\u0027"},{"line_number":3263,"context_line":"        service.active_backend_id \u003d active_backend_id"}],"source_content_type":"text/x-python","patch_set":19,"id":"dae33548_d429758b","line":3260,"range":{"start_line":3254,"start_character":8,"end_line":3260,"end_character":23},"updated":"2016-02-19 07:12:03.000000000","message":"As my understanding, whether no exception or not, the \"finally\" will be executed and return None here. So the lines follows will not be executed at all, which means the status will never be \"failed_over\". But maybe I\u0027m wrong this time?","commit_id":"4e930ca394a707e7517b0ed1db49b598d80513c1"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"73ca69bda698f1e0214514834eb06c5ea5ceab95","unresolved":false,"context_lines":[{"line_number":297,"context_line":"                     {\u0027host\u0027: self.host})"},{"line_number":298,"context_line":"            self.image_volume_cache \u003d None"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        replication_enabled \u003d self.driver.replication_is_configured()"},{"line_number":301,"context_line":"        # We only accept the following responses as valid from the driver"},{"line_number":302,"context_line":"        valid_settings \u003d [\u0027not-capable\u0027, \u0027enabled\u0027, \u0027disabled\u0027]"},{"line_number":303,"context_line":"        if replication_enabled not in valid_settings:"},{"line_number":304,"context_line":"            LOG.warning(_LW(\"Backend responded with invalid \""},{"line_number":305,"context_line":"                            \"replication_enabled \""},{"line_number":306,"context_line":"                            \"setting: %s (setting to \\\u0027disabled\\\u0027\"),"},{"line_number":307,"context_line":"                        replication_enabled)"},{"line_number":308,"context_line":"            service.replication_enabled \u003d \"disabled\""},{"line_number":309,"context_line":"            service.save()"},{"line_number":310,"context_line":"        else:"},{"line_number":311,"context_line":"            service.replication_enabled \u003d replication_enabled"},{"line_number":312,"context_line":"            service.save()"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _add_to_threadpool(self, func, *args, **kwargs):"},{"line_number":315,"context_line":"        self._tp.spawn_n(func, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":22,"id":"bae84128_97b6af88","line":312,"range":{"start_line":300,"start_character":8,"end_line":312,"end_character":26},"updated":"2016-02-19 22:39:53.000000000","message":"We should probably do this in init_host() so it happens after do_setup for the drivers. Some (like mine) do don\u0027t any of the parsing or replication setup until then and won\u0027t know if they should report replication enabled or not.\n\nIf we move it there we should have the stats from the driver too, there is already a section of code that looks for replication enabled and does stuff.","commit_id":"3df891dbde3560ec49c63216fe523d68855bc379"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"7864e1c926ca41ea3bd8eb951a0d6c426b6ec6fc","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"        :returns : ID of the backend that was failed-over to"},{"line_number":3238,"context_line":"        \"\"\""},{"line_number":3239,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"},{"line_number":3240,"context_line":"        service \u003d objects.Service.get_by_host_and_topic("},{"line_number":3241,"context_line":"            context.elevated, svc_host,"},{"line_number":3242,"context_line":"            CONF.volume_topic)"},{"line_number":3243,"context_line":"        volumes \u003d objects.VolumeList.get_all_by_host(context, self.host)"},{"line_number":3244,"context_line":""},{"line_number":3245,"context_line":"        exception_encountered \u003d False"}],"source_content_type":"text/x-python","patch_set":23,"id":"bae84128_5718a01d","line":3242,"range":{"start_line":3240,"start_character":0,"end_line":3242,"end_character":30},"updated":"2016-02-20 02:36:10.000000000","message":"Testing this out I\u0027m seeing any error coming from this call, I remember you mentioned having a similar issue before but I don\u0027t know what you had to change to fix it.\n\n\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py\", line 143, in _dispatch_and_reply\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher     executor_callback))\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py\", line 189, in _dispatch\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher     executor_callback)\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py\", line 130, in _do_dispatch\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher     result \u003d func(ctxt, **new_args)\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher   File \"/opt/stack/cinder/cinder/volume/manager.py\", line 3242, in failover_host\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher     CONF.volume_topic)\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher   File \"/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py\", line 181, in wrapper\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher     result \u003d fn(cls, context, *args, **kwargs)\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher   File \"/opt/stack/cinder/cinder/objects/service.py\", line 82, in get_by_host_and_topic\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher     db_service \u003d db.service_get_by_host_and_topic(context, host, topic)\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher   File \"/opt/stack/cinder/cinder/db/api.py\", line 106, in service_get_by_host_and_topic\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher     return IMPL.service_get_by_host_and_topic(context, host, topic)\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher   File \"/opt/stack/cinder/cinder/db/sqlalchemy/api.py\", line 173, in wrapper\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher     if not is_admin_context(args[0]):\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher   File \"/opt/stack/cinder/cinder/db/sqlalchemy/api.py\", line 124, in is_admin_context\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher     return context.is_admin\n2016-02-19 18:29:12.647 TRACE oslo_messaging.rpc.dispatcher AttributeError: \u0027function\u0027 object has no attribute \u0027is_admin\u0027","commit_id":"fc5046fe23a9ed82edaaf4f6aeda623eae49638d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"bd0b3e18bb92398be7176740eae388113c3d88c9","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"        :returns : ID of the backend that was failed-over to"},{"line_number":3238,"context_line":"        \"\"\""},{"line_number":3239,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"},{"line_number":3240,"context_line":"        service \u003d objects.Service.get_by_host_and_topic("},{"line_number":3241,"context_line":"            context.elevated, svc_host,"},{"line_number":3242,"context_line":"            CONF.volume_topic)"},{"line_number":3243,"context_line":"        volumes \u003d objects.VolumeList.get_all_by_host(context, self.host)"},{"line_number":3244,"context_line":""},{"line_number":3245,"context_line":"        exception_encountered \u003d False"}],"source_content_type":"text/x-python","patch_set":23,"id":"bae84128_3af218d3","line":3242,"range":{"start_line":3240,"start_character":0,"end_line":3242,"end_character":30},"in_reply_to":"bae84128_5718a01d","updated":"2016-02-20 15:48:24.000000000","message":"Yeah, it needs a fix in volume/api.py around the context.  I\u0027ll push up that change then retest it here as well.","commit_id":"fc5046fe23a9ed82edaaf4f6aeda623eae49638d"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"ae5a91868c3251edf6ce9b7e669d6039fcd468c3","unresolved":false,"context_lines":[{"line_number":3309,"context_line":"        replication targets that have been succesfully configured on the"},{"line_number":3310,"context_line":"        backend.  One of these id\u0027s can be used for the failover command."},{"line_number":3311,"context_line":"        \"\"\""},{"line_number":3312,"context_line":"        targets \u003d self.driver.list_replication_targets()"},{"line_number":3313,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3314,"context_line":"        return targets"},{"line_number":3315,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"bae84128_ce038172","line":3312,"range":{"start_line":3312,"start_character":8,"end_line":3312,"end_character":56},"updated":"2016-02-20 00:30:25.000000000","message":"This needs to take context as a parameter as well; this fails currently.","commit_id":"fc5046fe23a9ed82edaaf4f6aeda623eae49638d"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"ae5a91868c3251edf6ce9b7e669d6039fcd468c3","unresolved":false,"context_lines":[{"line_number":3310,"context_line":"        backend.  One of these id\u0027s can be used for the failover command."},{"line_number":3311,"context_line":"        \"\"\""},{"line_number":3312,"context_line":"        targets \u003d self.driver.list_replication_targets()"},{"line_number":3313,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3314,"context_line":"        return targets"},{"line_number":3315,"context_line":""},{"line_number":3316,"context_line":"    def freeze_host(self, context):"}],"source_content_type":"text/x-python","patch_set":23,"id":"bae84128_ae2b9dea","line":3313,"range":{"start_line":3313,"start_character":7,"end_line":3313,"end_character":67},"updated":"2016-02-20 00:30:25.000000000","message":"Log info should be updated.","commit_id":"fc5046fe23a9ed82edaaf4f6aeda623eae49638d"},{"author":{"_account_id":14274,"name":"XinXiaohui","email":"xiaohui.xin@intel.com","username":"XinXiaohui"},"change_message_id":"89f0a7e1d02f9b58b5b87fa259bb05af9d604944","unresolved":false,"context_lines":[{"line_number":3238,"context_line":"            service.replication_status \u003d \"failover-error\""},{"line_number":3239,"context_line":"            exception_encountered \u003d True"},{"line_number":3240,"context_line":"        except exception.InvalidReplicationTarget:"},{"line_number":3241,"context_line":"            LOG.exception(_LE(\"Invlaid replication target specified \""},{"line_number":3242,"context_line":"                              \"for failover\"))"},{"line_number":3243,"context_line":"            service.replication_status \u003d \"enabled\""},{"line_number":3244,"context_line":"            exception_encountered \u003d True"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_3f020070","line":3241,"range":{"start_line":3241,"start_character":31,"end_line":3241,"end_character":38},"updated":"2016-02-21 08:01:06.000000000","message":"s/Invlaid/Invalid","commit_id":"a5531346431d540c53acee30dffd0e3f1201c2f0"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"fedf03492fe9c95cafd16f0ae07f213d749b7ac7","unresolved":false,"context_lines":[{"line_number":3238,"context_line":"            service.replication_status \u003d \"failover-error\""},{"line_number":3239,"context_line":"            exception_encountered \u003d True"},{"line_number":3240,"context_line":"        except exception.InvalidReplicationTarget:"},{"line_number":3241,"context_line":"            LOG.exception(_LE(\"Invlaid replication target specified \""},{"line_number":3242,"context_line":"                              \"for failover\"))"},{"line_number":3243,"context_line":"            service.replication_status \u003d \"enabled\""},{"line_number":3244,"context_line":"            exception_encountered \u003d True"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_c7bfbb5e","line":3241,"range":{"start_line":3241,"start_character":31,"end_line":3241,"end_character":38},"in_reply_to":"bae84128_3f020070","updated":"2016-02-22 04:43:08.000000000","message":"Done","commit_id":"a5531346431d540c53acee30dffd0e3f1201c2f0"},{"author":{"_account_id":14274,"name":"XinXiaohui","email":"xiaohui.xin@intel.com","username":"XinXiaohui"},"change_message_id":"89f0a7e1d02f9b58b5b87fa259bb05af9d604944","unresolved":false,"context_lines":[{"line_number":3286,"context_line":"    def list_replication_targets(self, context):"},{"line_number":3287,"context_line":"        \"\"\"Retrieve list of configured/available replication targets."},{"line_number":3288,"context_line":""},{"line_number":3289,"context_line":"        Returns a list of backend_id\u0027s cooresponding to the available"},{"line_number":3290,"context_line":"        replication targets that have been succesfully configured on the"},{"line_number":3291,"context_line":"        backend.  One of these id\u0027s can be used for the failover command."},{"line_number":3292,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_a24c3743","line":3289,"range":{"start_line":3289,"start_character":39,"end_line":3289,"end_character":52},"updated":"2016-02-21 08:01:06.000000000","message":"s/cooresponding/corresponding","commit_id":"a5531346431d540c53acee30dffd0e3f1201c2f0"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"fedf03492fe9c95cafd16f0ae07f213d749b7ac7","unresolved":false,"context_lines":[{"line_number":3286,"context_line":"    def list_replication_targets(self, context):"},{"line_number":3287,"context_line":"        \"\"\"Retrieve list of configured/available replication targets."},{"line_number":3288,"context_line":""},{"line_number":3289,"context_line":"        Returns a list of backend_id\u0027s cooresponding to the available"},{"line_number":3290,"context_line":"        replication targets that have been succesfully configured on the"},{"line_number":3291,"context_line":"        backend.  One of these id\u0027s can be used for the failover command."},{"line_number":3292,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_a7ab971c","line":3289,"range":{"start_line":3289,"start_character":39,"end_line":3289,"end_character":52},"in_reply_to":"bae84128_a24c3743","updated":"2016-02-22 04:43:08.000000000","message":"Done","commit_id":"a5531346431d540c53acee30dffd0e3f1201c2f0"},{"author":{"_account_id":14274,"name":"XinXiaohui","email":"xiaohui.xin@intel.com","username":"XinXiaohui"},"change_message_id":"89f0a7e1d02f9b58b5b87fa259bb05af9d604944","unresolved":false,"context_lines":[{"line_number":3291,"context_line":"        backend.  One of these id\u0027s can be used for the failover command."},{"line_number":3292,"context_line":"        \"\"\""},{"line_number":3293,"context_line":"        targets \u003d self.driver.list_replication_targets()"},{"line_number":3294,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3295,"context_line":"        return targets"},{"line_number":3296,"context_line":""},{"line_number":3297,"context_line":"    def freeze_host(self, context):"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_026243ad","line":3294,"range":{"start_line":3294,"start_character":22,"end_line":3294,"end_character":64},"updated":"2016-02-21 08:01:06.000000000","message":"It\u0027s the same Log info as line 3319. Is that correct?","commit_id":"a5531346431d540c53acee30dffd0e3f1201c2f0"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"fedf03492fe9c95cafd16f0ae07f213d749b7ac7","unresolved":false,"context_lines":[{"line_number":3291,"context_line":"        backend.  One of these id\u0027s can be used for the failover command."},{"line_number":3292,"context_line":"        \"\"\""},{"line_number":3293,"context_line":"        targets \u003d self.driver.list_replication_targets()"},{"line_number":3294,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3295,"context_line":"        return targets"},{"line_number":3296,"context_line":""},{"line_number":3297,"context_line":"    def freeze_host(self, context):"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_e763df18","line":3294,"range":{"start_line":3294,"start_character":22,"end_line":3294,"end_character":64},"in_reply_to":"bae84128_026243ad","updated":"2016-02-22 04:43:08.000000000","message":"Done","commit_id":"a5531346431d540c53acee30dffd0e3f1201c2f0"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d2fe15d4c5bdc886c24c232a1de4fd3160056a47","unresolved":false,"context_lines":[{"line_number":3200,"context_line":"                volume.update(model_update_default)"},{"line_number":3201,"context_line":"                volume.save()"},{"line_number":3202,"context_line":""},{"line_number":3203,"context_line":"    # Replication V2 methods"},{"line_number":3204,"context_line":"    def failover_host(self, context,"},{"line_number":3205,"context_line":"                      secondary_backend_id\u003dNone):"},{"line_number":3206,"context_line":"        \"\"\"Failover a backend to a secondary replication target."}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_1d972b49","line":3203,"range":{"start_line":3203,"start_character":6,"end_line":3203,"end_character":28},"updated":"2016-02-22 09:51:50.000000000","message":"Should this be v2.1 methods?","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"ec34cb211f6a98f6fe804a5473f8b33afdfdd5f7","unresolved":false,"context_lines":[{"line_number":3200,"context_line":"                volume.update(model_update_default)"},{"line_number":3201,"context_line":"                volume.save()"},{"line_number":3202,"context_line":""},{"line_number":3203,"context_line":"    # Replication V2 methods"},{"line_number":3204,"context_line":"    def failover_host(self, context,"},{"line_number":3205,"context_line":"                      secondary_backend_id\u003dNone):"},{"line_number":3206,"context_line":"        \"\"\"Failover a backend to a secondary replication target."}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_43009f01","line":3203,"range":{"start_line":3203,"start_character":6,"end_line":3203,"end_character":28},"in_reply_to":"bae84128_1d972b49","updated":"2016-02-22 17:26:08.000000000","message":"Done","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d2fe15d4c5bdc886c24c232a1de4fd3160056a47","unresolved":false,"context_lines":[{"line_number":3306,"context_line":"        \"\"\""},{"line_number":3307,"context_line":"        # TODO(jdg): Return from driver? or catch?"},{"line_number":3308,"context_line":"        # Update status column in service entry"},{"line_number":3309,"context_line":"        self.driver.freeze_backend(context)"},{"line_number":3310,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"},{"line_number":3311,"context_line":""},{"line_number":3312,"context_line":"        # NOTE(jdg): get_by_host_and_topic filters out disabled"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_a8751f99","line":3309,"range":{"start_line":3309,"start_character":8,"end_line":3309,"end_character":43},"updated":"2016-02-22 09:51:50.000000000","message":"John, I suggest we catch driver exception here, otherwise it will raise to user.","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"383b67bb3534fc3bf9a2d2d17edf3f44427bae7f","unresolved":false,"context_lines":[{"line_number":3306,"context_line":"        \"\"\""},{"line_number":3307,"context_line":"        # TODO(jdg): Return from driver? or catch?"},{"line_number":3308,"context_line":"        # Update status column in service entry"},{"line_number":3309,"context_line":"        self.driver.freeze_backend(context)"},{"line_number":3310,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"},{"line_number":3311,"context_line":""},{"line_number":3312,"context_line":"        # NOTE(jdg): get_by_host_and_topic filters out disabled"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_26059713","line":3309,"range":{"start_line":3309,"start_character":8,"end_line":3309,"end_character":43},"in_reply_to":"bae84128_a31c0b14","updated":"2016-02-23 01:35:15.000000000","message":"great, thanks John.","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"ec34cb211f6a98f6fe804a5473f8b33afdfdd5f7","unresolved":false,"context_lines":[{"line_number":3306,"context_line":"        \"\"\""},{"line_number":3307,"context_line":"        # TODO(jdg): Return from driver? or catch?"},{"line_number":3308,"context_line":"        # Update status column in service entry"},{"line_number":3309,"context_line":"        self.driver.freeze_backend(context)"},{"line_number":3310,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"},{"line_number":3311,"context_line":""},{"line_number":3312,"context_line":"        # NOTE(jdg): get_by_host_and_topic filters out disabled"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_a31c0b14","line":3309,"range":{"start_line":3309,"start_character":8,"end_line":3309,"end_character":43},"in_reply_to":"bae84128_a8751f99","updated":"2016-02-22 17:26:08.000000000","message":"I can do that, but it\u0027s just a notification and if the driver is failing for it that\u0027s annoying.  I\u0027ll catch it and log a warning though, thanks!","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d2fe15d4c5bdc886c24c232a1de4fd3160056a47","unresolved":false,"context_lines":[{"line_number":3317,"context_line":"        service.disabled_reason \u003d \"frozen\""},{"line_number":3318,"context_line":"        service.save()"},{"line_number":3319,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3320,"context_line":"        return True"},{"line_number":3321,"context_line":""},{"line_number":3322,"context_line":"    def thaw_host(self, context):"},{"line_number":3323,"context_line":"        \"\"\"UnFreeze management plane on this backend."}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_88edbb27","line":3320,"range":{"start_line":3320,"start_character":8,"end_line":3320,"end_character":19},"updated":"2016-02-22 09:51:50.000000000","message":"Do we need to return this? Seems not using it in volume/api.","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"383b67bb3534fc3bf9a2d2d17edf3f44427bae7f","unresolved":false,"context_lines":[{"line_number":3317,"context_line":"        service.disabled_reason \u003d \"frozen\""},{"line_number":3318,"context_line":"        service.save()"},{"line_number":3319,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3320,"context_line":"        return True"},{"line_number":3321,"context_line":""},{"line_number":3322,"context_line":"    def thaw_host(self, context):"},{"line_number":3323,"context_line":"        \"\"\"UnFreeze management plane on this backend."}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_e60e0f3a","line":3320,"range":{"start_line":3320,"start_character":8,"end_line":3320,"end_character":19},"in_reply_to":"bae84128_03f337d7","updated":"2016-02-23 01:35:15.000000000","message":"Sure, it\u0027s not an issue.","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"ec34cb211f6a98f6fe804a5473f8b33afdfdd5f7","unresolved":false,"context_lines":[{"line_number":3317,"context_line":"        service.disabled_reason \u003d \"frozen\""},{"line_number":3318,"context_line":"        service.save()"},{"line_number":3319,"context_line":"        LOG.info(_LI(\"Set backend status to frozen successfully.\"))"},{"line_number":3320,"context_line":"        return True"},{"line_number":3321,"context_line":""},{"line_number":3322,"context_line":"    def thaw_host(self, context):"},{"line_number":3323,"context_line":"        \"\"\"UnFreeze management plane on this backend."}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_03f337d7","line":3320,"range":{"start_line":3320,"start_character":8,"end_line":3320,"end_character":19},"in_reply_to":"bae84128_88edbb27","updated":"2016-02-22 17:26:08.000000000","message":"No, we probably don\u0027t but I left it in place for now.  IMO it doesn\u0027t hurt does it?","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d2fe15d4c5bdc886c24c232a1de4fd3160056a47","unresolved":false,"context_lines":[{"line_number":3332,"context_line":""},{"line_number":3333,"context_line":"        # TODO(jdg): Return from driver? or catch?"},{"line_number":3334,"context_line":"        # Update status column in service entry"},{"line_number":3335,"context_line":"        self.driver.thaw_backend(context)"},{"line_number":3336,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"},{"line_number":3337,"context_line":""},{"line_number":3338,"context_line":"        # NOTE(jdg): get_by_host_and_topic filters out disabled"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_88d49b47","line":3335,"range":{"start_line":3335,"start_character":8,"end_line":3335,"end_character":41},"updated":"2016-02-22 09:51:50.000000000","message":"ditto.","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"ec34cb211f6a98f6fe804a5473f8b33afdfdd5f7","unresolved":false,"context_lines":[{"line_number":3332,"context_line":""},{"line_number":3333,"context_line":"        # TODO(jdg): Return from driver? or catch?"},{"line_number":3334,"context_line":"        # Update status column in service entry"},{"line_number":3335,"context_line":"        self.driver.thaw_backend(context)"},{"line_number":3336,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"},{"line_number":3337,"context_line":""},{"line_number":3338,"context_line":"        # NOTE(jdg): get_by_host_and_topic filters out disabled"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_63b843e6","line":3335,"range":{"start_line":3335,"start_character":8,"end_line":3335,"end_character":41},"in_reply_to":"bae84128_88d49b47","updated":"2016-02-22 17:26:08.000000000","message":"Done","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d2fe15d4c5bdc886c24c232a1de4fd3160056a47","unresolved":false,"context_lines":[{"line_number":3343,"context_line":"        service.disabled_reason \u003d \"\""},{"line_number":3344,"context_line":"        service.save()"},{"line_number":3345,"context_line":"        LOG.info(_LI(\"Thawed backend successfully.\"))"},{"line_number":3346,"context_line":"        return True"},{"line_number":3347,"context_line":""},{"line_number":3348,"context_line":"    def manage_existing_snapshot(self, ctxt, snapshot, ref\u003dNone):"},{"line_number":3349,"context_line":"        LOG.debug(\u0027manage_existing_snapshot: managing %s.\u0027, ref)"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_08c1ab80","line":3346,"range":{"start_line":3346,"start_character":8,"end_line":3346,"end_character":19},"updated":"2016-02-22 09:51:50.000000000","message":"here too.","commit_id":"67d41f4a2a3ba7e1e2594feaa65b0e7999aeb5fe"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c4a0bd9c1862ae0e6784fc2654b1ad7380124393","unresolved":false,"context_lines":[{"line_number":3290,"context_line":"        replication targets that have been succesfully configured on the"},{"line_number":3291,"context_line":"        backend.  One of these id\u0027s can be used for the failover command."},{"line_number":3292,"context_line":"        \"\"\""},{"line_number":3293,"context_line":"        targets \u003d self.driver.list_replication_targets()"},{"line_number":3294,"context_line":"        LOG.info(_LI(\"Retrieved targets from backend successfully.\"))"},{"line_number":3295,"context_line":"        return targets"},{"line_number":3296,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"bae84128_3c193889","line":3293,"range":{"start_line":3293,"start_character":54,"end_line":3293,"end_character":56},"updated":"2016-02-22 18:32:23.000000000","message":"context needs to be passed in here as well","commit_id":"1a66e6db3522b140116b9f4b998fc76803a567fc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"9546c7b9f8db348997797b6a2ca4016838e75498","unresolved":false,"context_lines":[{"line_number":3290,"context_line":"        replication targets that have been succesfully configured on the"},{"line_number":3291,"context_line":"        backend.  One of these id\u0027s can be used for the failover command."},{"line_number":3292,"context_line":"        \"\"\""},{"line_number":3293,"context_line":"        targets \u003d self.driver.list_replication_targets()"},{"line_number":3294,"context_line":"        LOG.info(_LI(\"Retrieved targets from backend successfully.\"))"},{"line_number":3295,"context_line":"        return targets"},{"line_number":3296,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"bae84128_5f850705","line":3293,"range":{"start_line":3293,"start_character":54,"end_line":3293,"end_character":56},"in_reply_to":"bae84128_3c193889","updated":"2016-02-22 21:22:33.000000000","message":"Is there a justification as to why?  I\u0027m not saying I object, just wondering is there a technical reason?","commit_id":"1a66e6db3522b140116b9f4b998fc76803a567fc"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"3877c66c1fa67afb29060504bc4dc27c86ef31be","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            context.get_admin_context())"},{"line_number":241,"context_line":"        LOG.debug(\"Cinder Volume DB check: vol_db_empty\u003d%s\", vol_db_empty)"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        # We pass the current setting for service.active_backend_id to"},{"line_number":244,"context_line":"        # the driver on init, incase there was a restart or something"},{"line_number":245,"context_line":"        curr_active_backend_id \u003d None"},{"line_number":246,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"},{"line_number":247,"context_line":"        try:"},{"line_number":248,"context_line":"            service \u003d objects.Service.get_by_host_and_topic("},{"line_number":249,"context_line":"                context.get_admin_context(), svc_host,"},{"line_number":250,"context_line":"                CONF.volume_topic)"},{"line_number":251,"context_line":"        except exception.ServiceNotFound:"},{"line_number":252,"context_line":"            # NOTE(jdg): This is to solve problems with unit tests"},{"line_number":253,"context_line":"            LOG.warning(_LW(\"Service not found for updating \""},{"line_number":254,"context_line":"                            \"active_backend_id, assuming default\""},{"line_number":255,"context_line":"                            \"for driver init.\"))"},{"line_number":256,"context_line":"        else:"},{"line_number":257,"context_line":"            curr_active_backend_id \u003d service.active_backend_id"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        self.driver \u003d importutils.import_object("},{"line_number":260,"context_line":"            volume_driver,"}],"source_content_type":"text/x-python","patch_set":31,"id":"bae84128_bb4ad9aa","line":257,"range":{"start_line":243,"start_character":7,"end_line":257,"end_character":62},"updated":"2016-02-24 23:28:24.000000000","message":"After a fail-over, the service is not able to be found and an exception is raised in cinder/db/sqlalchemy/api.py. It looks like the reason is because the model_query in service_get_by_host_and_topic is filtering out all disabled services, which the service is disabled by default after a fail-over.\n\nhttps://github.com/openstack/cinder/blob/master/cinder/db/sqlalchemy/api.py#L423","commit_id":"1d3fb3a4fee7917e4e7238706adb80e643c8c0c9"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"4dca6a0f74cdea54a28dd5c68c6f8c063ca00595","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            context.get_admin_context())"},{"line_number":241,"context_line":"        LOG.debug(\"Cinder Volume DB check: vol_db_empty\u003d%s\", vol_db_empty)"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        # We pass the current setting for service.active_backend_id to"},{"line_number":244,"context_line":"        # the driver on init, incase there was a restart or something"},{"line_number":245,"context_line":"        curr_active_backend_id \u003d None"},{"line_number":246,"context_line":"        svc_host \u003d vol_utils.extract_host(self.host, \u0027backend\u0027)"},{"line_number":247,"context_line":"        try:"},{"line_number":248,"context_line":"            service \u003d objects.Service.get_by_host_and_topic("},{"line_number":249,"context_line":"                context.get_admin_context(), svc_host,"},{"line_number":250,"context_line":"                CONF.volume_topic)"},{"line_number":251,"context_line":"        except exception.ServiceNotFound:"},{"line_number":252,"context_line":"            # NOTE(jdg): This is to solve problems with unit tests"},{"line_number":253,"context_line":"            LOG.warning(_LW(\"Service not found for updating \""},{"line_number":254,"context_line":"                            \"active_backend_id, assuming default\""},{"line_number":255,"context_line":"                            \"for driver init.\"))"},{"line_number":256,"context_line":"        else:"},{"line_number":257,"context_line":"            curr_active_backend_id \u003d service.active_backend_id"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        self.driver \u003d importutils.import_object("},{"line_number":260,"context_line":"            volume_driver,"}],"source_content_type":"text/x-python","patch_set":31,"id":"bae84128_c68f0474","line":257,"range":{"start_line":243,"start_character":7,"end_line":257,"end_character":62},"in_reply_to":"bae84128_bb4ad9aa","updated":"2016-02-24 23:37:45.000000000","message":"Two additional things in this area:\n\n1). When you initiate the failo-ver, the replication_status seems to stay in failing-over state. Is that intended? Or should it go into failed-over state after it is completed?\n\n2). If you restart c-vol after a fail-over, the replication_status is overwritten to reflect the driver stats.\n\n\nPersonally, our driver does not use these fields, and probably will not. But if others do, this might create some issues.","commit_id":"1d3fb3a4fee7917e4e7238706adb80e643c8c0c9"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"d9a6dff93a02fa4a4e87c11e2bacc7be9856e00c","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                            \"replication_status.\"))"},{"line_number":513,"context_line":"        else:"},{"line_number":514,"context_line":"            if service.replication_status \u003d\u003d ("},{"line_number":515,"context_line":"                    fields.ReplicatoinStatus.FAILED_OVER):"},{"line_number":516,"context_line":"                pass"},{"line_number":517,"context_line":"            elif stats and stats.get(\u0027replication_enabled\u0027, False):"},{"line_number":518,"context_line":"                service.replication_status \u003d fields.ReplicationStatus.ENABLED"}],"source_content_type":"text/x-python","patch_set":32,"id":"bae84128_59163256","line":515,"range":{"start_line":515,"start_character":27,"end_line":515,"end_character":44},"updated":"2016-02-25 01:41:03.000000000","message":"ReplicatoinStatus -\u003e ReplicationStatus","commit_id":"6c287f7e77e5804841c0c4219717b1e59f9eca54"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"75960b7990c2b8df7bf608cd24a41dbfca1198c9","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                            \"replication_status.\"))"},{"line_number":513,"context_line":"        else:"},{"line_number":514,"context_line":"            if service.replication_status \u003d\u003d ("},{"line_number":515,"context_line":"                    fields.ReplicatoinStatus.FAILED_OVER):"},{"line_number":516,"context_line":"                pass"},{"line_number":517,"context_line":"            elif stats and stats.get(\u0027replication_enabled\u0027, False):"},{"line_number":518,"context_line":"                service.replication_status \u003d fields.ReplicationStatus.ENABLED"}],"source_content_type":"text/x-python","patch_set":32,"id":"bae84128_dcffd0a8","line":515,"range":{"start_line":515,"start_character":27,"end_line":515,"end_character":44},"in_reply_to":"bae84128_59163256","updated":"2016-02-25 01:48:29.000000000","message":"Also, FAILED_OVER isn\u0027t an option on the enum.","commit_id":"6c287f7e77e5804841c0c4219717b1e59f9eca54"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"df586039877f9bb4098e397f13804dfbbbe1319f","unresolved":true,"context_lines":[{"line_number":250,"context_line":"                CONF.volume_topic)"},{"line_number":251,"context_line":"        except exception.ServiceNotFound:"},{"line_number":252,"context_line":"            # NOTE(jdg): This is to solve problems with unit tests"},{"line_number":253,"context_line":"            LOG.warning(_LW(\"Service not found for updating \""},{"line_number":254,"context_line":"                            \"active_backend_id, assuming default\""},{"line_number":255,"context_line":"                            \"for driver init.\"))"},{"line_number":256,"context_line":"        else:"},{"line_number":257,"context_line":"            curr_active_backend_id \u003d service.active_backend_id"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"4b5f1b2f_ef45abc3","line":255,"range":{"start_line":253,"start_character":0,"end_line":255,"end_character":48},"updated":"2026-07-02 09:19:27.000000000","message":"this seems wrong to me. \nsaying its OK to continue if service not found.\nas this is the only case for unit-tests and not in real prod env.\n\nthis masks prod fails and makes debuging harder or this comment is misleading.","commit_id":"106c14a84be6193e9c067068e3c3e35665ad49fd"}],"cinder/volume/rpcapi.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"424096294e857b41ef54b3439e85403dbdd3f70e","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        1.38 - Update replication methods to reflect new backend rep strategy"},{"line_number":89,"context_line":"    \"\"\""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    RPC_API_VERSION \u003d \u00271.37\u0027"},{"line_number":92,"context_line":"    TOPIC \u003d CONF.volume_topic"},{"line_number":93,"context_line":"    BINARY \u003d \u0027cinder-volume\u0027"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_b62691cc","line":91,"updated":"2016-02-04 04:59:23.000000000","message":"1.38","commit_id":"e76b6e8b3e3a9e8daf620ce884c3f39fccedaeb8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c1751d176d4ef4ca9e3c2b1b2d83cf1e8f0242f5","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        1.38 - Update replication methods to reflect new backend rep strategy"},{"line_number":89,"context_line":"    \"\"\""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    RPC_API_VERSION \u003d \u00271.37\u0027"},{"line_number":92,"context_line":"    TOPIC \u003d CONF.volume_topic"},{"line_number":93,"context_line":"    BINARY \u003d \u0027cinder-volume\u0027"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_dd235a04","line":91,"updated":"2016-02-10 02:56:39.000000000","message":"1.38","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a95fdb6526af74d1a5531f86fa2e28c53995ab39","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        1.38 - Update replication methods to reflect new backend rep strategy"},{"line_number":89,"context_line":"    \"\"\""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    RPC_API_VERSION \u003d \u00271.37\u0027"},{"line_number":92,"context_line":"    TOPIC \u003d CONF.volume_topic"},{"line_number":93,"context_line":"    BINARY \u003d \u0027cinder-volume\u0027"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_53bacbc1","line":91,"in_reply_to":"3a57f1b5_dd235a04","updated":"2016-02-10 20:19:43.000000000","message":"Done","commit_id":"e673466769e890f9c94ceb879aabb6a30df4625d"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c780e101c318c8cca82aa5eafa00fbd8da1b5c57","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                   new_volume\u003dnew_volume,"},{"line_number":297,"context_line":"                   volume_status\u003doriginal_volume_status)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def freeze_host(self, ctxt, host):"},{"line_number":300,"context_line":"        \"\"\"Set backend host to frozen.\"\"\""},{"line_number":301,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":302,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.38\u0027)"},{"line_number":303,"context_line":"        return cctxt.call(ctxt, \u0027freeze_host\u0027)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def thaw_host(self, ctxt, host):"},{"line_number":306,"context_line":"        \"\"\"Clear the frozen setting on a backend host.\"\"\""},{"line_number":307,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":308,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.38\u0027)"},{"line_number":309,"context_line":"        return cctxt.call(ctxt, \u0027thaw_host\u0027)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    def failover_replication(self, ctxt, host,"},{"line_number":312,"context_line":"                             freeze\u003dTrue, secondary_backend_id\u003dNone):"},{"line_number":313,"context_line":"        \"\"\"Failover replication to the specified backend_id (secondary). \"\"\""},{"line_number":314,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":315,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.38\u0027)"},{"line_number":316,"context_line":"        return cctxt.call(ctxt, \u0027failover_replication\u0027,"},{"line_number":317,"context_line":"                          freeze\u003dfreeze,"},{"line_number":318,"context_line":"                          secondary_backend_id\u003dsecondary_backend_id)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def list_replication_targets(self, ctxt, volume):"},{"line_number":321,"context_line":"        new_host \u003d utils.extract_host(volume[\u0027host\u0027])"},{"line_number":322,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.38\u0027)"},{"line_number":323,"context_line":"        return cctxt.call(ctxt, \u0027list_replication_targets\u0027, volume\u003dvolume)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def manage_existing_snapshot(self, ctxt, snapshot, ref, host):"},{"line_number":326,"context_line":"        cctxt \u003d self._get_cctxt(host, \u00271.28\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_3009ad96","line":323,"range":{"start_line":299,"start_character":0,"end_line":323,"end_character":74},"updated":"2016-02-15 16:02:43.000000000","message":"As replication was never exposed to the user we don\u0027t need to make these backward compatible.\n\nYou however should follow the self._get_cctxt convention to not break ZeroMQ support that was added recently.","commit_id":"23fa7832935dd32b67122541034b84f9b8e6e1b7"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"a1ffe4a7260363f86c5c3276536769f13bd47d7e","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def freeze_host(self, ctxt, host):"},{"line_number":300,"context_line":"        \"\"\"Set backend host to frozen.\"\"\""},{"line_number":301,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":302,"context_line":"        cctxt \u003d self._get_cctxt(new_host, \u00271.38\u0027)"},{"line_number":303,"context_line":"        return cctxt.call(ctxt, \u0027freeze_host\u0027)"},{"line_number":304,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_d7582dfd","line":301,"range":{"start_line":301,"start_character":8,"end_line":301,"end_character":43},"updated":"2016-02-15 20:25:02.000000000","message":"Technically this will still work, but get_volume_rpc_host in _get_cctxt will run extract_host for you. Same for 4 methods below.\n\nSorry for not noticing that when asked on IRC.","commit_id":"5bd0eb42829623b0da4e98960c8d2b7ca8e8374e"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"5e72a45179a63ae397c0097a08ab0bd44cb1d0db","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def freeze_host(self, ctxt, host):"},{"line_number":300,"context_line":"        \"\"\"Set backend host to frozen.\"\"\""},{"line_number":301,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":302,"context_line":"        cctxt \u003d self._get_cctxt(new_host, \u00271.38\u0027)"},{"line_number":303,"context_line":"        return cctxt.call(ctxt, \u0027freeze_host\u0027)"},{"line_number":304,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_4391fb98","line":301,"range":{"start_line":301,"start_character":8,"end_line":301,"end_character":43},"in_reply_to":"dae33548_d7582dfd","updated":"2016-02-15 22:29:23.000000000","message":"Oh, excellent!!  I should\u0027ve looked at the method itself! Done","commit_id":"5bd0eb42829623b0da4e98960c8d2b7ca8e8374e"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"c8edebb032f89be79e1a164739cef385d4888827","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                          freeze\u003dfreeze,"},{"line_number":315,"context_line":"                          secondary_backend_id\u003dsecondary_backend_id)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def list_replication_targets(self, ctxt, volume):"},{"line_number":318,"context_line":"        new_host \u003d utils.extract_host(volume[\u0027host\u0027])"},{"line_number":319,"context_line":"        cctxt \u003d self._get_cctxt(new_host, \u00271.38\u0027)"},{"line_number":320,"context_line":"        return cctxt.call(ctxt, \u0027list_replication_targets\u0027, volume\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dae33548_beeb99af","line":317,"range":{"start_line":317,"start_character":45,"end_line":317,"end_character":51},"updated":"2016-02-16 16:07:15.000000000","message":"Volume should probably be removed here? Are we expecting the user to list targets on a volume or for an entire backend?","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"fe0fa7e4b6dcbdfa38a71db125cec5510b960dc1","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        cctxt \u003d self._get_cctxt(volume[\u0027host\u0027], \u00271.15\u0027)"},{"line_number":280,"context_line":"        cctxt.cast(ctxt, \u0027manage_existing\u0027, volume_id\u003dvolume[\u0027id\u0027], ref\u003dref)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def promote_replica(self, ctxt, volume):"},{"line_number":283,"context_line":"        cctxt \u003d self._get_cctxt(volume[\u0027host\u0027], \u00271.17\u0027)"},{"line_number":284,"context_line":"        cctxt.cast(ctxt, \u0027promote_replica\u0027, volume_id\u003dvolume[\u0027id\u0027])"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def reenable_replication(self, ctxt, volume):"},{"line_number":287,"context_line":"        cctxt \u003d self._get_cctxt(volume[\u0027host\u0027], \u00271.17\u0027)"},{"line_number":288,"context_line":"        cctxt.cast(ctxt, \u0027reenable_replication\u0027, volume_id\u003dvolume[\u0027id\u0027])"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def update_migrated_volume(self, ctxt, volume, new_volume,"},{"line_number":291,"context_line":"                               original_volume_status):"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_13b40080","line":288,"range":{"start_line":282,"start_character":0,"end_line":288,"end_character":72},"updated":"2016-02-17 14:44:37.000000000","message":"May be a silly question, but what should happen with these?","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"0d673780c2096bc463ace30325b5d7033a2b680d","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        cctxt \u003d self._get_cctxt(volume[\u0027host\u0027], \u00271.15\u0027)"},{"line_number":280,"context_line":"        cctxt.cast(ctxt, \u0027manage_existing\u0027, volume_id\u003dvolume[\u0027id\u0027], ref\u003dref)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def promote_replica(self, ctxt, volume):"},{"line_number":283,"context_line":"        cctxt \u003d self._get_cctxt(volume[\u0027host\u0027], \u00271.17\u0027)"},{"line_number":284,"context_line":"        cctxt.cast(ctxt, \u0027promote_replica\u0027, volume_id\u003dvolume[\u0027id\u0027])"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def reenable_replication(self, ctxt, volume):"},{"line_number":287,"context_line":"        cctxt \u003d self._get_cctxt(volume[\u0027host\u0027], \u00271.17\u0027)"},{"line_number":288,"context_line":"        cctxt.cast(ctxt, \u0027reenable_replication\u0027, volume_id\u003dvolume[\u0027id\u0027])"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def update_migrated_volume(self, ctxt, volume, new_volume,"},{"line_number":291,"context_line":"                               original_volume_status):"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_367bf229","line":288,"range":{"start_line":282,"start_character":0,"end_line":288,"end_character":72},"in_reply_to":"dae33548_13b40080","updated":"2016-02-17 14:51:24.000000000","message":"These are the Replication V1, old versioned implementation of Replication. We have not removed them yet, since there are drivers implementing these APIs.\n\nSo far, you can focus on the new api of replication v2.0 and 2.1(cheesecake.)\n\nIf you try these APIs mixing with v2 and v2.1, things will go bananas. Do not do that!!!","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"44575d26a330dfc2fa14d8eecc92ce0fed51908b","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        cctxt \u003d self._get_cctxt(volume[\u0027host\u0027], \u00271.15\u0027)"},{"line_number":280,"context_line":"        cctxt.cast(ctxt, \u0027manage_existing\u0027, volume_id\u003dvolume[\u0027id\u0027], ref\u003dref)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def promote_replica(self, ctxt, volume):"},{"line_number":283,"context_line":"        cctxt \u003d self._get_cctxt(volume[\u0027host\u0027], \u00271.17\u0027)"},{"line_number":284,"context_line":"        cctxt.cast(ctxt, \u0027promote_replica\u0027, volume_id\u003dvolume[\u0027id\u0027])"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def reenable_replication(self, ctxt, volume):"},{"line_number":287,"context_line":"        cctxt \u003d self._get_cctxt(volume[\u0027host\u0027], \u00271.17\u0027)"},{"line_number":288,"context_line":"        cctxt.cast(ctxt, \u0027reenable_replication\u0027, volume_id\u003dvolume[\u0027id\u0027])"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def update_migrated_volume(self, ctxt, volume, new_volume,"},{"line_number":291,"context_line":"                               original_volume_status):"}],"source_content_type":"text/x-python","patch_set":14,"id":"dae33548_9e7e4717","line":288,"range":{"start_line":282,"start_character":0,"end_line":288,"end_character":72},"in_reply_to":"dae33548_367bf229","updated":"2016-02-17 18:29:07.000000000","message":"I think they should die a horrible death, but there is a very off chance that somebody is still using them.  In the past IBM has stated they will get 2.x implemented and we can make these go away.  They\u0027re slightly better than useless at this point IMHO.","commit_id":"fa40cdc6d75fd3f17fe81c6e6c7204ca5ebc56bc"}],"doc/source/devref/replication.rst":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"fdda4042701d3d304f8c72da3278fa0778cbe0ba","unresolved":false,"context_lines":[{"line_number":129,"context_line":"They include::"},{"line_number":130,"context_line":"    replication_failover(self, context, volumes)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"**replication_enable**"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"Used to notify the driver that we would like to enable replication on a replication capable volume."},{"line_number":135,"context_line":"NOTE this is NOT used as the initial create replication command, that\u0027s handled by the volume-type at"},{"line_number":136,"context_line":"create time.  This is provided as a method for an Admin that may have needed to disable replication"},{"line_number":137,"context_line":"on a volume for maintenance or whatever reason to signify that they\u0027d like to \"resume\" replication on"},{"line_number":138,"context_line":"the given volume."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"**replication_disable**"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Used to notify the driver that we would like to disable replication on a replication capable volume."},{"line_number":143,"context_line":"This again would be used by a Cloud Administrator for things like maintenance etc."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"**replication_failover**"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3a57f1b5_d5ef34e7","line":143,"range":{"start_line":132,"start_character":0,"end_line":143,"end_character":82},"updated":"2016-02-12 01:12:24.000000000","message":"should probably delete these from here","commit_id":"87afbe2b419b11b0fc759c63d6b5ee00846e0c7e"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c780e101c318c8cca82aa5eafa00fbd8da1b5c57","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"*NOTE:*"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"There is one standaredized and REQUIRED key in the config"},{"line_number":57,"context_line":"entry, all others are vendor-unique:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"* target_device_id:\u003cvendor-identifier-for-rep-target\u003e"}],"source_content_type":"text/x-rst","patch_set":8,"id":"dae33548_b06add18","line":56,"range":{"start_line":56,"start_character":13,"end_line":56,"end_character":26},"updated":"2016-02-15 16:02:43.000000000","message":"standardized?","commit_id":"23fa7832935dd32b67122541034b84f9b8e6e1b7"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"41a239f2a3ea0f19e11f1cd124dee88af6459d14","unresolved":false,"context_lines":[{"line_number":52,"context_line":"like to configure."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"*NOTE:*"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"There is one standaredized and REQUIRED key in the config"},{"line_number":57,"context_line":"entry, all others are vendor-unique:"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"dae33548_8ca3fd4e","line":55,"updated":"2016-02-16 20:22:04.000000000","message":"s/standaredized/standardized","commit_id":"6b68b92f213f0019c3d07498e015f86ab05027b8"}]}
