)]}'
{"cinder/tests/unit/test_storwize_svc.py":[{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"4724783f8e552b7dd31c69c8425a7dc4e4deab65","unresolved":false,"context_lines":[{"line_number":2628,"context_line":""},{"line_number":2629,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027)"},{"line_number":2630,"context_line":"    def test_run_ssh_with_san_ip(self, mock_ssh_execute):"},{"line_number":2631,"context_line":"        with mock.patch.object(ssh_utils, \u0027SSHPool\u0027) as mock_utils:"},{"line_number":2632,"context_line":"            mock_ssh_execute.retuparamiko.ssh_exception.rn_value \u003d True"},{"line_number":2633,"context_line":"            ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2634,"context_line":"            self._driver._run_ssh(ssh_cmd)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_92241ac7","line":2631,"updated":"2016-02-24 22:33:20.000000000","message":"Can move this mock.patch to be a decorator also (just like you do with the \"processutils\" mock.patch.  That\u0027s nice because then everything is indented one less level and a bit easier to read.\n\nNOTE: the decorator that\u0027s on top will be passed in as the *second* parameter","commit_id":"b8f68f8f98ae07392e2ce34cd0000ab3b9a11b7a"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"4724783f8e552b7dd31c69c8425a7dc4e4deab65","unresolved":false,"context_lines":[{"line_number":2629,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027)"},{"line_number":2630,"context_line":"    def test_run_ssh_with_san_ip(self, mock_ssh_execute):"},{"line_number":2631,"context_line":"        with mock.patch.object(ssh_utils, \u0027SSHPool\u0027) as mock_utils:"},{"line_number":2632,"context_line":"            mock_ssh_execute.retuparamiko.ssh_exception.rn_value \u003d True"},{"line_number":2633,"context_line":"            ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2634,"context_line":"            self._driver._run_ssh(ssh_cmd)"},{"line_number":2635,"context_line":"            mock_utils.assert_called_with("}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_750fc02e","line":2632,"updated":"2016-02-24 22:33:20.000000000","message":"Looks like this got garbled, \"paramiko.ssh_exception\" got thrown into the middle of the word.  Don\u0027t think you should *need* to set anything for the return value of this, it should just return a MagicMock object by default which should work","commit_id":"b8f68f8f98ae07392e2ce34cd0000ab3b9a11b7a"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"4724783f8e552b7dd31c69c8425a7dc4e4deab65","unresolved":false,"context_lines":[{"line_number":2645,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027)"},{"line_number":2646,"context_line":"    def test_run_ssh_with_secondary_ip(self, mock_ssh_execute):"},{"line_number":2647,"context_line":"        with mock.patch.object(ssh_utils, \u0027SSHPool\u0027) as mock_utils:"},{"line_number":2648,"context_line":"            mock_ssh_execute.return_value \u003d True"},{"line_number":2649,"context_line":"            mock_utils.side_effect \u003d paramiko.SSHException"},{"line_number":2650,"context_line":"            ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2651,"context_line":"            self._driver._run_ssh(ssh_cmd)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_759220a1","line":2648,"updated":"2016-02-24 22:33:20.000000000","message":"So side effect let\u0027s you pass in a \"list\", which basically means that each time you call the function you\u0027ll get the next value in the list.  The way it is now every time you call \"processutils.execute\" we\u0027ll throw the exception.\n\nInstead what we\u0027ll likely want to do is something like:\nmock_utils.side_effect \u003d [paramiko.SSHException, mock.MagicMock()]","commit_id":"b8f68f8f98ae07392e2ce34cd0000ab3b9a11b7a"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"0c18ed97852e207bb58767025a6f2ba154ff5ff1","unresolved":false,"context_lines":[{"line_number":2628,"context_line":""},{"line_number":2629,"context_line":"    @mock.patch.object(ssh_utils, \u0027SSHPool\u0027)"},{"line_number":2630,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027)"},{"line_number":2631,"context_line":"    def test_run_ssh_with_san_ip(self, mock_ssh_execute, mock_utils):"},{"line_number":2632,"context_line":"        ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2633,"context_line":"        self._driver._run_ssh(ssh_cmd)"},{"line_number":2634,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_430ce83a","line":2631,"updated":"2016-02-29 19:20:36.000000000","message":"mock_utils may be better named \"mock_ssh_pool\"","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"92e9e04b8f42c4ad5dc70323c8e8c440fb6bb729","unresolved":false,"context_lines":[{"line_number":2628,"context_line":""},{"line_number":2629,"context_line":"    @mock.patch.object(ssh_utils, \u0027SSHPool\u0027)"},{"line_number":2630,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027)"},{"line_number":2631,"context_line":"    def test_run_ssh_with_san_ip(self, mock_ssh_execute, mock_utils):"},{"line_number":2632,"context_line":"        ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2633,"context_line":"        self._driver._run_ssh(ssh_cmd)"},{"line_number":2634,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_92dd94e2","line":2631,"in_reply_to":"9aed3d3a_430ce83a","updated":"2016-02-29 21:25:38.000000000","message":"Done","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"0c18ed97852e207bb58767025a6f2ba154ff5ff1","unresolved":false,"context_lines":[{"line_number":2632,"context_line":"        ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2633,"context_line":"        self._driver._run_ssh(ssh_cmd)"},{"line_number":2634,"context_line":""},{"line_number":2635,"context_line":"        mock_utils.assert_called_with("},{"line_number":2636,"context_line":"            self._driver.configuration.san_ip,"},{"line_number":2637,"context_line":"            self._driver.configuration.san_ssh_port,"},{"line_number":2638,"context_line":"            self._driver.configuration.ssh_conn_timeout,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_637acc78","line":2635,"updated":"2016-02-29 19:20:36.000000000","message":"Likely better coverage if we do assert_called_once_with, since in the case that we failed over to the secondary on startup, we actually will call SSHPool first with san_ip, then with secondary_san_ip.","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"92e9e04b8f42c4ad5dc70323c8e8c440fb6bb729","unresolved":false,"context_lines":[{"line_number":2632,"context_line":"        ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2633,"context_line":"        self._driver._run_ssh(ssh_cmd)"},{"line_number":2634,"context_line":""},{"line_number":2635,"context_line":"        mock_utils.assert_called_with("},{"line_number":2636,"context_line":"            self._driver.configuration.san_ip,"},{"line_number":2637,"context_line":"            self._driver.configuration.san_ssh_port,"},{"line_number":2638,"context_line":"            self._driver.configuration.ssh_conn_timeout,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_66f7758b","line":2635,"in_reply_to":"9aed3d3a_637acc78","updated":"2016-02-29 21:25:38.000000000","message":"Done","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"0c18ed97852e207bb58767025a6f2ba154ff5ff1","unresolved":false,"context_lines":[{"line_number":2644,"context_line":""},{"line_number":2645,"context_line":"    @mock.patch.object(ssh_utils, \u0027SSHPool\u0027)"},{"line_number":2646,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027)"},{"line_number":2647,"context_line":"    def test_run_ssh_with_secondary_ip(self, mock_ssh_execute, mock_utils):"},{"line_number":2648,"context_line":"        mock_utils.side_effect \u003d [paramiko.SSHException, mock.MagicMock()]"},{"line_number":2649,"context_line":"        ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2650,"context_line":"        self._driver._run_ssh(ssh_cmd)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_4312280a","line":2647,"updated":"2016-02-29 19:20:36.000000000","message":"Not sure if we could come up with a more descriptive name to make clear the difference between this test case and the next test case.  This test case is flexing where initially fails to setup with the san_ip, where the next test case is where after successfully setting up the SSHPool, a SSH failure occurs, correct?","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"92e9e04b8f42c4ad5dc70323c8e8c440fb6bb729","unresolved":false,"context_lines":[{"line_number":2644,"context_line":""},{"line_number":2645,"context_line":"    @mock.patch.object(ssh_utils, \u0027SSHPool\u0027)"},{"line_number":2646,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027)"},{"line_number":2647,"context_line":"    def test_run_ssh_with_secondary_ip(self, mock_ssh_execute, mock_utils):"},{"line_number":2648,"context_line":"        mock_utils.side_effect \u003d [paramiko.SSHException, mock.MagicMock()]"},{"line_number":2649,"context_line":"        ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2650,"context_line":"        self._driver._run_ssh(ssh_cmd)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_46fcf171","line":2647,"in_reply_to":"9aed3d3a_4312280a","updated":"2016-02-29 21:25:38.000000000","message":"Correct, and done.","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"0c18ed97852e207bb58767025a6f2ba154ff5ff1","unresolved":false,"context_lines":[{"line_number":2649,"context_line":"        ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2650,"context_line":"        self._driver._run_ssh(ssh_cmd)"},{"line_number":2651,"context_line":""},{"line_number":2652,"context_line":"        mock_utils.assert_called_with("},{"line_number":2653,"context_line":"            self._driver.configuration.storwize_san_secondary_ip,"},{"line_number":2654,"context_line":"            self._driver.configuration.san_ssh_port,"},{"line_number":2655,"context_line":"            self._driver.configuration.ssh_conn_timeout,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_832430c5","line":2652,"updated":"2016-02-29 19:20:36.000000000","message":"May be nice to validate that this is indeed being called twice.","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"92e9e04b8f42c4ad5dc70323c8e8c440fb6bb729","unresolved":false,"context_lines":[{"line_number":2649,"context_line":"        ssh_cmd \u003d [\u0027svcinfo\u0027]"},{"line_number":2650,"context_line":"        self._driver._run_ssh(ssh_cmd)"},{"line_number":2651,"context_line":""},{"line_number":2652,"context_line":"        mock_utils.assert_called_with("},{"line_number":2653,"context_line":"            self._driver.configuration.storwize_san_secondary_ip,"},{"line_number":2654,"context_line":"            self._driver.configuration.san_ssh_port,"},{"line_number":2655,"context_line":"            self._driver.configuration.ssh_conn_timeout,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_26b72df6","line":2652,"in_reply_to":"9aed3d3a_832430c5","updated":"2016-02-29 21:25:38.000000000","message":"I agree, I know it does call it twice, but haven\u0027t nailed down how to show that yet. Will continue looking into this.","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"0c18ed97852e207bb58767025a6f2ba154ff5ff1","unresolved":false,"context_lines":[{"line_number":2676,"context_line":"            privatekey\u003dself._driver.configuration.san_private_key,"},{"line_number":2677,"context_line":"            min_size\u003dself._driver.configuration.ssh_min_pool_conn,"},{"line_number":2678,"context_line":"            max_size\u003dself._driver.configuration.ssh_max_pool_conn)"},{"line_number":2679,"context_line":""},{"line_number":2680,"context_line":"    def _generate_vol_info(self, vol_name, vol_id):"},{"line_number":2681,"context_line":"        rand_id \u003d six.text_type(random.randint(10000, 99999))"},{"line_number":2682,"context_line":"        if vol_name:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_43b98878","line":2679,"updated":"2016-02-29 19:20:36.000000000","message":"Going forward it would be nice to add test coverage for what we expect when both san_ip and secondary_san_ip fail.","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"92e9e04b8f42c4ad5dc70323c8e8c440fb6bb729","unresolved":false,"context_lines":[{"line_number":2676,"context_line":"            privatekey\u003dself._driver.configuration.san_private_key,"},{"line_number":2677,"context_line":"            min_size\u003dself._driver.configuration.ssh_min_pool_conn,"},{"line_number":2678,"context_line":"            max_size\u003dself._driver.configuration.ssh_max_pool_conn)"},{"line_number":2679,"context_line":""},{"line_number":2680,"context_line":"    def _generate_vol_info(self, vol_name, vol_id):"},{"line_number":2681,"context_line":"        rand_id \u003d six.text_type(random.randint(10000, 99999))"},{"line_number":2682,"context_line":"        if vol_name:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_e6c0a552","line":2679,"in_reply_to":"9aed3d3a_43b98878","updated":"2016-02-29 21:25:38.000000000","message":"I will address this in a follow up patch.","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"}],"cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"acfec2c8aea91fc8424ce66dc3cfcf62f6151a1a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                    \u0027Example: \"pool2\"\u0027),"},{"line_number":103,"context_line":"    cfg.StrOpt(\u0027storwize_san_secondary_ip\u0027,"},{"line_number":104,"context_line":"               default\u003dNone,"},{"line_number":105,"context_line":"               help\u003d\u0027Specifies secondary management IP that would be \u0027"},{"line_number":106,"context_line":"                    \u0027used if san_ip is invalid.\u0027),"},{"line_number":107,"context_line":"    cfg.BoolOpt(\u0027storwize_svc_vol_nofmtdisk\u0027,"},{"line_number":108,"context_line":"                default\u003dFalse,"},{"line_number":109,"context_line":"                help\u003d\u0027Specifies that the volume not be formatted during \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aed3d3a_b863bb19","line":106,"range":{"start_line":105,"start_character":21,"end_line":106,"end_character":47},"updated":"2016-02-26 20:44:13.000000000","message":"I think this needs to be clarified.  Recommend:\n\u0027Specifies secondary management IP to be used if san_ip is invalid or becomes inaccessible.\"","commit_id":"af4f313a36c9e4693871b02b07849e34d0a1562b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8c373c5b8ac103bec5dd33dd6590bf7e7975985f","unresolved":false,"context_lines":[{"line_number":2029,"context_line":"                        command,"},{"line_number":2030,"context_line":"                        check_exit_code\u003dcheck_exit_code)"},{"line_number":2031,"context_line":"                except Exception as e:"},{"line_number":2032,"context_line":"                        LOG.error(e)"},{"line_number":2033,"context_line":"                        last_exception \u003d e"},{"line_number":2034,"context_line":"                        greenthread.sleep(random.randint(20, 500) / 100.0)"},{"line_number":2035,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aed3d3a_25f48c84","line":2032,"updated":"2016-02-27 19:15:08.000000000","message":"This should be either LOG.error(six.text_type(e)) or LOG.error(_LE(Error occurred: %s), e)","commit_id":"33d68f68371e6315b270d6fa83e565f3ab97a319"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"73d02a5840e4bde61f03dcac431e5d40fd8b69ab","unresolved":false,"context_lines":[{"line_number":2029,"context_line":"                        command,"},{"line_number":2030,"context_line":"                        check_exit_code\u003dcheck_exit_code)"},{"line_number":2031,"context_line":"                except Exception as e:"},{"line_number":2032,"context_line":"                        LOG.error(e)"},{"line_number":2033,"context_line":"                        last_exception \u003d e"},{"line_number":2034,"context_line":"                        greenthread.sleep(random.randint(20, 500) / 100.0)"},{"line_number":2035,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aed3d3a_c46e792e","line":2032,"in_reply_to":"9aed3d3a_25f48c84","updated":"2016-02-28 15:10:25.000000000","message":"Done","commit_id":"33d68f68371e6315b270d6fa83e565f3ab97a319"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"3bf984ad67aba956afcef5724b5205ebdf82feb9","unresolved":false,"context_lines":[{"line_number":100,"context_line":"               help\u003d\u0027If operating in stretched cluster mode, specify the \u0027"},{"line_number":101,"context_line":"                    \u0027name of the pool in which mirrored copies are stored.\u0027"},{"line_number":102,"context_line":"                    \u0027Example: \"pool2\"\u0027),"},{"line_number":103,"context_line":"    cfg.StrOpt(\u0027storwize_san_secondary_ip\u0027,"},{"line_number":104,"context_line":"               default\u003dNone,"},{"line_number":105,"context_line":"               help\u003d\u0027Specifies secondary management IP to be used if \u0027"},{"line_number":106,"context_line":"                    \u0027san_ip is invalid or becomes inaccessible.\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_2230f59d","line":103,"range":{"start_line":103,"start_character":8,"end_line":103,"end_character":14},"updated":"2016-02-28 18:17:14.000000000","message":"If this truly can only be an IP, the you might as well use IPOpt.  But if hostname is accepted, the help should be updated.","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"92dd835ff59c4931cf3b2fb585f53b6f286900ad","unresolved":false,"context_lines":[{"line_number":100,"context_line":"               help\u003d\u0027If operating in stretched cluster mode, specify the \u0027"},{"line_number":101,"context_line":"                    \u0027name of the pool in which mirrored copies are stored.\u0027"},{"line_number":102,"context_line":"                    \u0027Example: \"pool2\"\u0027),"},{"line_number":103,"context_line":"    cfg.StrOpt(\u0027storwize_san_secondary_ip\u0027,"},{"line_number":104,"context_line":"               default\u003dNone,"},{"line_number":105,"context_line":"               help\u003d\u0027Specifies secondary management IP to be used if \u0027"},{"line_number":106,"context_line":"                    \u0027san_ip is invalid or becomes inaccessible.\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_d7439b11","line":103,"range":{"start_line":103,"start_character":8,"end_line":103,"end_character":14},"in_reply_to":"9aed3d3a_2230f59d","updated":"2016-02-29 16:56:57.000000000","message":"We can update the help.  I don\u0027t think we should limit this to IPs.","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"45d9ec49f560cbfe2e8c9ef66474c041aa30f3d8","unresolved":false,"context_lines":[{"line_number":100,"context_line":"               help\u003d\u0027If operating in stretched cluster mode, specify the \u0027"},{"line_number":101,"context_line":"                    \u0027name of the pool in which mirrored copies are stored.\u0027"},{"line_number":102,"context_line":"                    \u0027Example: \"pool2\"\u0027),"},{"line_number":103,"context_line":"    cfg.StrOpt(\u0027storwize_san_secondary_ip\u0027,"},{"line_number":104,"context_line":"               default\u003dNone,"},{"line_number":105,"context_line":"               help\u003d\u0027Specifies secondary management IP to be used if \u0027"},{"line_number":106,"context_line":"                    \u0027san_ip is invalid or becomes inaccessible.\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_5ea5e044","line":103,"range":{"start_line":103,"start_character":8,"end_line":103,"end_character":14},"in_reply_to":"9aed3d3a_d7439b11","updated":"2016-02-29 18:22:46.000000000","message":"Done","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"3bf984ad67aba956afcef5724b5205ebdf82feb9","unresolved":false,"context_lines":[{"line_number":1974,"context_line":""},{"line_number":1975,"context_line":"    def _run_ssh(self, cmd_list, check_exit_code\u003dTrue, attempts\u003d1):"},{"line_number":1976,"context_line":"        cinder_utils.check_ssh_injection(cmd_list)"},{"line_number":1977,"context_line":"        command \u003d \u0027 \u0027. join(cmd_list)"},{"line_number":1978,"context_line":"        if not self.sshpool:"},{"line_number":1979,"context_line":"            try:"},{"line_number":1980,"context_line":"                self.sshpool \u003d self._set_up_sshpool(self.configuration.san_ip)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_a2f525cc","line":1977,"range":{"start_line":1977,"start_character":22,"end_line":1977,"end_character":23},"updated":"2016-02-28 18:17:14.000000000","message":"Remove spaces after \u0027.\u0027","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"45d9ec49f560cbfe2e8c9ef66474c041aa30f3d8","unresolved":false,"context_lines":[{"line_number":1974,"context_line":""},{"line_number":1975,"context_line":"    def _run_ssh(self, cmd_list, check_exit_code\u003dTrue, attempts\u003d1):"},{"line_number":1976,"context_line":"        cinder_utils.check_ssh_injection(cmd_list)"},{"line_number":1977,"context_line":"        command \u003d \u0027 \u0027. join(cmd_list)"},{"line_number":1978,"context_line":"        if not self.sshpool:"},{"line_number":1979,"context_line":"            try:"},{"line_number":1980,"context_line":"                self.sshpool \u003d self._set_up_sshpool(self.configuration.san_ip)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_54a82977","line":1977,"range":{"start_line":1977,"start_character":22,"end_line":1977,"end_character":23},"in_reply_to":"9aed3d3a_a2f525cc","updated":"2016-02-29 18:22:46.000000000","message":"Done","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":17045,"name":"xiaoqin","email":"xiaoqin.li@hotmail.com","username":"xiaoqin"},"change_message_id":"9dd17edf163c0ceab9898bd8f52b567ad6a283b2","unresolved":false,"context_lines":[{"line_number":1980,"context_line":"                self.sshpool \u003d self._set_up_sshpool(self.configuration.san_ip)"},{"line_number":1981,"context_line":"            except paramiko.SSHException:"},{"line_number":1982,"context_line":"                self.sshpool \u003d self._set_up_sshpool("},{"line_number":1983,"context_line":"                    self.configuration.storwize_san_secondary_ip)"},{"line_number":1984,"context_line":"        try:"},{"line_number":1985,"context_line":"            self._ssh_execute(self.sshpool. command,"},{"line_number":1986,"context_line":"                              check_exit_code, attempts)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_581a3c7e","line":1983,"range":{"start_line":1983,"start_character":20,"end_line":1983,"end_character":64},"updated":"2016-02-29 07:46:01.000000000","message":"The storwize_san_secondary_ip is an option configuration. It may  be not configured by the user. So we need to take concideration that whether it is configured or not.","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"92dd835ff59c4931cf3b2fb585f53b6f286900ad","unresolved":false,"context_lines":[{"line_number":1980,"context_line":"                self.sshpool \u003d self._set_up_sshpool(self.configuration.san_ip)"},{"line_number":1981,"context_line":"            except paramiko.SSHException:"},{"line_number":1982,"context_line":"                self.sshpool \u003d self._set_up_sshpool("},{"line_number":1983,"context_line":"                    self.configuration.storwize_san_secondary_ip)"},{"line_number":1984,"context_line":"        try:"},{"line_number":1985,"context_line":"            self._ssh_execute(self.sshpool. command,"},{"line_number":1986,"context_line":"                              check_exit_code, attempts)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_d728bb35","line":1983,"range":{"start_line":1983,"start_character":20,"end_line":1983,"end_character":64},"in_reply_to":"9aed3d3a_581a3c7e","updated":"2016-02-29 16:56:57.000000000","message":"Oh, I see.  Check and make sure it exists.  In the case that it doesn\u0027t could throw an info or warning message that it is not set and then we can\u0027t fail over as a result.  Good thought.","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"45d9ec49f560cbfe2e8c9ef66474c041aa30f3d8","unresolved":false,"context_lines":[{"line_number":1980,"context_line":"                self.sshpool \u003d self._set_up_sshpool(self.configuration.san_ip)"},{"line_number":1981,"context_line":"            except paramiko.SSHException:"},{"line_number":1982,"context_line":"                self.sshpool \u003d self._set_up_sshpool("},{"line_number":1983,"context_line":"                    self.configuration.storwize_san_secondary_ip)"},{"line_number":1984,"context_line":"        try:"},{"line_number":1985,"context_line":"            self._ssh_execute(self.sshpool. command,"},{"line_number":1986,"context_line":"                              check_exit_code, attempts)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_c8c81a25","line":1983,"range":{"start_line":1983,"start_character":20,"end_line":1983,"end_character":64},"in_reply_to":"9aed3d3a_d728bb35","updated":"2016-02-29 18:22:46.000000000","message":"Done","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"3bf984ad67aba956afcef5724b5205ebdf82feb9","unresolved":false,"context_lines":[{"line_number":1982,"context_line":"                self.sshpool \u003d self._set_up_sshpool("},{"line_number":1983,"context_line":"                    self.configuration.storwize_san_secondary_ip)"},{"line_number":1984,"context_line":"        try:"},{"line_number":1985,"context_line":"            self._ssh_execute(self.sshpool. command,"},{"line_number":1986,"context_line":"                              check_exit_code, attempts)"},{"line_number":1987,"context_line":""},{"line_number":1988,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_e2ff2da8","line":1985,"range":{"start_line":1985,"start_character":43,"end_line":1985,"end_character":44},"updated":"2016-02-28 18:17:14.000000000","message":"Remove spaces after \u0027.\u0027","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"45d9ec49f560cbfe2e8c9ef66474c041aa30f3d8","unresolved":false,"context_lines":[{"line_number":1982,"context_line":"                self.sshpool \u003d self._set_up_sshpool("},{"line_number":1983,"context_line":"                    self.configuration.storwize_san_secondary_ip)"},{"line_number":1984,"context_line":"        try:"},{"line_number":1985,"context_line":"            self._ssh_execute(self.sshpool. command,"},{"line_number":1986,"context_line":"                              check_exit_code, attempts)"},{"line_number":1987,"context_line":""},{"line_number":1988,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_b4b7f5d6","line":1985,"range":{"start_line":1985,"start_character":43,"end_line":1985,"end_character":44},"in_reply_to":"9aed3d3a_e2ff2da8","updated":"2016-02-29 18:22:46.000000000","message":"Done","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":17045,"name":"xiaoqin","email":"xiaoqin.li@hotmail.com","username":"xiaoqin"},"change_message_id":"9dd17edf163c0ceab9898bd8f52b567ad6a283b2","unresolved":false,"context_lines":[{"line_number":1993,"context_line":"                                \"switch IP to %s.\"),"},{"line_number":1994,"context_line":"                            self.configuration.storwize_san_secondary_ip)"},{"line_number":1995,"context_line":"                self.sshpool \u003d self._set_up_sshpool("},{"line_number":1996,"context_line":"                    self.configuration.storwize_san_secondary_ip)"},{"line_number":1997,"context_line":"                self._ssh_execute(self.sshpool. command,"},{"line_number":1998,"context_line":"                                  check_exit_code, attempts)"},{"line_number":1999,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_b80b8829","line":1996,"range":{"start_line":1996,"start_character":20,"end_line":1996,"end_character":64},"updated":"2016-02-29 07:46:01.000000000","message":"Samve as above. Take concideration that whether storwize_san_secondary_ip is configured or not","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"45d9ec49f560cbfe2e8c9ef66474c041aa30f3d8","unresolved":false,"context_lines":[{"line_number":1993,"context_line":"                                \"switch IP to %s.\"),"},{"line_number":1994,"context_line":"                            self.configuration.storwize_san_secondary_ip)"},{"line_number":1995,"context_line":"                self.sshpool \u003d self._set_up_sshpool("},{"line_number":1996,"context_line":"                    self.configuration.storwize_san_secondary_ip)"},{"line_number":1997,"context_line":"                self._ssh_execute(self.sshpool. command,"},{"line_number":1998,"context_line":"                                  check_exit_code, attempts)"},{"line_number":1999,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_e8d35ed3","line":1996,"range":{"start_line":1996,"start_character":20,"end_line":1996,"end_character":64},"in_reply_to":"9aed3d3a_b80b8829","updated":"2016-02-29 18:22:46.000000000","message":"Done","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"3bf984ad67aba956afcef5724b5205ebdf82feb9","unresolved":false,"context_lines":[{"line_number":1994,"context_line":"                            self.configuration.storwize_san_secondary_ip)"},{"line_number":1995,"context_line":"                self.sshpool \u003d self._set_up_sshpool("},{"line_number":1996,"context_line":"                    self.configuration.storwize_san_secondary_ip)"},{"line_number":1997,"context_line":"                self._ssh_execute(self.sshpool. command,"},{"line_number":1998,"context_line":"                                  check_exit_code, attempts)"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_0205f1ba","line":1997,"range":{"start_line":1997,"start_character":47,"end_line":1997,"end_character":48},"updated":"2016-02-28 18:17:14.000000000","message":"Remove spaces after \u0027.\u0027","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"45d9ec49f560cbfe2e8c9ef66474c041aa30f3d8","unresolved":false,"context_lines":[{"line_number":1994,"context_line":"                            self.configuration.storwize_san_secondary_ip)"},{"line_number":1995,"context_line":"                self.sshpool \u003d self._set_up_sshpool("},{"line_number":1996,"context_line":"                    self.configuration.storwize_san_secondary_ip)"},{"line_number":1997,"context_line":"                self._ssh_execute(self.sshpool. command,"},{"line_number":1998,"context_line":"                                  check_exit_code, attempts)"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_94bc71bc","line":1997,"range":{"start_line":1997,"start_character":47,"end_line":1997,"end_character":48},"in_reply_to":"9aed3d3a_0205f1ba","updated":"2016-02-29 18:22:46.000000000","message":"Done","commit_id":"2312f6946486a4deec73ce08caf2d25105b290d3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"0c18ed97852e207bb58767025a6f2ba154ff5ff1","unresolved":false,"context_lines":[{"line_number":1979,"context_line":"            try:"},{"line_number":1980,"context_line":"                self.sshpool \u003d self._set_up_sshpool(self.configuration.san_ip)"},{"line_number":1981,"context_line":"            except paramiko.SSHException:"},{"line_number":1982,"context_line":"                if self.configuration.storwize_san_secondary_ip is not None:"},{"line_number":1983,"context_line":"                    self.sshpool \u003d self._set_up_sshpool("},{"line_number":1984,"context_line":"                        self.configuration.storwize_san_secondary_ip)"},{"line_number":1985,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_e3f09c93","line":1982,"updated":"2016-02-29 19:20:36.000000000","message":"Would be nice to log a warning here when the san_ip wasn\u0027t working initially and that we\u0027re going to start configuring the secondary_ip","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"92e9e04b8f42c4ad5dc70323c8e8c440fb6bb729","unresolved":false,"context_lines":[{"line_number":1979,"context_line":"            try:"},{"line_number":1980,"context_line":"                self.sshpool \u003d self._set_up_sshpool(self.configuration.san_ip)"},{"line_number":1981,"context_line":"            except paramiko.SSHException:"},{"line_number":1982,"context_line":"                if self.configuration.storwize_san_secondary_ip is not None:"},{"line_number":1983,"context_line":"                    self.sshpool \u003d self._set_up_sshpool("},{"line_number":1984,"context_line":"                        self.configuration.storwize_san_secondary_ip)"},{"line_number":1985,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_665db546","line":1982,"in_reply_to":"9aed3d3a_e3f09c93","updated":"2016-02-29 21:25:38.000000000","message":"Done","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"0c18ed97852e207bb58767025a6f2ba154ff5ff1","unresolved":false,"context_lines":[{"line_number":1983,"context_line":"                    self.sshpool \u003d self._set_up_sshpool("},{"line_number":1984,"context_line":"                        self.configuration.storwize_san_secondary_ip)"},{"line_number":1985,"context_line":"                else:"},{"line_number":1986,"context_line":"                    LOG.warning(_LW(\u0027Unable to create SSHPool using san_ip \u0027"},{"line_number":1987,"context_line":"                                    \u0027and not able to use \u0027"},{"line_number":1988,"context_line":"                                    \u0027storwize_san_secondary_ip since it is \u0027"},{"line_number":1989,"context_line":"                                    \u0027not configured.\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_400cde3a","line":1986,"updated":"2016-02-29 19:20:36.000000000","message":"This warning logging looks good, but I think in this case we should re-raise the exception, because we were unable to setup an SSHPool.  With this patch we\u0027d log this warning, but the exception trace would be about failing to run the SSH command instead of failing to setup the SSH pool which I could see being confusing","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"92e9e04b8f42c4ad5dc70323c8e8c440fb6bb729","unresolved":false,"context_lines":[{"line_number":1983,"context_line":"                    self.sshpool \u003d self._set_up_sshpool("},{"line_number":1984,"context_line":"                        self.configuration.storwize_san_secondary_ip)"},{"line_number":1985,"context_line":"                else:"},{"line_number":1986,"context_line":"                    LOG.warning(_LW(\u0027Unable to create SSHPool using san_ip \u0027"},{"line_number":1987,"context_line":"                                    \u0027and not able to use \u0027"},{"line_number":1988,"context_line":"                                    \u0027storwize_san_secondary_ip since it is \u0027"},{"line_number":1989,"context_line":"                                    \u0027not configured.\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_c6564129","line":1986,"in_reply_to":"9aed3d3a_400cde3a","updated":"2016-02-29 21:25:38.000000000","message":"Done","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"0c18ed97852e207bb58767025a6f2ba154ff5ff1","unresolved":false,"context_lines":[{"line_number":1994,"context_line":"        except Exception:"},{"line_number":1995,"context_line":"            # Need to check if creating an SSHPool storwize_san_secondary_ip"},{"line_number":1996,"context_line":"            # before raising an error."},{"line_number":1997,"context_line":"            try:"},{"line_number":1998,"context_line":"                if self.configuration.storwize_san_secondary_ip is not None:"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"                    LOG.warning(_LW(\"Unable to execute SSH command. \""}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_c0ec6ef5","line":1997,"updated":"2016-02-29 19:20:36.000000000","message":"Think this try/catch block should only be around lines 2005-2006.  Otherwise, I think we\u0027d end up logging the Error running SSH command multiple times in the case we made it into if statement 2008, cause then it would hit the except block on 2015 as well.\n\nI think the cleanest solution might be to just move the try/except block into _ssh_execute, so that we don\u0027t need it at all in this _run_ssh method.  Then we\u0027d do the logging of \"Error running SSH command: %s\" in _ssh_execute (and only define that logging one place).  Then in lines 1998-2007 we would just log if we\u0027re trying to switch the IP or not","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"92e9e04b8f42c4ad5dc70323c8e8c440fb6bb729","unresolved":false,"context_lines":[{"line_number":1994,"context_line":"        except Exception:"},{"line_number":1995,"context_line":"            # Need to check if creating an SSHPool storwize_san_secondary_ip"},{"line_number":1996,"context_line":"            # before raising an error."},{"line_number":1997,"context_line":"            try:"},{"line_number":1998,"context_line":"                if self.configuration.storwize_san_secondary_ip is not None:"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"                    LOG.warning(_LW(\"Unable to execute SSH command. \""}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_d2471cba","line":1997,"in_reply_to":"9aed3d3a_c0ec6ef5","updated":"2016-02-29 21:25:38.000000000","message":"I think I understand your suggestion. I will push up what I did and hope it matches what you were thinking.","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"0c18ed97852e207bb58767025a6f2ba154ff5ff1","unresolved":false,"context_lines":[{"line_number":2005,"context_line":"                    self._ssh_execute(self.sshpool.command,"},{"line_number":2006,"context_line":"                                      check_exit_code, attempts)"},{"line_number":2007,"context_line":"                else:"},{"line_number":2008,"context_line":"                    LOG.warning(_LW(\u0027Unable to create SSHPool using san_ip \u0027"},{"line_number":2009,"context_line":"                                    \u0027and not able to use \u0027"},{"line_number":2010,"context_line":"                                    \u0027storwize_san_secondary_ip since it is \u0027"},{"line_number":2011,"context_line":"                                    \u0027not configured.\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_6055a2f8","line":2008,"updated":"2016-02-29 19:20:36.000000000","message":"This warning should be the \"Unable to execute SSH command.\"","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"92e9e04b8f42c4ad5dc70323c8e8c440fb6bb729","unresolved":false,"context_lines":[{"line_number":2005,"context_line":"                    self._ssh_execute(self.sshpool.command,"},{"line_number":2006,"context_line":"                                      check_exit_code, attempts)"},{"line_number":2007,"context_line":"                else:"},{"line_number":2008,"context_line":"                    LOG.warning(_LW(\u0027Unable to create SSHPool using san_ip \u0027"},{"line_number":2009,"context_line":"                                    \u0027and not able to use \u0027"},{"line_number":2010,"context_line":"                                    \u0027storwize_san_secondary_ip since it is \u0027"},{"line_number":2011,"context_line":"                                    \u0027not configured.\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aed3d3a_f20a2089","line":2008,"in_reply_to":"9aed3d3a_6055a2f8","updated":"2016-02-29 21:25:38.000000000","message":"Done","commit_id":"1f824339c1121c1db622572dcc8a443c7655aa0b"}]}
