)]}'
{"os_brick/initiator/connectors/iscsi.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"39a67fd6246b0454189351f8c3312fc81588b0af","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        \"\"\""},{"line_number":792,"context_line":"        paths \u003d []"},{"line_number":793,"context_line":"        for target in ips_iqns_luns:"},{"line_number":794,"context_line":"            paths.extend(self._get_device_path({\u0027target_portal\u0027: target[0],"},{"line_number":795,"context_line":"                                                \u0027target_iqn\u0027: target[1],"},{"line_number":796,"context_line":"                                                \u0027target_lun\u0027: target[2]}))"},{"line_number":797,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_d03bf198","line":794,"updated":"2019-02-16 12:38:29.000000000","message":"I think we should be using sysfs instead of symlinks here... We could do something similar to what I did in method `_get_connection_devices`, which gathers the info from iscsiadm and uses sysfs directly to get the devices.\n\nIn this case we would just look for a specific target-portal-lun and ignore the rest.","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"11810f99f8dc6662e76f008599c7ced3ec929f47","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        \"\"\""},{"line_number":792,"context_line":"        paths \u003d []"},{"line_number":793,"context_line":"        for target in ips_iqns_luns:"},{"line_number":794,"context_line":"            paths.extend(self._get_device_path({\u0027target_portal\u0027: target[0],"},{"line_number":795,"context_line":"                                                \u0027target_iqn\u0027: target[1],"},{"line_number":796,"context_line":"                                                \u0027target_lun\u0027: target[2]}))"},{"line_number":797,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_26ce6b83","line":794,"in_reply_to":"9fdfeff1_63a00193","updated":"2019-02-21 13:33:01.000000000","message":"Done","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"92f159a234f5f15e51a17d57b920bdfcb77dad91","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        \"\"\""},{"line_number":792,"context_line":"        paths \u003d []"},{"line_number":793,"context_line":"        for target in ips_iqns_luns:"},{"line_number":794,"context_line":"            paths.extend(self._get_device_path({\u0027target_portal\u0027: target[0],"},{"line_number":795,"context_line":"                                                \u0027target_iqn\u0027: target[1],"},{"line_number":796,"context_line":"                                                \u0027target_lun\u0027: target[2]}))"},{"line_number":797,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_eb8f28ca","line":794,"in_reply_to":"9fdfeff1_d03bf198","updated":"2019-02-16 18:42:22.000000000","message":"What do you mean by the last sentence?  Couldn\u0027t I just change these 3 lines of code to:\ndevices \u003d _get_connection_devices(None, ips_iqns_luns)?","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"848a5a9e29fdb55eb8aafc33ea5e3080cd85f2df","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        \"\"\""},{"line_number":792,"context_line":"        paths \u003d []"},{"line_number":793,"context_line":"        for target in ips_iqns_luns:"},{"line_number":794,"context_line":"            paths.extend(self._get_device_path({\u0027target_portal\u0027: target[0],"},{"line_number":795,"context_line":"                                                \u0027target_iqn\u0027: target[1],"},{"line_number":796,"context_line":"                                                \u0027target_lun\u0027: target[2]}))"},{"line_number":797,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_63a00193","line":794,"in_reply_to":"9fdfeff1_eb8f28ca","updated":"2019-02-20 09:37:07.000000000","message":"You can, but then you are doing extra work, because you are not limiting the glob to just the luns...  But then again, it\u0027s probably best to reuse a method we already know works than write a new one for a small optimization.\n\nSo yes, you should just use _get_connection_devices.","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"e701831e8817ab7bb44fe8de330dfa76e8d02bea","unresolved":false,"context_lines":[{"line_number":800,"context_line":"            if not os.path.exists(path):"},{"line_number":801,"context_line":"                continue"},{"line_number":802,"context_line":"            full_dev \u003d os.path.realpath(path)"},{"line_number":803,"context_line":"            if os.path.split(full_dev)[0] \u003d\u003d \u0027/dev\u0027:"},{"line_number":804,"context_line":"                dev \u003d os.path.split(full_dev)[1]"},{"line_number":805,"context_line":"                multipath_dm \u003d self._linuxscsi.find_sysfs_multipath_dm([dev])"},{"line_number":806,"context_line":"                if not multipath_dm:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_dc355a46","line":803,"range":{"start_line":803,"start_character":15,"end_line":803,"end_character":38},"updated":"2019-02-15 16:01:29.000000000","message":"Instead of splitting the string multiple times, it might be better to split it once up front and assign to a variable that can be used throughout.","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"11810f99f8dc6662e76f008599c7ced3ec929f47","unresolved":false,"context_lines":[{"line_number":800,"context_line":"            if not os.path.exists(path):"},{"line_number":801,"context_line":"                continue"},{"line_number":802,"context_line":"            full_dev \u003d os.path.realpath(path)"},{"line_number":803,"context_line":"            if os.path.split(full_dev)[0] \u003d\u003d \u0027/dev\u0027:"},{"line_number":804,"context_line":"                dev \u003d os.path.split(full_dev)[1]"},{"line_number":805,"context_line":"                multipath_dm \u003d self._linuxscsi.find_sysfs_multipath_dm([dev])"},{"line_number":806,"context_line":"                if not multipath_dm:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_c6bd1fd8","line":803,"range":{"start_line":803,"start_character":15,"end_line":803,"end_character":38},"in_reply_to":"9fdfeff1_0b8b8cbf","updated":"2019-02-21 13:33:01.000000000","message":"Removed this code anyway","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"92f159a234f5f15e51a17d57b920bdfcb77dad91","unresolved":false,"context_lines":[{"line_number":800,"context_line":"            if not os.path.exists(path):"},{"line_number":801,"context_line":"                continue"},{"line_number":802,"context_line":"            full_dev \u003d os.path.realpath(path)"},{"line_number":803,"context_line":"            if os.path.split(full_dev)[0] \u003d\u003d \u0027/dev\u0027:"},{"line_number":804,"context_line":"                dev \u003d os.path.split(full_dev)[1]"},{"line_number":805,"context_line":"                multipath_dm \u003d self._linuxscsi.find_sysfs_multipath_dm([dev])"},{"line_number":806,"context_line":"                if not multipath_dm:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_0b8b8cbf","line":803,"range":{"start_line":803,"start_character":15,"end_line":803,"end_character":38},"in_reply_to":"9fdfeff1_dc355a46","updated":"2019-02-16 18:42:22.000000000","message":"OK, if this code still exists after Gorka\u0027s comment about using sysfs rather than symlinks I will do that.","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"39a67fd6246b0454189351f8c3312fc81588b0af","unresolved":false,"context_lines":[{"line_number":808,"context_line":"                devices_to_clean[multipath_dm].append(dev)"},{"line_number":809,"context_line":"                LOG.warning(\u0027Found defunct device to clean: %s\u0027, full_dev)"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        for multipath_dm, devices in devices_to_clean.items():"},{"line_number":812,"context_line":"            LOG.info(\u0027Cleaning defunct devices: %s\u0027, \u0027, \u0027.join(devices))"},{"line_number":813,"context_line":"            self._linuxscsi.remove_connection(devices, multipath_dm !\u003d \u0027None\u0027,"},{"line_number":814,"context_line":"                                              force\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_5047011e","line":811,"updated":"2019-02-16 12:38:29.000000000","message":"Should we check the WWN if we have it and only remove it if it\u0027s different?\n\nI have mixed feelings, because if it\u0027s the same device, we have buffered data that hadn\u0027t been written, and we haven\u0027t written data to this volume on any other host, we could prevent data loss by preserving the device.  On the other hand, if we have attached the volume on some other host and written data, we could be corrupting it...","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"848a5a9e29fdb55eb8aafc33ea5e3080cd85f2df","unresolved":false,"context_lines":[{"line_number":808,"context_line":"                devices_to_clean[multipath_dm].append(dev)"},{"line_number":809,"context_line":"                LOG.warning(\u0027Found defunct device to clean: %s\u0027, full_dev)"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        for multipath_dm, devices in devices_to_clean.items():"},{"line_number":812,"context_line":"            LOG.info(\u0027Cleaning defunct devices: %s\u0027, \u0027, \u0027.join(devices))"},{"line_number":813,"context_line":"            self._linuxscsi.remove_connection(devices, multipath_dm !\u003d \u0027None\u0027,"},{"line_number":814,"context_line":"                                              force\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_43c05d2b","line":811,"in_reply_to":"9fdfeff1_2b053046","updated":"2019-02-20 09:37:07.000000000","message":"I\u0027m OK with that as long as we all agree.  It would be good to add a comment here to reflect that we\u0027ve made this conscious decision.","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"11810f99f8dc6662e76f008599c7ced3ec929f47","unresolved":false,"context_lines":[{"line_number":808,"context_line":"                devices_to_clean[multipath_dm].append(dev)"},{"line_number":809,"context_line":"                LOG.warning(\u0027Found defunct device to clean: %s\u0027, full_dev)"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        for multipath_dm, devices in devices_to_clean.items():"},{"line_number":812,"context_line":"            LOG.info(\u0027Cleaning defunct devices: %s\u0027, \u0027, \u0027.join(devices))"},{"line_number":813,"context_line":"            self._linuxscsi.remove_connection(devices, multipath_dm !\u003d \u0027None\u0027,"},{"line_number":814,"context_line":"                                              force\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_104efd37","line":811,"in_reply_to":"9fdfeff1_43c05d2b","updated":"2019-02-21 13:33:01.000000000","message":"Added note to docstring","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"92f159a234f5f15e51a17d57b920bdfcb77dad91","unresolved":false,"context_lines":[{"line_number":808,"context_line":"                devices_to_clean[multipath_dm].append(dev)"},{"line_number":809,"context_line":"                LOG.warning(\u0027Found defunct device to clean: %s\u0027, full_dev)"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        for multipath_dm, devices in devices_to_clean.items():"},{"line_number":812,"context_line":"            LOG.info(\u0027Cleaning defunct devices: %s\u0027, \u0027, \u0027.join(devices))"},{"line_number":813,"context_line":"            self._linuxscsi.remove_connection(devices, multipath_dm !\u003d \u0027None\u0027,"},{"line_number":814,"context_line":"                                              force\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_2b053046","line":811,"in_reply_to":"9fdfeff1_5047011e","updated":"2019-02-16 18:42:22.000000000","message":"I think it\u0027s safer to discard the data. Applications/File-systems will probably deal better with the last writes being discarded (as would happen with any disk that has a write cache), rather than taking the risk of the volume being used on another host and then corrupting it later on.","commit_id":"2ef1d650693bdc5989128e84e423ad2d44c7005b"}]}
