)]}'
{"os_brick/initiator/connectors/nvmeof.py":[{"author":{"_account_id":28050,"name":"Maciej Szwed","email":"maciej.szwed@intel.com","username":"maciejszwed"},"change_message_id":"4461b7e42deee37260dccc6261fcd565c284afb8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        file_path \u003d \u0027/etc/nvme/hostnqn\u0027"},{"line_number":73,"context_line":"        try:"},{"line_number":74,"context_line":"            host_nqn, _err \u003d self._execute(\u0027cat\u0027, file_path,"},{"line_number":75,"context_line":"                                           root_helper\u003dself._root_helper,"},{"line_number":76,"context_line":"                                           run_as_root\u003dTrue)"},{"line_number":77,"context_line":"            return host_nqn.strip()"},{"line_number":78,"context_line":"        except putils.ProcessExecutionError:"},{"line_number":79,"context_line":"            LOG.warning(\"Could not find the NVMe host NQN File %s\","}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_1e96da40","line":76,"range":{"start_line":74,"start_character":0,"end_line":76,"end_character":60},"updated":"2019-09-24 09:55:01.000000000","message":"When we use -q flag when connecting (line 179) we overwrite what is in /etc/nvme/hostnqn\nBecause of that we should store host nqn used while connecting (if it was used) and check here if such host nqn was stored at connection time. If yes then use the stored one otherwise use one present in /etc/nvme/hostnqn","commit_id":"1fbf79dcb2b7a668e2ce515e078f7efee6e9924b"},{"author":{"_account_id":31019,"name":"Przemyslaw Szczerbik","email":"przemyslawx.szczerbik@intel.com","username":"pszczerx"},"change_message_id":"ad7c98d9df0d78c62f1863cae8651f6a51940e49","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        file_path \u003d \u0027/etc/nvme/hostnqn\u0027"},{"line_number":73,"context_line":"        try:"},{"line_number":74,"context_line":"            host_nqn, _err \u003d self._execute(\u0027cat\u0027, file_path,"},{"line_number":75,"context_line":"                                           root_helper\u003dself._root_helper,"},{"line_number":76,"context_line":"                                           run_as_root\u003dTrue)"},{"line_number":77,"context_line":"            return host_nqn.strip()"},{"line_number":78,"context_line":"        except putils.ProcessExecutionError:"},{"line_number":79,"context_line":"            LOG.warning(\"Could not find the NVMe host NQN File %s\","}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_54d511e4","line":76,"range":{"start_line":74,"start_character":0,"end_line":76,"end_character":60},"in_reply_to":"3fa7e38b_1e96da40","updated":"2019-09-24 11:45:40.000000000","message":"I guess it means that host_nqn value passed to connect_volume() would have to be stored in a DB, because get_connector_properties() is a static method, which creates a new NVMeOFConnector object. Did I understand you correctly?","commit_id":"1fbf79dcb2b7a668e2ce515e078f7efee6e9924b"},{"author":{"_account_id":31019,"name":"Przemyslaw Szczerbik","email":"przemyslawx.szczerbik@intel.com","username":"pszczerx"},"change_message_id":"2924f2758206266e1f340fb4c2420944d7a916f0","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        file_path \u003d \u0027/etc/nvme/hostnqn\u0027"},{"line_number":73,"context_line":"        try:"},{"line_number":74,"context_line":"            host_nqn, _err \u003d self._execute(\u0027cat\u0027, file_path,"},{"line_number":75,"context_line":"                                           root_helper\u003dself._root_helper,"},{"line_number":76,"context_line":"                                           run_as_root\u003dTrue)"},{"line_number":77,"context_line":"            return host_nqn.strip()"},{"line_number":78,"context_line":"        except putils.ProcessExecutionError:"},{"line_number":79,"context_line":"            LOG.warning(\"Could not find the NVMe host NQN File %s\","}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_96b77ff6","line":76,"range":{"start_line":74,"start_character":0,"end_line":76,"end_character":60},"in_reply_to":"3fa7e38b_54d511e4","updated":"2019-11-07 09:00:47.000000000","message":"\u003e I guess it means that host_nqn value passed to connect_volume()\n \u003e would have to be stored in a DB, because get_connector_properties()\n \u003e is a static method, which creates a new NVMeOFConnector object. Did\n \u003e I understand you correctly?\n\nAfter taking a closer look at this approach, I think that storing host nqn in a DB doesn\u0027t fit os-brick design. os-brick is a small, stateless module and its implementation should be kept as simple as possible.\n\nThe idea behind my patch, was to retrieve host NQN value from a default location, in a similar fashion as it\u0027s done for IQN in iSCSI connector.\n\nIf user chooses to ignore the default value and overwrite it, I don\u0027t think it\u0027s os-brick responsibility to keep track of it.\n\nI\u0027d appreciate any additional feedback on this.","commit_id":"1fbf79dcb2b7a668e2ce515e078f7efee6e9924b"}]}
