)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"003b8d463a885ce9d8b2b69dda0eae34a8a3f835","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Takashi Kajinami \u003ctkajinam@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-02-15 11:08:47 +0900"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Avould unhandled exceptions during connecting to iSCSI portals"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently we don\u0027t properly catch some possible exceptions during"},{"line_number":10,"context_line":"connectiing to iSCSI portals, like failures in \"iscsiadm -m session\"."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a3b283d_a7fbc2ab","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":6},"updated":"2021-02-24 16:39:52.000000000","message":"on your next update, don\u0027t forget to correct this typo (\"Avoid\")","commit_id":"6a854b5d97177b2676ee5a89a1485062be68bf42"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ca68563c10a15314829662bdf920351d9985e7e9","unresolved":true,"context_lines":[{"line_number":9,"context_line":"Currently we don\u0027t properly catch some possible exceptions during"},{"line_number":10,"context_line":"connectiing to iSCSI portals, like failures in \"iscsiadm -m session\"."},{"line_number":11,"context_line":"Because of this _connect_vol threads can abort unexpectedly in some"},{"line_number":12,"context_line":"failure patterns, and this abort causes hung in subsequent steps"},{"line_number":13,"context_line":"waiting for results from _connct_vol threads."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This change ensures that any exceptions during connecting to iSCSI"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"e5cb069c_d3a882e0","line":12,"range":{"start_line":12,"start_character":40,"end_line":12,"end_character":44},"updated":"2021-03-04 13:33:34.000000000","message":"hangs","commit_id":"4478433550ddab970f106636a4ba5fbba82c5e39"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ca68563c10a15314829662bdf920351d9985e7e9","unresolved":true,"context_lines":[{"line_number":10,"context_line":"connectiing to iSCSI portals, like failures in \"iscsiadm -m session\"."},{"line_number":11,"context_line":"Because of this _connect_vol threads can abort unexpectedly in some"},{"line_number":12,"context_line":"failure patterns, and this abort causes hung in subsequent steps"},{"line_number":13,"context_line":"waiting for results from _connct_vol threads."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This change ensures that any exceptions during connecting to iSCSI"},{"line_number":16,"context_line":"portals are handled in the _connect_vol method corectly, to avoid"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"836c2a0e_df649d48","line":13,"range":{"start_line":13,"start_character":25,"end_line":13,"end_character":36},"updated":"2021-03-04 13:33:34.000000000","message":"_connect_vol","commit_id":"4478433550ddab970f106636a4ba5fbba82c5e39"}],"os_brick/initiator/connectors/iscsi.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"3a2bc7704a358cf3570cae79b9bf610d199486ce","unresolved":true,"context_lines":[{"line_number":628,"context_line":"        portal \u003d props[\u0027target_portal\u0027]"},{"line_number":629,"context_line":"        try:"},{"line_number":630,"context_line":"            session, manual_scan \u003d self._connect_to_iscsi_portal(props)"},{"line_number":631,"context_line":"        except Exception:"},{"line_number":632,"context_line":"            LOG.exception(\u0027Exception connecting to %s\u0027, portal)"},{"line_number":633,"context_line":"            pass"},{"line_number":634,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"69c0838d_1a44fcf3","line":631,"range":{"start_line":631,"start_character":15,"end_line":631,"end_character":24},"updated":"2021-02-24 14:17:27.000000000","message":"Shouldn\u0027t this catch a narrower class of exceptions, such as those that we expect self._execute() to raise?\n\nJust catching and ignoring all exceptions seems too broad and may hide things that we should fail on.","commit_id":"6a854b5d97177b2676ee5a89a1485062be68bf42"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"699d53efae3fe4a5b8ba944e1ee6380908fb5905","unresolved":true,"context_lines":[{"line_number":628,"context_line":"        portal \u003d props[\u0027target_portal\u0027]"},{"line_number":629,"context_line":"        try:"},{"line_number":630,"context_line":"            session, manual_scan \u003d self._connect_to_iscsi_portal(props)"},{"line_number":631,"context_line":"        except Exception:"},{"line_number":632,"context_line":"            LOG.exception(\u0027Exception connecting to %s\u0027, portal)"},{"line_number":633,"context_line":"            pass"},{"line_number":634,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"cadf7f1c_1f465ef8","line":631,"range":{"start_line":631,"start_character":15,"end_line":631,"end_character":24},"in_reply_to":"69c0838d_1a44fcf3","updated":"2021-02-24 14:48:14.000000000","message":"Current problem is that os-brick doesn\u0027t fail but gets hung if any uncaught exception is raised from _connect_vol when multipath is enabled. We can avoind the hung caused by failure in iscsiadm command by using ProcessExecutionError but we would still hit the similar issue if any other exception is raised. That\u0027s why I implemented my patch initially with generic Exception.\n\nAlso, failures caused by unhandled exceptions are supposed to be caught be the subsequent logic to check failed_logins or found_devices thus they are not completely ignored.\n\nOne difference this change makes is that volume connection with single path is not aborted even when an unhandled exception is raised here, but it is tried with the other connectors (if there are multiple portals given). I think it is reasonable considering the case the error is specific to only some of the portals.","commit_id":"6a854b5d97177b2676ee5a89a1485062be68bf42"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"bc19b008b6242d4151cda77829b0701a54a14da7","unresolved":true,"context_lines":[{"line_number":624,"context_line":"        :param props: Properties of the connection."},{"line_number":625,"context_line":"        :param data: Shared data."},{"line_number":626,"context_line":"        \"\"\""},{"line_number":627,"context_line":"        device \u003d hctl \u003d session \u003d None"},{"line_number":628,"context_line":"        portal \u003d props[\u0027target_portal\u0027]"},{"line_number":629,"context_line":"        try:"},{"line_number":630,"context_line":"            session, manual_scan \u003d self._connect_to_iscsi_portal(props)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ca1a766_4200d2ac","line":627,"range":{"start_line":627,"start_character":24,"end_line":627,"end_character":34},"updated":"2021-03-03 09:31:32.000000000","message":"nit: move the `session \u003d None` to L633 and replace the pass there","commit_id":"bf0c82675f1ece78519e343552838f6cb4b966da"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"cf9b0414bac25fbd0b0f27ca34f4bd5c7fed97c1","unresolved":false,"context_lines":[{"line_number":624,"context_line":"        :param props: Properties of the connection."},{"line_number":625,"context_line":"        :param data: Shared data."},{"line_number":626,"context_line":"        \"\"\""},{"line_number":627,"context_line":"        device \u003d hctl \u003d session \u003d None"},{"line_number":628,"context_line":"        portal \u003d props[\u0027target_portal\u0027]"},{"line_number":629,"context_line":"        try:"},{"line_number":630,"context_line":"            session, manual_scan \u003d self._connect_to_iscsi_portal(props)"}],"source_content_type":"text/x-python","patch_set":3,"id":"8078788d_c8d8c891","line":627,"range":{"start_line":627,"start_character":24,"end_line":627,"end_character":34},"in_reply_to":"3ca1a766_4200d2ac","updated":"2021-03-03 12:19:02.000000000","message":"That looks better! updated accordingly.","commit_id":"bf0c82675f1ece78519e343552838f6cb4b966da"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"14318a20ca365be03f0740d3843ec71a9acfc360","unresolved":true,"context_lines":[{"line_number":1043,"context_line":"        # iscsiadm returns 21 for \"No records found\" after version 2.0-871"},{"line_number":1044,"context_line":"        LOG.info(\"Trying to connect to iSCSI portal %s\", portal)"},{"line_number":1045,"context_line":"        out, err \u003d self._run_iscsiadm(connection_properties, (),"},{"line_number":1046,"context_line":"                                      check_exit_code\u003d(0, 21, 255))"},{"line_number":1047,"context_line":"        if err:"},{"line_number":1048,"context_line":"            self._run_iscsiadm(connection_properties,"},{"line_number":1049,"context_line":"                               (\u0027--interface\u0027, self._get_transport(),"}],"source_content_type":"text/x-python","patch_set":5,"id":"f3c95b9d_ef2cd9a4","line":1046,"updated":"2021-03-05 12:05:49.000000000","message":"-1: We also need to add exit code 2 to this list, because that\u0027s the error that\u0027s reported in the BZ (even if there\u0027s no mention to it in the LP bug).\n\nAccording to the iscsiadm man page:\n\n     2      ISCSI_ERR_SESS_NOT_FOUND - session could not be found.","commit_id":"4478433550ddab970f106636a4ba5fbba82c5e39"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"100d3c7f37c431b520798c8706e288eb5acce584","unresolved":true,"context_lines":[{"line_number":1043,"context_line":"        # iscsiadm returns 21 for \"No records found\" after version 2.0-871"},{"line_number":1044,"context_line":"        LOG.info(\"Trying to connect to iSCSI portal %s\", portal)"},{"line_number":1045,"context_line":"        out, err \u003d self._run_iscsiadm(connection_properties, (),"},{"line_number":1046,"context_line":"                                      check_exit_code\u003d(0, 21, 255))"},{"line_number":1047,"context_line":"        if err:"},{"line_number":1048,"context_line":"            self._run_iscsiadm(connection_properties,"},{"line_number":1049,"context_line":"                               (\u0027--interface\u0027, self._get_transport(),"}],"source_content_type":"text/x-python","patch_set":5,"id":"95f839ca_f2ec1f2d","line":1046,"in_reply_to":"878098a2_27c14650","updated":"2021-03-05 15:53:54.000000000","message":"I\u0027ve looked at the Open iSCSI code, and it looks like this could happen because of a bug in Open iSCSI.\n\nIt\u0027s a race condition they don\u0027t protect again, so the ideal here would be to have a couple of retries if the exit code is 2.\n\nIn any case, that improvement doesn\u0027t invalidate this patch, and getting this patch in this release is definitely important, so let\u0027s leave the improvement for another patch.","commit_id":"4478433550ddab970f106636a4ba5fbba82c5e39"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d9395e901d5f5b389ec863607e696cad5b7bc8a9","unresolved":true,"context_lines":[{"line_number":1043,"context_line":"        # iscsiadm returns 21 for \"No records found\" after version 2.0-871"},{"line_number":1044,"context_line":"        LOG.info(\"Trying to connect to iSCSI portal %s\", portal)"},{"line_number":1045,"context_line":"        out, err \u003d self._run_iscsiadm(connection_properties, (),"},{"line_number":1046,"context_line":"                                      check_exit_code\u003d(0, 21, 255))"},{"line_number":1047,"context_line":"        if err:"},{"line_number":1048,"context_line":"            self._run_iscsiadm(connection_properties,"},{"line_number":1049,"context_line":"                               (\u0027--interface\u0027, self._get_transport(),"}],"source_content_type":"text/x-python","patch_set":5,"id":"878098a2_27c14650","line":1046,"in_reply_to":"a4da7997_17b34627","updated":"2021-03-05 15:31:24.000000000","message":"Sorry, what race condition? It is the first time I read about it.","commit_id":"4478433550ddab970f106636a4ba5fbba82c5e39"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"610230a3644d3e7943a13e7884fd4b59aa440bad","unresolved":true,"context_lines":[{"line_number":1043,"context_line":"        # iscsiadm returns 21 for \"No records found\" after version 2.0-871"},{"line_number":1044,"context_line":"        LOG.info(\"Trying to connect to iSCSI portal %s\", portal)"},{"line_number":1045,"context_line":"        out, err \u003d self._run_iscsiadm(connection_properties, (),"},{"line_number":1046,"context_line":"                                      check_exit_code\u003d(0, 21, 255))"},{"line_number":1047,"context_line":"        if err:"},{"line_number":1048,"context_line":"            self._run_iscsiadm(connection_properties,"},{"line_number":1049,"context_line":"                               (\u0027--interface\u0027, self._get_transport(),"}],"source_content_type":"text/x-python","patch_set":5,"id":"a4da7997_17b34627","line":1046,"in_reply_to":"f3c95b9d_ef2cd9a4","updated":"2021-03-05 13:00:13.000000000","message":"\u003e -1: We also need to add exit code 2 to this list, because that\u0027s the error that\u0027s reported in the BZ (even if there\u0027s no mention to it in the LP bug).\n\nYes. This issue was discovered in downstream bz1923975(mentioned in the LP bug) and triggered by exit code 2 from iscsi -m session (I didn\u0027t mention this in bz or LP bug. I\u0027ll put this later).\n\nI hesitate to add 2 because IIUC it is not an expected return code. In the real situation, 2 was returned because of wrong reference in the iscsiadm command triggered by race condition, so adding 2 into check_exit_code makes that wrong behavior of the iscsiadm command ignored.\n\nIf we agree to ignore 2 assuming that the return code 2 would indicate a bug of iscsiadm command caused by race condition with iscsiadm command, then it\u0027s ok.","commit_id":"4478433550ddab970f106636a4ba5fbba82c5e39"}],"os_brick/tests/initiator/connectors/test_iscsi.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"bc19b008b6242d4151cda77829b0701a54a14da7","unresolved":true,"context_lines":[{"line_number":1526,"context_line":""},{"line_number":1527,"context_line":"        self.connector._connect_vol(3, self.CON_PROPS, data)"},{"line_number":1528,"context_line":""},{"line_number":1529,"context_line":"        expected \u003d self._get_connect_vol_data()"},{"line_number":1530,"context_line":"        expected.update(failed_logins\u003d1, stopped_threads\u003d1)"},{"line_number":1531,"context_line":"        self.assertDictEqual(expected, data)"},{"line_number":1532,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"e5be7982_68351c51","line":1529,"range":{"start_line":1529,"start_character":8,"end_line":1529,"end_character":47},"updated":"2021-03-03 09:31:32.000000000","message":"nit: expected \u003d data.copy()","commit_id":"bf0c82675f1ece78519e343552838f6cb4b966da"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"cf9b0414bac25fbd0b0f27ca34f4bd5c7fed97c1","unresolved":true,"context_lines":[{"line_number":1526,"context_line":""},{"line_number":1527,"context_line":"        self.connector._connect_vol(3, self.CON_PROPS, data)"},{"line_number":1528,"context_line":""},{"line_number":1529,"context_line":"        expected \u003d self._get_connect_vol_data()"},{"line_number":1530,"context_line":"        expected.update(failed_logins\u003d1, stopped_threads\u003d1)"},{"line_number":1531,"context_line":"        self.assertDictEqual(expected, data)"},{"line_number":1532,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"f45733a1_d66e3a4a","line":1529,"range":{"start_line":1529,"start_character":8,"end_line":1529,"end_character":47},"in_reply_to":"e5be7982_68351c51","updated":"2021-03-03 12:19:02.000000000","message":"That would be an improvement but I prefer leaving this current implementation because it follows what we generates expected in the other test cases.\nI agree that we can use data.copy but in that case we should call that copy before we call _connect_vole.","commit_id":"bf0c82675f1ece78519e343552838f6cb4b966da"}],"releasenotes/notes/bug-1915678-901a6bd24ecede72.yaml":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8fdbd848c262b5cc7565e85157438228367c06d2","unresolved":true,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #1915678 \u003chttps://bugs.launchpad.net/cinder/+bug/1915678\u003e`_: Fix"},{"line_number":5,"context_line":"    unhandled exception during iscsi volume attachment which results in stuck"},{"line_number":6,"context_line":"    when multipath is enabled."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"142bf60c_493b9e57","line":6,"range":{"start_line":5,"start_character":55,"end_line":6,"end_character":30},"updated":"2021-03-04 01:52:22.000000000","message":"maybe:\n\nwith multipath enabled that resulted in the cinder-volume service becoming stuck and requiring a restart.","commit_id":"812ab43b0fd1b214c0b4a3ad67a85ea0161e6a30"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"9e944e71cae21dd9ff234b304e4f11dfd46ceb4f","unresolved":true,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #1915678 \u003chttps://bugs.launchpad.net/cinder/+bug/1915678\u003e`_: Fix"},{"line_number":5,"context_line":"    unhandled exception during iscsi volume attachment which results in stuck"},{"line_number":6,"context_line":"    when multipath is enabled."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"8258da77_b05acac6","line":6,"range":{"start_line":5,"start_character":55,"end_line":6,"end_character":30},"in_reply_to":"142bf60c_493b9e57","updated":"2021-03-04 03:02:16.000000000","message":"Thank you for the suggestion. I updated the description accordingly.","commit_id":"812ab43b0fd1b214c0b4a3ad67a85ea0161e6a30"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"100d3c7f37c431b520798c8706e288eb5acce584","unresolved":true,"context_lines":[{"line_number":4,"context_line":"    `Bug #1915678 \u003chttps://bugs.launchpad.net/cinder/+bug/1915678\u003e`_: Fix"},{"line_number":5,"context_line":"    unhandled exception during iscsi volume attachment with multipath enabled"},{"line_number":6,"context_line":"    that resulted in the cinder-volume service becoming stuck and requiring"},{"line_number":7,"context_line":"    a restart."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"88d4f136_a5dd420d","line":7,"range":{"start_line":7,"start_character":6,"end_line":7,"end_character":13},"updated":"2021-03-05 15:53:54.000000000","message":"nit: restart of cinder-volume.","commit_id":"4478433550ddab970f106636a4ba5fbba82c5e39"}]}
