)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f414fae7a37f23d0231565bd53ab010a46feb33d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"7b78dc53_555452cb","updated":"2024-01-30 11:20:50.000000000","message":"Thank you for working on this fix.\n\nI don\u0027t like the idea of trying a different way just for the last try, because that means that on deployments that meet the criteria that code is meant to solve, attachments are going to be slow, as they won\u0027t do the right thing until the last scan. Also, in those deployments the attach can fail because there\u0027s only 1 scan, unlike the 3 scans that the other systems have.\n\nI think a different flow needs to be explored. Some ideas:\n- We only use `fc_remote_ports` if we find that that\u0027s more infallible than checking `fc_targets`.\n- On each rescan, if we don\u0027t find it using `fc_targets`, then we use `fc_remote_ports`.\n- On each rescan, we first try with the `fc_remote_ports` and if we don\u0027t find it, then we try using `fc_targets`.\n- On each rescan we try both `fc_remote_ports` and `fc_targets` simultaneously.","commit_id":"0b8c585e3cbc705c954f59a13ede93c83043729b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"de035a80f88ed8c4516e24cedcc9823f529a5ce2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f7c13a4b_42ba5e5a","in_reply_to":"7b78dc53_555452cb","updated":"2024-01-31 20:40:51.000000000","message":"Thanks for providing suggestions. I have implemented the way of scanning both the fc_remote_ports and fc_transport paths simultaneously since that includes the benefits of both the approaches and also is less error prone since we don\u0027t have to deal with conditions like:\n1. since the fc_transport path can give partial targets, we don\u0027t know if it will fail or pass for the current LUN discovery so we will have to use fc_remote_ports path anyway for discovering all targets\n2. If we scan fc_transport for the regex /sys/.../target2:*, it can discover any target associated with the host 2\neg: target2:0:0\nsimilarly searching for that regex in fc_remote_ports path can yield a different result\neg: rport-2:0:1\nso if we fail with the regex target2:* in fc_transport path and try the same regex in fc_remote_ports path then we can have a different result\n\nto avoid accounting for all the scenarios and making the solution more complex and error prone, I\u0027ve opted for the approach to scan both targets and only include the ctls that are unique in both scans.","commit_id":"0b8c585e3cbc705c954f59a13ede93c83043729b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a3407a61377611a0a262f5ed8757e202152fb231","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"69dd0f83_2e0073ab","in_reply_to":"f7c13a4b_42ba5e5a","updated":"2024-01-31 21:09:54.000000000","message":"Okay I\u0027m unsure about the second one since we use target WWPN for searching and yes, scanning both the paths simultaneously might not be the most optimal but does reduce the number of checks we have to do in the code so i still feel it\u0027s less error prone.","commit_id":"0b8c585e3cbc705c954f59a13ede93c83043729b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"de035a80f88ed8c4516e24cedcc9823f529a5ce2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"53825236_882f6a1c","updated":"2024-01-31 20:40:51.000000000","message":"Thanks Gorka for the review.","commit_id":"e18d164ab09b2f77b223891cbb49038013b2c361"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2707bbd268e3fb619e50dfe452b8dbf77e8c1857","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"47731f91_19f297b8","updated":"2024-02-13 03:50:43.000000000","message":"Code and tests LGTM.  Didn\u0027t +W in case you want to address Gorka\u0027s nits.  Otherwise, feel free to +W yourself.","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"35b27da50fe45384d99f2c09963de989a8fe0729","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"f5ae63ba_342b272e","updated":"2024-02-12 14:51:03.000000000","message":"Some nits but not enough to hold the patch.","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"c79f3a77a7166af110c0fde01a19a26bbfc6c223","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"2bf4ed0f_c9bd846c","updated":"2024-02-05 19:57:08.000000000","message":"Thanks Gorka!","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d488c0eb817a13240f6e519118c128fb96de6fdc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"71e737b5_48a6fed4","updated":"2024-02-14 17:24:29.000000000","message":"Code and tests LGTM.","commit_id":"f2154eedf0d04ef960dbf1df7fb87f74f6a35dbf"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"ee2064d8a9e83b06d6689534e2c5828d863aa7bf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"a33af00c_4cffc2bc","updated":"2024-02-13 16:45:32.000000000","message":"Thanks Gorka and Brian, updated with the nit fixes.","commit_id":"f2154eedf0d04ef960dbf1df7fb87f74f6a35dbf"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a5e93eef22f2ea7ff1bde4da3c36e757015e0169","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"38f65eee_d4ab4a1d","updated":"2024-02-14 22:04:02.000000000","message":"recheck lio-barbican job failed\n\nLooks like an issue while reading the timestamp file\n\ntest_shelve_volume_backed_instance\n\ntempest.lib.exceptions.SSHExecCommandFailed: Command \u0027set -eu -o pipefail; PATH\u003d$PATH:/sbin:/usr/sbin; sudo cat /tmp/timestamp\u0027, exit status: 1, stderr:\ncat: can\u0027t open \u0027/tmp/timestamp\u0027: No such file or directory","commit_id":"f2154eedf0d04ef960dbf1df7fb87f74f6a35dbf"}],"os_brick/initiator/linuxfc.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f414fae7a37f23d0231565bd53ab010a46feb33d","unresolved":true,"context_lines":[{"line_number":50,"context_line":"        initiator_target_lun_map entry that was generated by the FC connector"},{"line_number":51,"context_line":"        based on the contents of the connection information data to know which"},{"line_number":52,"context_line":"        target ports to look for."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        :returns: 2-Tuple with the first entry being a list of [c, t, l]"},{"line_number":55,"context_line":"        entries where the target port was found, and the second entry of the"},{"line_number":56,"context_line":"        tuple being a set of luns for ports that were not found."}],"source_content_type":"text/x-python","patch_set":1,"id":"dea5d552_b63f4099","line":53,"updated":"2024-01-30 11:20:50.000000000","message":"-1: Docstring needs update","commit_id":"0b8c585e3cbc705c954f59a13ede93c83043729b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"de035a80f88ed8c4516e24cedcc9823f529a5ce2","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        initiator_target_lun_map entry that was generated by the FC connector"},{"line_number":51,"context_line":"        based on the contents of the connection information data to know which"},{"line_number":52,"context_line":"        target ports to look for."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        :returns: 2-Tuple with the first entry being a list of [c, t, l]"},{"line_number":55,"context_line":"        entries where the target port was found, and the second entry of the"},{"line_number":56,"context_line":"        tuple being a set of luns for ports that were not found."}],"source_content_type":"text/x-python","patch_set":1,"id":"00645001_412e8c97","line":53,"in_reply_to":"dea5d552_b63f4099","updated":"2024-01-31 20:40:51.000000000","message":"Done","commit_id":"0b8c585e3cbc705c954f59a13ede93c83043729b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f414fae7a37f23d0231565bd53ab010a46feb33d","unresolved":true,"context_lines":[{"line_number":86,"context_line":"                    # Example path:"},{"line_number":87,"context_line":"                    # /sys/class/fc_remote_ports/rport-2:0-0/scsi_target_id"},{"line_number":88,"context_line":"                    target_path \u003d out.rsplit(\u0027/\u0027, 1)[0] + \u0027/scsi_target_id\u0027"},{"line_number":89,"context_line":"                    lines, _err \u003d self._execute("},{"line_number":90,"context_line":"                        \u0027cat\u0027, target_path, run_as_root\u003dTrue,"},{"line_number":91,"context_line":"                        root_helper\u003dself._root_helper)"},{"line_number":92,"context_line":"                    scsi_target \u003d lines.split(\u0027\\n\u0027)[0]"},{"line_number":93,"context_line":"                    # If the target value is -1, it is not a real target so"},{"line_number":94,"context_line":"                    # skip it"}],"source_content_type":"text/x-python","patch_set":1,"id":"9d140a3e_5128e780","line":91,"range":{"start_line":89,"start_character":0,"end_line":91,"end_character":54},"updated":"2024-01-30 11:20:50.000000000","message":"-1: Do we really need elevated privileges to read this file? If that is the case, please use a privsep function instead.","commit_id":"0b8c585e3cbc705c954f59a13ede93c83043729b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"de035a80f88ed8c4516e24cedcc9823f529a5ce2","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                    # Example path:"},{"line_number":87,"context_line":"                    # /sys/class/fc_remote_ports/rport-2:0-0/scsi_target_id"},{"line_number":88,"context_line":"                    target_path \u003d out.rsplit(\u0027/\u0027, 1)[0] + \u0027/scsi_target_id\u0027"},{"line_number":89,"context_line":"                    lines, _err \u003d self._execute("},{"line_number":90,"context_line":"                        \u0027cat\u0027, target_path, run_as_root\u003dTrue,"},{"line_number":91,"context_line":"                        root_helper\u003dself._root_helper)"},{"line_number":92,"context_line":"                    scsi_target \u003d lines.split(\u0027\\n\u0027)[0]"},{"line_number":93,"context_line":"                    # If the target value is -1, it is not a real target so"},{"line_number":94,"context_line":"                    # skip it"}],"source_content_type":"text/x-python","patch_set":1,"id":"80949bba_f888d6a3","line":91,"range":{"start_line":89,"start_character":0,"end_line":91,"end_character":54},"in_reply_to":"9d140a3e_5128e780","updated":"2024-01-31 20:40:51.000000000","message":"we should not be needing root access, will update it.","commit_id":"0b8c585e3cbc705c954f59a13ede93c83043729b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ce7fffc3581a626ef085699ad85d4500c664878d","unresolved":true,"context_lines":[{"line_number":89,"context_line":"            # /sys/class/fc_remote_ports/rport-2:0-0/scsi_target_id"},{"line_number":90,"context_line":"            target_path \u003d out.rsplit(\u0027/\u0027, 1)[0] + \u0027/scsi_target_id\u0027"},{"line_number":91,"context_line":"            if target_path.startswith(path):"},{"line_number":92,"context_line":"                lines, _err \u003d self._execute(\u0027cat\u0027, target_path)"},{"line_number":93,"context_line":"                scsi_target \u003d lines.split(\u0027\\n\u0027)[0]"},{"line_number":94,"context_line":"                # If the target value is -1, it is not a real target so"},{"line_number":95,"context_line":"                # skip it"}],"source_content_type":"text/x-python","patch_set":2,"id":"a862de87_0d52510e","line":92,"range":{"start_line":92,"start_character":0,"end_line":92,"end_character":2},"updated":"2024-02-05 10:52:53.000000000","message":"-1: Open and read the file in Python","commit_id":"e18d164ab09b2f77b223891cbb49038013b2c361"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"c79f3a77a7166af110c0fde01a19a26bbfc6c223","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            # /sys/class/fc_remote_ports/rport-2:0-0/scsi_target_id"},{"line_number":90,"context_line":"            target_path \u003d out.rsplit(\u0027/\u0027, 1)[0] + \u0027/scsi_target_id\u0027"},{"line_number":91,"context_line":"            if target_path.startswith(path):"},{"line_number":92,"context_line":"                lines, _err \u003d self._execute(\u0027cat\u0027, target_path)"},{"line_number":93,"context_line":"                scsi_target \u003d lines.split(\u0027\\n\u0027)[0]"},{"line_number":94,"context_line":"                # If the target value is -1, it is not a real target so"},{"line_number":95,"context_line":"                # skip it"}],"source_content_type":"text/x-python","patch_set":2,"id":"532e2146_abd9d0c9","line":92,"range":{"start_line":92,"start_character":0,"end_line":92,"end_character":2},"in_reply_to":"a862de87_0d52510e","updated":"2024-02-05 19:57:08.000000000","message":"Done","commit_id":"e18d164ab09b2f77b223891cbb49038013b2c361"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ce7fffc3581a626ef085699ad85d4500c664878d","unresolved":true,"context_lines":[{"line_number":151,"context_line":"        ctls \u003d []"},{"line_number":152,"context_line":"        luns_not_found \u003d set()"},{"line_number":153,"context_line":"        for wwpn, lun in targets:"},{"line_number":154,"context_line":"            # Search for targets in the fc_transport path"},{"line_number":155,"context_line":"            ctl, lun_found \u003d self._get_targets_fc_transport_path("},{"line_number":156,"context_line":"                path, wwpn, lun)"},{"line_number":157,"context_line":"            # Search for targets in the fc_remote_ports path"},{"line_number":158,"context_line":"            rctl, rlun_found \u003d self._get_targets_fc_remote_ports_path("},{"line_number":159,"context_line":"                rpath, wwpn, lun)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"            # Add ctl values fetched from fc_transport path (if found)"},{"line_number":162,"context_line":"            if ctl:"}],"source_content_type":"text/x-python","patch_set":2,"id":"db2c67ec_af4dadfa","line":159,"range":{"start_line":154,"start_character":1,"end_line":159,"end_character":33},"updated":"2024-02-05 10:52:53.000000000","message":"-1: Search with one and only search with the other if not found.","commit_id":"e18d164ab09b2f77b223891cbb49038013b2c361"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"c79f3a77a7166af110c0fde01a19a26bbfc6c223","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        ctls \u003d []"},{"line_number":152,"context_line":"        luns_not_found \u003d set()"},{"line_number":153,"context_line":"        for wwpn, lun in targets:"},{"line_number":154,"context_line":"            # Search for targets in the fc_transport path"},{"line_number":155,"context_line":"            ctl, lun_found \u003d self._get_targets_fc_transport_path("},{"line_number":156,"context_line":"                path, wwpn, lun)"},{"line_number":157,"context_line":"            # Search for targets in the fc_remote_ports path"},{"line_number":158,"context_line":"            rctl, rlun_found \u003d self._get_targets_fc_remote_ports_path("},{"line_number":159,"context_line":"                rpath, wwpn, lun)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"            # Add ctl values fetched from fc_transport path (if found)"},{"line_number":162,"context_line":"            if ctl:"}],"source_content_type":"text/x-python","patch_set":2,"id":"b44e50b3_88b6217b","line":159,"range":{"start_line":154,"start_character":1,"end_line":159,"end_character":33},"in_reply_to":"db2c67ec_af4dadfa","updated":"2024-02-05 19:57:08.000000000","message":"Done","commit_id":"e18d164ab09b2f77b223891cbb49038013b2c361"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"4c303630d37503194d864cff1a78a57e360e8859","unresolved":true,"context_lines":[{"line_number":151,"context_line":"        ctls \u003d []"},{"line_number":152,"context_line":"        luns_not_found \u003d set()"},{"line_number":153,"context_line":"        for wwpn, lun in targets:"},{"line_number":154,"context_line":"            # Search for targets in the fc_transport path"},{"line_number":155,"context_line":"            ctl, lun_found \u003d self._get_targets_fc_transport_path("},{"line_number":156,"context_line":"                path, wwpn, lun)"},{"line_number":157,"context_line":"            # Search for targets in the fc_remote_ports path"},{"line_number":158,"context_line":"            rctl, rlun_found \u003d self._get_targets_fc_remote_ports_path("},{"line_number":159,"context_line":"                rpath, wwpn, lun)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"            # Add ctl values fetched from fc_transport path (if found)"},{"line_number":162,"context_line":"            if ctl:"},{"line_number":163,"context_line":"                ctls.append(ctl)"},{"line_number":164,"context_line":"            # If the ctl found from fc_remote_ports path are different from"},{"line_number":165,"context_line":"            # the ones found in fc_transport path, add them to the ctls list"},{"line_number":166,"context_line":"            if rctl and rctl !\u003d ctl:"},{"line_number":167,"context_line":"                ctls.append(rctl)"},{"line_number":168,"context_line":"            # If both the fc_transport and fc_remote_ports paths coudn\u0027t find"},{"line_number":169,"context_line":"            # a target to discover the lun, add it to the not found list"},{"line_number":170,"context_line":"            if not lun_found and not rlun_found:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1b98a494_08c4a894","line":167,"range":{"start_line":154,"start_character":0,"end_line":167,"end_character":33},"updated":"2024-02-02 09:46:21.000000000","message":"Maybe this can be optimized,\n\n            # Search for targets in the fc_transport path\n            ctl, lun_found \u003d self._get_targets_fc_transport_path(\n                path, wwpn, lun)\n            # Add ctl values fetched from fc_transport path (if found)\n            if ctl:\n                ctls.append(ctl)\n            else:\n                # Search for targets in the fc_remote_ports path\n                rctl, rlun_found \u003d self._get_targets_fc_remote_ports_path(\n                    rpath, wwpn, lun)\n\n                # Add the targets from fc_remote_ports path (if found)\n                if rctl:\n                    ctls.append(rctl)","commit_id":"e18d164ab09b2f77b223891cbb49038013b2c361"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"c79f3a77a7166af110c0fde01a19a26bbfc6c223","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        ctls \u003d []"},{"line_number":152,"context_line":"        luns_not_found \u003d set()"},{"line_number":153,"context_line":"        for wwpn, lun in targets:"},{"line_number":154,"context_line":"            # Search for targets in the fc_transport path"},{"line_number":155,"context_line":"            ctl, lun_found \u003d self._get_targets_fc_transport_path("},{"line_number":156,"context_line":"                path, wwpn, lun)"},{"line_number":157,"context_line":"            # Search for targets in the fc_remote_ports path"},{"line_number":158,"context_line":"            rctl, rlun_found \u003d self._get_targets_fc_remote_ports_path("},{"line_number":159,"context_line":"                rpath, wwpn, lun)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"            # Add ctl values fetched from fc_transport path (if found)"},{"line_number":162,"context_line":"            if ctl:"},{"line_number":163,"context_line":"                ctls.append(ctl)"},{"line_number":164,"context_line":"            # If the ctl found from fc_remote_ports path are different from"},{"line_number":165,"context_line":"            # the ones found in fc_transport path, add them to the ctls list"},{"line_number":166,"context_line":"            if rctl and rctl !\u003d ctl:"},{"line_number":167,"context_line":"                ctls.append(rctl)"},{"line_number":168,"context_line":"            # If both the fc_transport and fc_remote_ports paths coudn\u0027t find"},{"line_number":169,"context_line":"            # a target to discover the lun, add it to the not found list"},{"line_number":170,"context_line":"            if not lun_found and not rlun_found:"}],"source_content_type":"text/x-python","patch_set":2,"id":"712e51e9_2772b89f","line":167,"range":{"start_line":154,"start_character":0,"end_line":167,"end_character":33},"in_reply_to":"1b98a494_08c4a894","updated":"2024-02-05 19:57:08.000000000","message":"Done","commit_id":"e18d164ab09b2f77b223891cbb49038013b2c361"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"35b27da50fe45384d99f2c09963de989a8fe0729","unresolved":true,"context_lines":[{"line_number":77,"context_line":"        # The scsi_target_id file contains the target ID."},{"line_number":78,"context_line":"        # Example path:"},{"line_number":79,"context_line":"        # /sys/class/fc_remote_ports/rport-2:0-0/scsi_target_id"},{"line_number":80,"context_line":"        target_path \u003d out.rsplit(\u0027/\u0027, 1)[0] + \u0027/scsi_target_id\u0027"},{"line_number":81,"context_line":"        # There could be a case where the out variable has empty string"},{"line_number":82,"context_line":"        # and we end up with a path \u0027/scsi_target_id\u0027 so check if it"},{"line_number":83,"context_line":"        # starts with the correct path"}],"source_content_type":"text/x-python","patch_set":3,"id":"5c3401b1_c9064e15","line":80,"range":{"start_line":80,"start_character":22,"end_line":80,"end_character":43},"updated":"2024-02-12 14:51:03.000000000","message":"nit: `os.path.dirname(out)`","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"ee2064d8a9e83b06d6689534e2c5828d863aa7bf","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # The scsi_target_id file contains the target ID."},{"line_number":78,"context_line":"        # Example path:"},{"line_number":79,"context_line":"        # /sys/class/fc_remote_ports/rport-2:0-0/scsi_target_id"},{"line_number":80,"context_line":"        target_path \u003d out.rsplit(\u0027/\u0027, 1)[0] + \u0027/scsi_target_id\u0027"},{"line_number":81,"context_line":"        # There could be a case where the out variable has empty string"},{"line_number":82,"context_line":"        # and we end up with a path \u0027/scsi_target_id\u0027 so check if it"},{"line_number":83,"context_line":"        # starts with the correct path"}],"source_content_type":"text/x-python","patch_set":3,"id":"36b3e789_df93fdb4","line":80,"range":{"start_line":80,"start_character":22,"end_line":80,"end_character":43},"in_reply_to":"5c3401b1_c9064e15","updated":"2024-02-13 16:45:32.000000000","message":"Done","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"35b27da50fe45384d99f2c09963de989a8fe0729","unresolved":true,"context_lines":[{"line_number":95,"context_line":"            # If the target value is -1, it is not a real target so"},{"line_number":96,"context_line":"            # skip it"},{"line_number":97,"context_line":"            if scsi_target !\u003d \u0027-1\u0027:"},{"line_number":98,"context_line":"                channel \u003d target_path.split(\u0027:\u0027)[1][0]"},{"line_number":99,"context_line":"                ctl \u003d [channel, scsi_target, lun]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        return ctl"}],"source_content_type":"text/x-python","patch_set":3,"id":"a4e35364_efa14a63","line":98,"updated":"2024-02-12 14:51:03.000000000","message":"nit: I would prefer if we got the channel using both separators \u0027:\u0027 and \u0027-\u0027","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"ee2064d8a9e83b06d6689534e2c5828d863aa7bf","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            # If the target value is -1, it is not a real target so"},{"line_number":96,"context_line":"            # skip it"},{"line_number":97,"context_line":"            if scsi_target !\u003d \u0027-1\u0027:"},{"line_number":98,"context_line":"                channel \u003d target_path.split(\u0027:\u0027)[1][0]"},{"line_number":99,"context_line":"                ctl \u003d [channel, scsi_target, lun]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        return ctl"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf499a7a_ac8169e3","line":98,"in_reply_to":"a4e35364_efa14a63","updated":"2024-02-13 16:45:32.000000000","message":"Done","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"35b27da50fe45384d99f2c09963de989a8fe0729","unresolved":true,"context_lines":[{"line_number":96,"context_line":"            # skip it"},{"line_number":97,"context_line":"            if scsi_target !\u003d \u0027-1\u0027:"},{"line_number":98,"context_line":"                channel \u003d target_path.split(\u0027:\u0027)[1][0]"},{"line_number":99,"context_line":"                ctl \u003d [channel, scsi_target, lun]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        return ctl"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _get_hba_channel_scsi_target_lun(self,"},{"line_number":104,"context_line":"                                         hba,"}],"source_content_type":"text/x-python","patch_set":3,"id":"2acc7bae_c7de8739","line":101,"range":{"start_line":99,"start_character":1,"end_line":101,"end_character":18},"updated":"2024-02-12 14:51:03.000000000","message":"nit: We could remove L72 with the default initialization of ctl and just replace these last 2 lines with:\n```\n    return [channel, scsi_target, lun]\nreturn []\n```\n\nWe could do the same with the `_get_target_fc_transport_path` method as well.","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"ee2064d8a9e83b06d6689534e2c5828d863aa7bf","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            # skip it"},{"line_number":97,"context_line":"            if scsi_target !\u003d \u0027-1\u0027:"},{"line_number":98,"context_line":"                channel \u003d target_path.split(\u0027:\u0027)[1][0]"},{"line_number":99,"context_line":"                ctl \u003d [channel, scsi_target, lun]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        return ctl"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _get_hba_channel_scsi_target_lun(self,"},{"line_number":104,"context_line":"                                         hba,"}],"source_content_type":"text/x-python","patch_set":3,"id":"554f1f63_0f4b9aaf","line":101,"range":{"start_line":99,"start_character":1,"end_line":101,"end_character":18},"in_reply_to":"2acc7bae_c7de8739","updated":"2024-02-13 16:45:32.000000000","message":"Done","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"35b27da50fe45384d99f2c09963de989a8fe0729","unresolved":true,"context_lines":[{"line_number":149,"context_line":"        for wwpn, lun in targets:"},{"line_number":150,"context_line":"            try:"},{"line_number":151,"context_line":"                # Search for target in the fc_transport path"},{"line_number":152,"context_line":"                ctl \u003d self._get_target_fc_transport_path(path, wwpn, lun)"},{"line_number":153,"context_line":"                # Add ctl values fetched from fc_transport path (if found)"},{"line_number":154,"context_line":"                if ctl:"},{"line_number":155,"context_line":"                    ctls.append(ctl)"},{"line_number":156,"context_line":"                else:"},{"line_number":157,"context_line":"                    # If we don\u0027t find ctl in fc_transport path, search for"},{"line_number":158,"context_line":"                    # target in the fc_remote_ports path"},{"line_number":159,"context_line":"                    rctl \u003d self._get_target_fc_remote_ports_path("},{"line_number":160,"context_line":"                        rpath, wwpn, lun)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"                    # Add the targets from fc_remote_ports path (if found)"},{"line_number":163,"context_line":"                    if rctl:"}],"source_content_type":"text/x-python","patch_set":3,"id":"614ec17e_7638bcdd","line":160,"range":{"start_line":152,"start_character":0,"end_line":160,"end_character":41},"updated":"2024-02-12 14:51:03.000000000","message":"nit:\n\n```\n                ctl \u003d (self._get_target_fc_transport_path(path, wwpn, lun) or\n\t\t\t\t       self._get_target_fc_remote_ports_path(rpath, wwpn, lun))\n\n                if ctl:\n                    ctls.append(ctl)\n```","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"ee2064d8a9e83b06d6689534e2c5828d863aa7bf","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        for wwpn, lun in targets:"},{"line_number":150,"context_line":"            try:"},{"line_number":151,"context_line":"                # Search for target in the fc_transport path"},{"line_number":152,"context_line":"                ctl \u003d self._get_target_fc_transport_path(path, wwpn, lun)"},{"line_number":153,"context_line":"                # Add ctl values fetched from fc_transport path (if found)"},{"line_number":154,"context_line":"                if ctl:"},{"line_number":155,"context_line":"                    ctls.append(ctl)"},{"line_number":156,"context_line":"                else:"},{"line_number":157,"context_line":"                    # If we don\u0027t find ctl in fc_transport path, search for"},{"line_number":158,"context_line":"                    # target in the fc_remote_ports path"},{"line_number":159,"context_line":"                    rctl \u003d self._get_target_fc_remote_ports_path("},{"line_number":160,"context_line":"                        rpath, wwpn, lun)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"                    # Add the targets from fc_remote_ports path (if found)"},{"line_number":163,"context_line":"                    if rctl:"}],"source_content_type":"text/x-python","patch_set":3,"id":"6c7a2b8e_46f51886","line":160,"range":{"start_line":152,"start_character":0,"end_line":160,"end_character":41},"in_reply_to":"614ec17e_7638bcdd","updated":"2024-02-13 16:45:32.000000000","message":"Done","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"}],"releasenotes/notes/fix-fc-scanning-9164da9eb42aaed0.yaml":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"35b27da50fe45384d99f2c09963de989a8fe0729","unresolved":true,"context_lines":[{"line_number":4,"context_line":"    FC connector `bug #2051237"},{"line_number":5,"context_line":"    \u003chttps://bugs.launchpad.net/os-brick/+bug/2051237\u003e`_: Fix"},{"line_number":6,"context_line":"    issue with fibre channel connector scanning partial targets."},{"line_number":7,"context_line":"    This is addressed adding another path to search for targets"},{"line_number":8,"context_line":"    along with the fc_transport path."},{"line_number":9,"context_line":"    We first search in the fc_transport path and if targets are"},{"line_number":10,"context_line":"    not found then we search in the fc_remote_ports path to find"},{"line_number":11,"context_line":"    all the storage targets that are accessible from the host."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"6f1b0dd6_5fb419bb","line":11,"range":{"start_line":7,"start_character":4,"end_line":11,"end_character":62},"updated":"2024-02-12 14:51:03.000000000","message":"nit: Seems a bit verbose:\n\n```\n   Search for target information in sysfs first in fc_transport and \n   then in fc_report_ports.\n```","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"ee2064d8a9e83b06d6689534e2c5828d863aa7bf","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    FC connector `bug #2051237"},{"line_number":5,"context_line":"    \u003chttps://bugs.launchpad.net/os-brick/+bug/2051237\u003e`_: Fix"},{"line_number":6,"context_line":"    issue with fibre channel connector scanning partial targets."},{"line_number":7,"context_line":"    This is addressed adding another path to search for targets"},{"line_number":8,"context_line":"    along with the fc_transport path."},{"line_number":9,"context_line":"    We first search in the fc_transport path and if targets are"},{"line_number":10,"context_line":"    not found then we search in the fc_remote_ports path to find"},{"line_number":11,"context_line":"    all the storage targets that are accessible from the host."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"fc05afaf_cd5fb41e","line":11,"range":{"start_line":7,"start_character":4,"end_line":11,"end_character":62},"in_reply_to":"6f1b0dd6_5fb419bb","updated":"2024-02-13 16:45:32.000000000","message":"Done","commit_id":"2b661f0e5862cc826533e554f7252b2c144cd131"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"9ad84c660a0c84029f14975042c6cb5a539c7d73","unresolved":true,"context_lines":[{"line_number":4,"context_line":"    FC connector `bug #2051237"},{"line_number":5,"context_line":"    \u003chttps://bugs.launchpad.net/os-brick/+bug/2051237\u003e`_: Fix"},{"line_number":6,"context_line":"    issue with fibre channel connector scanning partial targets."},{"line_number":7,"context_line":"    We search for target information in sysfs, first in fc_transport"},{"line_number":8,"context_line":"    and then in fc_report_ports."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"2cb957f9_cedb3ae4","line":7,"updated":"2024-02-14 16:20:31.000000000","message":"nit: `Now we search`","commit_id":"f2154eedf0d04ef960dbf1df7fb87f74f6a35dbf"}]}
