)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a542d539c4e398ba98ec627309fdd43ca31d1b7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangchunlong1@huawei.com \u003czhangchunlong1@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-24 15:03:40 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"check the configuration item api_max_retries"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"we need to to check the value of the configuration item api_max_retries in"},{"line_number":10,"context_line":"the code in order to ensure the \" api_max_retries \" equal or bigger than 0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"da9b358b_6faa901b","line":7,"updated":"2015-03-29 05:15:27.000000000","message":"please prefix this with ironic","commit_id":"10bc16fac1f17648095bb4ce11c419aad3ab0c53"}],"nova/tests/unit/virt/ironic/test_client_wrapper.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a542d539c4e398ba98ec627309fdd43ca31d1b7","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        mock_get_client.return_value \u003d FAKE_CLIENT"},{"line_number":97,"context_line":"        self.assertRaises(exception.NovaException, self.ironicclient.call,"},{"line_number":98,"context_line":"                          \"node.list\")"},{"line_number":99,"context_line":"        self.assertEqual(3, test_obj.call_count)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    @mock.patch.object(client_wrapper.IronicClientWrapper, \u0027_multi_getattr\u0027)"},{"line_number":102,"context_line":"    @mock.patch.object(client_wrapper.IronicClientWrapper, \u0027_get_client\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9b358b_ef6c600a","line":99,"updated":"2015-03-29 05:15:27.000000000","message":"this is odd - please see comments","commit_id":"10bc16fac1f17648095bb4ce11c419aad3ab0c53"}],"nova/tests/virt/ironic/test_client_wrapper.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"ee4362ae5debbbe59b45664692c4fda9bb3af054","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        mock_get_client.return_value \u003d FAKE_CLIENT"},{"line_number":105,"context_line":"        self.assertRaises(exception.NovaException, self.icli.call, \"node.list\")"},{"line_number":106,"context_line":"        self.assertEqual(1, test_obj.call_count)"},{"line_number":107,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e check the configuration item api_max_retries"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @mock.patch.object(client_wrapper.IronicClientWrapper, \u0027_multi_getattr\u0027)"},{"line_number":110,"context_line":"    @mock.patch.object(client_wrapper.IronicClientWrapper, \u0027_get_client\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_c7526e34","line":107,"updated":"2014-10-15 13:04:56.000000000","message":"Please get rid of merge conflicts","commit_id":"b1a29ba51e7a2f1b33d9c0ce76088e5d1640379c"}],"nova/virt/ironic/client_wrapper.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0b844d68784fc8005f40b13577b821ad74d42247","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                      ironic.exc.ConnectionRefused,"},{"line_number":103,"context_line":"                      ironic.exc.Conflict)"},{"line_number":104,"context_line":"        # num_attempts should be the times of retry + 1"},{"line_number":105,"context_line":"        # eg. retry\u003d\u003d0 just means  run once and no try"},{"line_number":106,"context_line":"        num_attempts \u003d max(0, CONF.ironic.api_max_retries) + 1"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        for attempt in range(1, num_attempts + 1):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_e0ae6e2d","line":105,"updated":"2014-12-11 16:16:25.000000000","message":"try \u003d\u003e retry","commit_id":"7d2aba8a0d60a3290ce5dc15602543f7e55bf8ca"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a542d539c4e398ba98ec627309fdd43ca31d1b7","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                          dict(node\u003dnode.uuid), instance\u003dinstance)"},{"line_number":738,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"            if data[\u0027tries\u0027] \u003e\u003d max(0, CONF.ironic.api_max_retries) + 1:"},{"line_number":741,"context_line":"                msg \u003d (_(\"Error destroying the instance on node %(node)s. \""},{"line_number":742,"context_line":"                         \"Provision state still \u0027%(state)s\u0027.\")"},{"line_number":743,"context_line":"                       % {\u0027state\u0027: node.provision_state,"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9b358b_2f63681c","line":740,"updated":"2015-03-29 05:15:27.000000000","message":"i am not sure about this - if this is 0 or \u003c 0 then we want one retry\n\nif this is greater than 0 then we want the retries configured by the user\n\nshould it not be: max(1, CONF.ironic.api_max_retries):","commit_id":"10bc16fac1f17648095bb4ce11c419aad3ab0c53"},{"author":{"_account_id":11530,"name":"zhangtralon","email":"ztralon@hotmail.com","username":"zhangtralon"},"change_message_id":"7798156ef516151b3ba61290547cdc761542d0de","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                          dict(node\u003dnode.uuid), instance\u003dinstance)"},{"line_number":738,"context_line":"                raise loopingcall.LoopingCallDone()"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"            if data[\u0027tries\u0027] \u003e\u003d max(0, CONF.ironic.api_max_retries) + 1:"},{"line_number":741,"context_line":"                msg \u003d (_(\"Error destroying the instance on node %(node)s. \""},{"line_number":742,"context_line":"                         \"Provision state still \u0027%(state)s\u0027.\")"},{"line_number":743,"context_line":"                       % {\u0027state\u0027: node.provision_state,"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9b358b_78825254","line":740,"in_reply_to":"da9b358b_2f63681c","updated":"2015-03-30 03:18:53.000000000","message":"I think that Russell Bryant\u0027s comment is very good in the patch set 3 from https://review.openstack.org/#/c/118005/ \n\nRussell Bryant\nI think the logic here is slightly off for what \"retries\" means.\nIf the configured value is negative, that is clearly wrong. As you\u0027ve done, a log message seems appropriate. At that point, I would treat it as 0.\nIf the configured value is 0, then one attempt should be made. That would be no retries. (Note it\u0027s not a configured number of attempts, it\u0027s retries.)\nIf the configured value is \u003e 0, then the total number attempts should be retries + 1.","commit_id":"10bc16fac1f17648095bb4ce11c419aad3ab0c53"}]}
