)]}'
{"ironic_python_agent/extensions/iscsi.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"67849ddc6b3df03132a7c5a8d5685bab0879b041","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        cmd \u003d [\u0027tgtadm\u0027, \u0027--lld\u0027, \u0027iscsi\u0027, \u0027--mode\u0027, \u0027target\u0027, \u0027--op\u0027,"},{"line_number":121,"context_line":"               \u0027unbind\u0027, \u0027--tid\u0027, \u00271\u0027, \u0027--initiator-address\u0027, \u0027ALL\u0027]"},{"line_number":122,"context_line":"        _execute(cmd, \"Error when cleaning up iscsi binds.\")"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        cmd \u003d [\u0027sync\u0027]"},{"line_number":125,"context_line":"        _execute(cmd, \"Error flushing buffers to disk.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_9d93b4a3","line":122,"updated":"2019-08-30 08:26:03.000000000","message":"Are we okay with raising in this case? Given that it\u0027s never been required before, maybe just a warning? Ditto below","commit_id":"dfa74be3c4546ab85e4c978524a7920986ffe294"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"67849ddc6b3df03132a7c5a8d5685bab0879b041","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        cmd \u003d [\u0027tgtadm\u0027, \u0027--lld\u0027, \u0027iscsi\u0027, \u0027--mode\u0027, \u0027target\u0027, \u0027--op\u0027,"},{"line_number":128,"context_line":"               \u0027delete\u0027, \u0027--tid\u0027, \u00271\u0027]"},{"line_number":129,"context_line":"        _execute(cmd, \"Error deleting the iscsi target configuration.\")"},{"line_number":130,"context_line":"        return"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    storage \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_3d8c007f","line":129,"updated":"2019-08-30 08:26:03.000000000","message":"nit: I\u0027d move the new block out of the \u0027except\u0027 block for clarity.","commit_id":"dfa74be3c4546ab85e4c978524a7920986ffe294"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6ff2d1300df8f45e48e7c980cc5213c3a6e22233","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        cmd \u003d [\u0027tgtadm\u0027, \u0027--lld\u0027, \u0027iscsi\u0027, \u0027--mode\u0027, \u0027target\u0027, \u0027--op\u0027,"},{"line_number":128,"context_line":"               \u0027delete\u0027, \u0027--tid\u0027, \u00271\u0027]"},{"line_number":129,"context_line":"        _execute(cmd, \"Error deleting the iscsi target configuration.\")"},{"line_number":130,"context_line":"        return"},{"line_number":131,"context_line":"    except Exception as exc:"},{"line_number":132,"context_line":"        LOG.info(\u0027Failure encountered while trying to tear down tgtd. \u0027"},{"line_number":133,"context_line":"                 \u0027This is a non-fatal error. \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_62083a2c","line":130,"updated":"2019-09-05 10:47:51.000000000","message":"While this approach should work fine, I think it will be easier to read if we set rts_root \u003d None on failure and then do\n\n if rts_root is None:\n    return\n\nafter this try..except block.","commit_id":"87a39e3fdef2b470fce111fc0df9ef4cdf80c0a7"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"ac421092fd73e9463e5987f367a52e007b74f832","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        cmd \u003d [\u0027tgtadm\u0027, \u0027--lld\u0027, \u0027iscsi\u0027, \u0027--mode\u0027, \u0027target\u0027, \u0027--op\u0027,"},{"line_number":128,"context_line":"               \u0027delete\u0027, \u0027--tid\u0027, \u00271\u0027]"},{"line_number":129,"context_line":"        _execute(cmd, \"Error deleting the iscsi target configuration.\")"},{"line_number":130,"context_line":"        return"},{"line_number":131,"context_line":"    except Exception as exc:"},{"line_number":132,"context_line":"        LOG.info(\u0027Failure encountered while trying to tear down tgtd. \u0027"},{"line_number":133,"context_line":"                 \u0027This is a non-fatal error. \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_0c8ef4cf","line":130,"in_reply_to":"7faddb67_62083a2c","updated":"2019-09-19 22:43:47.000000000","message":"\u003e While this approach should work fine, I think it will be easier to\n \u003e read if we set rts_root \u003d None on failure and then do\n \u003e \n \u003e if rts_root is None:\n \u003e return\n \u003e \n \u003e after this try..except block.\n\nI\u0027m brain dead, it needs to be PART of the except block and then return.  Because rts_root is never set when the exceptio nis raised.","commit_id":"87a39e3fdef2b470fce111fc0df9ef4cdf80c0a7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6ff2d1300df8f45e48e7c980cc5213c3a6e22233","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        return"},{"line_number":131,"context_line":"    except Exception as exc:"},{"line_number":132,"context_line":"        LOG.info(\u0027Failure encountered while trying to tear down tgtd. \u0027"},{"line_number":133,"context_line":"                 \u0027This is a non-fatal error. \u0027"},{"line_number":134,"context_line":"                 \u0027Error: %s\u0027, exc)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    storage \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_02038611","line":133,"updated":"2019-09-05 10:47:51.000000000","message":"Maybe instead of this suggest that tgtd is not present (e.g. CentOS/RHEL)?","commit_id":"87a39e3fdef2b470fce111fc0df9ef4cdf80c0a7"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"ac421092fd73e9463e5987f367a52e007b74f832","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        return"},{"line_number":131,"context_line":"    except Exception as exc:"},{"line_number":132,"context_line":"        LOG.info(\u0027Failure encountered while trying to tear down tgtd. \u0027"},{"line_number":133,"context_line":"                 \u0027This is a non-fatal error. \u0027"},{"line_number":134,"context_line":"                 \u0027Error: %s\u0027, exc)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    storage \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_cc653c47","line":133,"in_reply_to":"7faddb67_02038611","updated":"2019-09-19 22:43:47.000000000","message":"If memory serves, _execute is unlikely to raise an error since it has its own logging/reporting built in with the command, so I\u0027ll remove the except, and just do the if logic.","commit_id":"87a39e3fdef2b470fce111fc0df9ef4cdf80c0a7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cd4e0b0af98e0e53ec71a27b54e45c0290a3f328","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    try:"},{"line_number":115,"context_line":"        rts_root \u003d rtslib_fb.RTSRoot()"},{"line_number":116,"context_line":"    except (OSError, EnvironmentError, rtslib_fb.RTSLibError) as exc:"},{"line_number":117,"context_line":"        LOG.info(\u0027Linux-IO is not available, attemting to stop tgtd mapping. \u0027"},{"line_number":118,"context_line":"                 \u0027Error: %s.\u0027, exc)"},{"line_number":119,"context_line":"        cmd \u003d [\u0027tgtadm\u0027, \u0027--lld\u0027, \u0027iscsi\u0027, \u0027--mode\u0027, \u0027target\u0027, \u0027--op\u0027,"},{"line_number":120,"context_line":"               \u0027unbind\u0027, \u0027--tid\u0027, \u00271\u0027, \u0027--initiator-address\u0027, \u0027ALL\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_c5062d1d","line":117,"updated":"2019-09-24 13:31:46.000000000","message":"nit s/attemting/attempting/\n(if you want to fix it)","commit_id":"8be4cb689cac5755f09eaa27cdde86a30b2633f8"},{"author":{"_account_id":30922,"name":"Nguyen Duy Binh","email":"binhnd1008@gmail.com","username":"binhnd108"},"change_message_id":"85a553a8a44a079187c1f5116a0bee99847f7691","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    except (OSError, EnvironmentError, rtslib_fb.RTSLibError) as exc:"},{"line_number":117,"context_line":"        LOG.info(\u0027Linux-IO is not available, attemting to stop tgtd mapping. \u0027"},{"line_number":118,"context_line":"                 \u0027Error: %s.\u0027, exc)"},{"line_number":119,"context_line":"        cmd \u003d [\u0027tgtadm\u0027, \u0027--lld\u0027, \u0027iscsi\u0027, \u0027--mode\u0027, \u0027target\u0027, \u0027--op\u0027,"},{"line_number":120,"context_line":"               \u0027unbind\u0027, \u0027--tid\u0027, \u00271\u0027, \u0027--initiator-address\u0027, \u0027ALL\u0027]"},{"line_number":121,"context_line":"        _execute(cmd, \"Error when cleaning up iscsi binds.\")"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        cmd \u003d [\u0027sync\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_c5dc1476","line":120,"range":{"start_line":119,"start_character":0,"end_line":120,"end_character":68},"updated":"2019-10-08 08:11:22.000000000","message":"on my environment, when run this command, it return error:\"stderr: tgtadm: can\u0027t find the target\" so the deploy process failed. Why iscsi clean here?","commit_id":"8be4cb689cac5755f09eaa27cdde86a30b2633f8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4986272e64fda49fe68d1c9a28e2c828f870d13d","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    except (OSError, EnvironmentError, rtslib_fb.RTSLibError) as exc:"},{"line_number":117,"context_line":"        LOG.info(\u0027Linux-IO is not available, attemting to stop tgtd mapping. \u0027"},{"line_number":118,"context_line":"                 \u0027Error: %s.\u0027, exc)"},{"line_number":119,"context_line":"        cmd \u003d [\u0027tgtadm\u0027, \u0027--lld\u0027, \u0027iscsi\u0027, \u0027--mode\u0027, \u0027target\u0027, \u0027--op\u0027,"},{"line_number":120,"context_line":"               \u0027unbind\u0027, \u0027--tid\u0027, \u00271\u0027, \u0027--initiator-address\u0027, \u0027ALL\u0027]"},{"line_number":121,"context_line":"        _execute(cmd, \"Error when cleaning up iscsi binds.\")"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        cmd \u003d [\u0027sync\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_7e56c3d0","line":120,"range":{"start_line":119,"start_character":0,"end_line":120,"end_character":68},"in_reply_to":"3fa7e38b_c5dc1476","updated":"2019-10-11 20:20:47.000000000","message":"Sounds like target 1 was already gone?","commit_id":"8be4cb689cac5755f09eaa27cdde86a30b2633f8"}],"ironic_python_agent/tests/unit/extensions/test_iscsi.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"67849ddc6b3df03132a7c5a8d5685bab0879b041","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        self.agent_extension \u003d iscsi.ISCSIExtension()"},{"line_number":290,"context_line":"        self.fake_dev \u003d \u0027/dev/fake\u0027"},{"line_number":291,"context_line":"        self.fake_iqn \u003d \u0027iqn-fake\u0027"},{"line_number":292,"context_line":"        self.rtsmock \u003d mock.patch.object("},{"line_number":293,"context_line":"            iscsi.rtslib_fb, \u0027RTSRoot\u0027,"},{"line_number":294,"context_line":"            side_effect\u003dEnvironmentError(), autospec\u003dTrue)"},{"line_number":295,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_5d89bc6c","line":292,"updated":"2019-08-30 08:26:03.000000000","message":"I\u0027m not sure mock will be shut down this way. Let\u0027s make it a decorator.","commit_id":"dfa74be3c4546ab85e4c978524a7920986ffe294"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6ff2d1300df8f45e48e7c980cc5213c3a6e22233","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                    mock.call(\u0027tgtadm\u0027, \u0027--lld\u0027, \u0027iscsi\u0027, \u0027--mode\u0027, \u0027target\u0027,"},{"line_number":303,"context_line":"                              \u0027--op\u0027, \u0027delete\u0027, \u0027--tid\u0027, \u00271\u0027)]"},{"line_number":304,"context_line":"        iscsi.clean_up(self.fake_dev)"},{"line_number":305,"context_line":"        mock_execute.assert_has_calls(expected)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"@mock.patch.object(iscsi.rtslib_fb, \u0027RTSRoot\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_22fec205","line":305,"updated":"2019-09-05 10:47:51.000000000","message":"could you make sure that no other rts calls are made?","commit_id":"87a39e3fdef2b470fce111fc0df9ef4cdf80c0a7"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"42fcda942168755ad725a60f19a348e2222b457a","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                    mock.call(\u0027tgtadm\u0027, \u0027--lld\u0027, \u0027iscsi\u0027, \u0027--mode\u0027, \u0027target\u0027,"},{"line_number":303,"context_line":"                              \u0027--op\u0027, \u0027delete\u0027, \u0027--tid\u0027, \u00271\u0027)]"},{"line_number":304,"context_line":"        iscsi.clean_up(self.fake_dev)"},{"line_number":305,"context_line":"        mock_execute.assert_has_calls(expected)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"@mock.patch.object(iscsi.rtslib_fb, \u0027RTSRoot\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_0ca7d451","line":305,"in_reply_to":"7faddb67_22fec205","updated":"2019-09-19 22:45:57.000000000","message":"In sifting through gate failures, not right now. Follow-ups welcome.","commit_id":"87a39e3fdef2b470fce111fc0df9ef4cdf80c0a7"}]}
