)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"0d10fa108aef0591c4ce7fda2ee96aba6192a042","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add custom keyring when initializing RBD connection"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added RBD keyring configuration parameter which will help administrator"},{"line_number":10,"context_line":"set an custom keyring path to the Ceph cluster."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Closes-bug: #1668304"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ff0f0b1f_c1721112","line":10,"range":{"start_line":10,"start_character":3,"end_line":10,"end_character":6},"updated":"2017-05-17 14:43:15.000000000","message":"an -\u003e a","commit_id":"2a42287e3c7f28a60c1b83ceb7cb49a14c0b547c"}],"cinder/tests/unit/volume/drivers/test_rbd.py":[{"author":{"_account_id":20570,"name":"Adam Kijak","email":"adam.kijak@corp.ovh.com","username":"adam.kijak"},"change_message_id":"b7550978d610d3d95fb91f2a3ba345b0b846aed4","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"        self._initialize_connection_helper(expected, hosts, ports)"},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"    def test__get_keyring_contents_no_config_file(self):"},{"line_number":1215,"context_line":"        self.cfg.rbd_keyring_conf \u003d None"},{"line_number":1216,"context_line":"        self.assertEqual(self.driver._get_keyring_contents(), None)"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"    @mock.patch(\u0027os.path.isfile\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff0f0b1f_0d72dead","line":1215,"updated":"2017-05-23 10:49:54.000000000","message":"I think that overriding variable self.cfg.rbd_keyring_conf may affect other tests because it\u0027s used also in other tests.\nThe same applies for L1194.","commit_id":"2a42287e3c7f28a60c1b83ceb7cb49a14c0b547c"},{"author":{"_account_id":20676,"name":"daniel.pawlik","display_name":"Daniel Pawlik","email":"dpawlik@redhat.com","username":"daniel.pawlik"},"change_message_id":"cc31224ede4d8366f7d7af57f765216315f5fd9f","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"        self._initialize_connection_helper(expected, hosts, ports)"},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"    def test__get_keyring_contents_no_config_file(self):"},{"line_number":1215,"context_line":"        self.cfg.rbd_keyring_conf \u003d None"},{"line_number":1216,"context_line":"        self.assertEqual(self.driver._get_keyring_contents(), None)"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"    @mock.patch(\u0027os.path.isfile\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff0f0b1f_fd4991b6","line":1215,"in_reply_to":"ff0f0b1f_0d72dead","updated":"2017-05-23 15:56:32.000000000","message":"Yes, but we are adding this functionality in this PS so IMHO in the future when someone will use it, it will be changed.","commit_id":"2a42287e3c7f28a60c1b83ceb7cb49a14c0b547c"},{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"885ac7a82ea9d2b8c2f1adcc45477c89388e4696","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"                \u0027volume_id\u0027: self.volume_a.id,"},{"line_number":1208,"context_line":"                \u0027discard\u0027: True,"},{"line_number":1209,"context_line":"                \u0027keyring\u0027: None"},{"line_number":1210,"context_line":"            }"},{"line_number":1211,"context_line":"        }"},{"line_number":1212,"context_line":"        self._initialize_connection_helper(expected, hosts, ports)"},{"line_number":1213,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7f231b9d_03cc5fba","line":1210,"updated":"2017-06-12 19:07:42.000000000","message":"Lets consolidate this to prevent the above duplication.","commit_id":"44fb4fd8061b2971c24d515319cee054519a9405"}],"cinder/volume/drivers/rbd.py":[{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"b87e96d3656ca5aa2d23ea117301c18666ecf816","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"        \"\"\"Removes an export for a logical volume.\"\"\""},{"line_number":1027,"context_line":"        pass"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"    def _parse_keyring_file(self):"},{"line_number":1030,"context_line":"        keyring_file \u003d self.configuration.rbd_keyring_conf"},{"line_number":1031,"context_line":"        if not keyring_file:"},{"line_number":1032,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f013ff3_5c5fd971","line":1029,"updated":"2017-05-16 14:20:41.000000000","message":"No parsing is taking place here, perhaps \u0027get_keyring_contents\u0027 would be a more appropriate function name.","commit_id":"99026ee417f44782f9447df058536583bbd16874"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"5ec6ef1dfc22aab98bf50670c266accdb4ff9ea8","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"            if os.path.isfile(keyring_file):"},{"line_number":1035,"context_line":"                with open(keyring_file, \u0027r\u0027) as k_file:"},{"line_number":1036,"context_line":"                    keyring \u003d k_file.read()"},{"line_number":1037,"context_line":"        except IOError:"},{"line_number":1038,"context_line":"            LOG.warning(\"Can not read RBD keyring file. %s\", keyring_file)"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"        return keyring"},{"line_number":1041,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1f013ff3_625d50e8","line":1038,"range":{"start_line":1037,"start_character":0,"end_line":1038,"end_character":74},"updated":"2017-05-16 14:53:56.000000000","message":"It would seem to me that you would want to throw an exception here.  Otherwise the user thinks they have specified a key_ring but are not running with one.  So, it would seem an exception would be a safer approach.","commit_id":"13b24369d99878dccaa5ff34d9218157148b73c0"},{"author":{"_account_id":20676,"name":"daniel.pawlik","display_name":"Daniel Pawlik","email":"dpawlik@redhat.com","username":"daniel.pawlik"},"change_message_id":"30bfd8d44cfc421cbdee90d7c4481143a5dfcf2f","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"            if os.path.isfile(keyring_file):"},{"line_number":1035,"context_line":"                with open(keyring_file, \u0027r\u0027) as k_file:"},{"line_number":1036,"context_line":"                    keyring \u003d k_file.read()"},{"line_number":1037,"context_line":"        except IOError:"},{"line_number":1038,"context_line":"            LOG.warning(\"Can not read RBD keyring file. %s\", keyring_file)"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"        return keyring"},{"line_number":1041,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1f013ff3_e8ba5f08","line":1038,"range":{"start_line":1037,"start_character":0,"end_line":1038,"end_character":74},"in_reply_to":"1f013ff3_625d50e8","updated":"2017-05-16 15:39:54.000000000","message":"Agree","commit_id":"13b24369d99878dccaa5ff34d9218157148b73c0"},{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"885ac7a82ea9d2b8c2f1adcc45477c89388e4696","unresolved":false,"context_lines":[{"line_number":60,"context_line":"               default\u003d\u0027\u0027,  # default determined by librados"},{"line_number":61,"context_line":"               help\u003d\u0027Path to the ceph configuration file\u0027),"},{"line_number":62,"context_line":"    cfg.StrOpt(\u0027rbd_keyring_conf\u0027,"},{"line_number":63,"context_line":"               default\u003dNone,"},{"line_number":64,"context_line":"               help\u003d\u0027Path to the ceph keyring file\u0027),"},{"line_number":65,"context_line":"    cfg.BoolOpt(\u0027rbd_flatten_volume_from_snapshot\u0027,"},{"line_number":66,"context_line":"                default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f231b9d_6347934d","line":63,"updated":"2017-06-12 19:07:42.000000000","message":"The default for a string option is \u0027\u0027 which is fine, you can remove this.","commit_id":"44fb4fd8061b2971c24d515319cee054519a9405"},{"author":{"_account_id":20676,"name":"daniel.pawlik","display_name":"Daniel Pawlik","email":"dpawlik@redhat.com","username":"daniel.pawlik"},"change_message_id":"b000d05b59608345f6b2a8bc6b1d966bb9b88fc6","unresolved":false,"context_lines":[{"line_number":60,"context_line":"               default\u003d\u0027\u0027,  # default determined by librados"},{"line_number":61,"context_line":"               help\u003d\u0027Path to the ceph configuration file\u0027),"},{"line_number":62,"context_line":"    cfg.StrOpt(\u0027rbd_keyring_conf\u0027,"},{"line_number":63,"context_line":"               default\u003dNone,"},{"line_number":64,"context_line":"               help\u003d\u0027Path to the ceph keyring file\u0027),"},{"line_number":65,"context_line":"    cfg.BoolOpt(\u0027rbd_flatten_volume_from_snapshot\u0027,"},{"line_number":66,"context_line":"                default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f231b9d_3ec76648","line":63,"in_reply_to":"7f231b9d_6347934d","updated":"2017-06-13 07:09:42.000000000","message":"If I change default value from None to \u0027\u0027 I should make a patch for os-brick condition: https://github.com/openstack/os-brick/blob/master/os_brick/initiator/connectors/rbd.py#L74 \n\nfrom e.g.: if X is None to if not X","commit_id":"44fb4fd8061b2971c24d515319cee054519a9405"},{"author":{"_account_id":20676,"name":"daniel.pawlik","display_name":"Daniel Pawlik","email":"dpawlik@redhat.com","username":"daniel.pawlik"},"change_message_id":"96c16b83e66d8f06914654327bfe114f3b437269","unresolved":false,"context_lines":[{"line_number":60,"context_line":"               default\u003d\u0027\u0027,  # default determined by librados"},{"line_number":61,"context_line":"               help\u003d\u0027Path to the ceph configuration file\u0027),"},{"line_number":62,"context_line":"    cfg.StrOpt(\u0027rbd_keyring_conf\u0027,"},{"line_number":63,"context_line":"               default\u003dNone,"},{"line_number":64,"context_line":"               help\u003d\u0027Path to the ceph keyring file\u0027),"},{"line_number":65,"context_line":"    cfg.BoolOpt(\u0027rbd_flatten_volume_from_snapshot\u0027,"},{"line_number":66,"context_line":"                default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f231b9d_e7b82f2b","line":63,"in_reply_to":"7f231b9d_6347934d","updated":"2017-06-13 14:48:29.000000000","message":"In _get_keyring_contents it will raise an IOError so in OS-brick it will check default path. My last comment is not up to date","commit_id":"44fb4fd8061b2971c24d515319cee054519a9405"},{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"885ac7a82ea9d2b8c2f1adcc45477c89388e4696","unresolved":false,"context_lines":[{"line_number":1029,"context_line":"    def _get_keyring_contents(self):"},{"line_number":1030,"context_line":"        keyring_file \u003d self.configuration.rbd_keyring_conf"},{"line_number":1031,"context_line":"        if not keyring_file:"},{"line_number":1032,"context_line":"            return"},{"line_number":1033,"context_line":"        try:"},{"line_number":1034,"context_line":"            if os.path.isfile(keyring_file):"},{"line_number":1035,"context_line":"                with open(keyring_file, \u0027r\u0027) as k_file:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f231b9d_c369c7be","line":1032,"updated":"2017-06-12 19:07:42.000000000","message":"This conditional is not necessary, the following try/catch will handle unset and invalid keyring paths.","commit_id":"44fb4fd8061b2971c24d515319cee054519a9405"},{"author":{"_account_id":20676,"name":"daniel.pawlik","display_name":"Daniel Pawlik","email":"dpawlik@redhat.com","username":"daniel.pawlik"},"change_message_id":"03fea1bea7fedafd8bdc3bafc04b94fd592525b5","unresolved":false,"context_lines":[{"line_number":1029,"context_line":"    def _get_keyring_contents(self):"},{"line_number":1030,"context_line":"        keyring_file \u003d self.configuration.rbd_keyring_conf"},{"line_number":1031,"context_line":"        if not keyring_file:"},{"line_number":1032,"context_line":"            return"},{"line_number":1033,"context_line":"        try:"},{"line_number":1034,"context_line":"            if os.path.isfile(keyring_file):"},{"line_number":1035,"context_line":"                with open(keyring_file, \u0027r\u0027) as k_file:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f231b9d_09ffc434","line":1032,"in_reply_to":"7f231b9d_c369c7be","updated":"2017-06-13 14:47:02.000000000","message":"Done","commit_id":"44fb4fd8061b2971c24d515319cee054519a9405"},{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"885ac7a82ea9d2b8c2f1adcc45477c89388e4696","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"                    return k_file.read()"},{"line_number":1037,"context_line":"        except IOError:"},{"line_number":1038,"context_line":"            msg \u003d (_(\"Can not read RBD keyring file: %s.\") % (keyring_file))"},{"line_number":1039,"context_line":"            raise exception.CinderException(msg)"},{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"    def initialize_connection(self, volume, connector):"},{"line_number":1042,"context_line":"        hosts, ports \u003d self._get_mon_addrs()"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f231b9d_e382834f","line":1039,"updated":"2017-06-12 19:07:42.000000000","message":"I would return None here quietly, but with a debug message so that we can see the fallback if we want to.","commit_id":"44fb4fd8061b2971c24d515319cee054519a9405"},{"author":{"_account_id":20676,"name":"daniel.pawlik","display_name":"Daniel Pawlik","email":"dpawlik@redhat.com","username":"daniel.pawlik"},"change_message_id":"03fea1bea7fedafd8bdc3bafc04b94fd592525b5","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"                    return k_file.read()"},{"line_number":1037,"context_line":"        except IOError:"},{"line_number":1038,"context_line":"            msg \u003d (_(\"Can not read RBD keyring file: %s.\") % (keyring_file))"},{"line_number":1039,"context_line":"            raise exception.CinderException(msg)"},{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"    def initialize_connection(self, volume, connector):"},{"line_number":1042,"context_line":"        hosts, ports \u003d self._get_mon_addrs()"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f231b9d_2904c049","line":1039,"in_reply_to":"7f231b9d_e382834f","updated":"2017-06-13 14:47:02.000000000","message":"Done","commit_id":"44fb4fd8061b2971c24d515319cee054519a9405"},{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"885ac7a82ea9d2b8c2f1adcc45477c89388e4696","unresolved":false,"context_lines":[{"line_number":1057,"context_line":"                \u0027secret_uuid\u0027: self.configuration.rbd_secret_uuid,"},{"line_number":1058,"context_line":"                \u0027volume_id\u0027: volume.id,"},{"line_number":1059,"context_line":"                \"discard\": True,"},{"line_number":1060,"context_line":"                \u0027keyring\u0027: keyring,"},{"line_number":1061,"context_line":"            }"},{"line_number":1062,"context_line":"        }"},{"line_number":1063,"context_line":"        LOG.debug(\u0027connection data: %s\u0027, data)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f231b9d_83e62f44","line":1060,"updated":"2017-06-12 19:07:42.000000000","message":"You can remove the earlier assignment and just call _get_keyring_contents() here.","commit_id":"44fb4fd8061b2971c24d515319cee054519a9405"},{"author":{"_account_id":20676,"name":"daniel.pawlik","display_name":"Daniel Pawlik","email":"dpawlik@redhat.com","username":"daniel.pawlik"},"change_message_id":"03fea1bea7fedafd8bdc3bafc04b94fd592525b5","unresolved":false,"context_lines":[{"line_number":1057,"context_line":"                \u0027secret_uuid\u0027: self.configuration.rbd_secret_uuid,"},{"line_number":1058,"context_line":"                \u0027volume_id\u0027: volume.id,"},{"line_number":1059,"context_line":"                \"discard\": True,"},{"line_number":1060,"context_line":"                \u0027keyring\u0027: keyring,"},{"line_number":1061,"context_line":"            }"},{"line_number":1062,"context_line":"        }"},{"line_number":1063,"context_line":"        LOG.debug(\u0027connection data: %s\u0027, data)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f231b9d_69b87875","line":1060,"in_reply_to":"7f231b9d_83e62f44","updated":"2017-06-13 14:47:02.000000000","message":"Done","commit_id":"44fb4fd8061b2971c24d515319cee054519a9405"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ed138515296f5f614cdb9a967e26cd443397f10f","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"                with open(keyring_file, \u0027r\u0027) as k_file:"},{"line_number":1037,"context_line":"                    keyring_data \u003d k_file.read()"},{"line_number":1038,"context_line":"        except IOError:"},{"line_number":1039,"context_line":"            LOG.debug(\u0027Can not read RBD keyring file: %s.\u0027, keyring_file)"},{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"        return keyring_data"},{"line_number":1042,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7f231b9d_8156e75b","line":1039,"range":{"start_line":1039,"start_character":23,"end_line":1039,"end_character":30},"updated":"2017-06-14 12:52:34.000000000","message":"Cannot","commit_id":"43e0f5f686f2cbfd4314c480347ecaf0a95de57e"}]}
