)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"41fcd932eb5b8039d36103aa64ca563f33ceeeab","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kevin Benton \u003ckevin@benton.pub\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-16 02:35:30 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add exponential back-off to RPC calls"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds an exponential backoff mechanism for timeout values"},{"line_number":10,"context_line":"on any RPC calls in Neutron that don\u0027t explicitly request a timeout"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_07cf0380","line":7,"updated":"2016-03-08 05:14:46.000000000","message":"for all agent calls","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"4cf7e69b2c4f78010a638404446bd8b26ff2cde1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kevin Benton \u003ckevin@benton.pub\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-16 02:35:30 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add exponential back-off to RPC calls"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds an exponential backoff mechanism for timeout values"},{"line_number":10,"context_line":"on any RPC calls in Neutron that don\u0027t explicitly request a timeout"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9aed3d3a_b0fd2670","line":7,"updated":"2016-03-01 01:47:49.000000000","message":"how is this gonna be used?","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"41fcd932eb5b8039d36103aa64ca563f33ceeeab","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add exponential back-off to RPC calls"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds an exponential backoff mechanism for timeout values"},{"line_number":10,"context_line":"on any RPC calls in Neutron that don\u0027t explicitly request a timeout"},{"line_number":11,"context_line":"value. This will prevent the clients from DDoSing the server by"},{"line_number":12,"context_line":"giving up on requests and retrying them before they are fulfilled."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_e7cbf770","line":9,"updated":"2016-03-08 05:14:46.000000000","message":"No, I haven\u0027t filed anything yet on the oslo messaging side. I don\u0027t want to make the request until I\u0027m sure we are willing to actually use something like this.","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"187136869793a80005bf11efe1e3ce7b6f0c45f3","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add exponential back-off to RPC calls"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds an exponential backoff mechanism for timeout values"},{"line_number":10,"context_line":"on any RPC calls in Neutron that don\u0027t explicitly request a timeout"},{"line_number":11,"context_line":"value. This will prevent the clients from DDoSing the server by"},{"line_number":12,"context_line":"giving up on requests and retrying them before they are fulfilled."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_74cfa5b0","line":9,"updated":"2016-03-07 21:23:13.000000000","message":"The implementation makes a lot of assumptions on Oslo messaging internals, but the assumptions aren\u0027t *too* crazy or invasive. I understand the rationale for doing this in Neutron now (For Mitaka and previous versions), and adding it to Oslo messaging later (For Newton onward), but we definitely want to follow up here. Did you report a bug / feature request on Oslo messaging?","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"12a2207a47f1500b7a77ce528a685e912f6a3e8b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"that timeouts not legitimately caused by heavy system load"},{"line_number":20,"context_line":"(i.e. messages completely dropped by AMQP) are rare enough that the"},{"line_number":21,"context_line":"cost of shrinking the timeout back down and potentially causing"},{"line_number":22,"context_line":"another server timeout isn\u0027t worth it. The timeout does have a cieling"},{"line_number":23,"context_line":"of the configured default timeout value * 10."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Whenever a timeout exception occurs, the client will also sleep for a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5aef4532_5d527c14","line":22,"updated":"2016-03-08 06:08:48.000000000","message":"Done","commit_id":"117e3b738bea464a17aec4eae6cc30b8873f8569"},{"author":{"_account_id":12999,"name":"James Arendt","email":"james.arendt@hpe.com","username":"jwarendt"},"change_message_id":"a858fdbe3621b05b26c4fc9851ab2789cd75d07f","unresolved":false,"context_lines":[{"line_number":19,"context_line":"that timeouts not legitimately caused by heavy system load"},{"line_number":20,"context_line":"(i.e. messages completely dropped by AMQP) are rare enough that the"},{"line_number":21,"context_line":"cost of shrinking the timeout back down and potentially causing"},{"line_number":22,"context_line":"another server timeout isn\u0027t worth it. The timeout does have a cieling"},{"line_number":23,"context_line":"of the configured default timeout value * 10."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Whenever a timeout exception occurs, the client will also sleep for a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5aef4532_e23765e1","line":22,"updated":"2016-03-08 05:41:17.000000000","message":"Nit: ceiling","commit_id":"117e3b738bea464a17aec4eae6cc30b8873f8569"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"12a2207a47f1500b7a77ce528a685e912f6a3e8b","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Whenever a timeout exception occurs, the client will also sleep for a"},{"line_number":26,"context_line":"random value between 0 and the configured default timeout value to"},{"line_number":27,"context_line":"intoduce a splay across all of the agents that may be trying to"},{"line_number":28,"context_line":"communicate with the server."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This patch is intended to be uninvasive for candidacy to be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5aef4532_bd574001","line":27,"updated":"2016-03-08 06:08:48.000000000","message":"Done","commit_id":"117e3b738bea464a17aec4eae6cc30b8873f8569"},{"author":{"_account_id":12999,"name":"James Arendt","email":"james.arendt@hpe.com","username":"jwarendt"},"change_message_id":"a858fdbe3621b05b26c4fc9851ab2789cd75d07f","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Whenever a timeout exception occurs, the client will also sleep for a"},{"line_number":26,"context_line":"random value between 0 and the configured default timeout value to"},{"line_number":27,"context_line":"intoduce a splay across all of the agents that may be trying to"},{"line_number":28,"context_line":"communicate with the server."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This patch is intended to be uninvasive for candidacy to be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5aef4532_62523515","line":27,"updated":"2016-03-08 05:41:17.000000000","message":"Nit: introduce","commit_id":"117e3b738bea464a17aec4eae6cc30b8873f8569"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b4ac9acd893f689ec6bf00fa575c14c87e8a7a22","unresolved":false,"context_lines":[{"line_number":12,"context_line":"giving up on requests and retrying them before they are fulfilled."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This is currently only available to agents that specifically request"},{"line_number":15,"context_line":"this type of client via the get_backoff_client function in"},{"line_number":16,"context_line":"neutron.common.rpc. Once Newton opens it will become the default"},{"line_number":17,"context_line":"and assuming it doesn\u0027t show any major bugs it will be back-ported"},{"line_number":18,"context_line":"to replace Mitaka and possibly Liberty as well."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa0719c6_c15a1f83","line":15,"range":{"start_line":15,"start_character":28,"end_line":15,"end_character":46},"updated":"2016-03-21 22:11:48.000000000","message":"None of them do.  Where will this be done?","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b4ac9acd893f689ec6bf00fa575c14c87e8a7a22","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This is currently only available to agents that specifically request"},{"line_number":15,"context_line":"this type of client via the get_backoff_client function in"},{"line_number":16,"context_line":"neutron.common.rpc. Once Newton opens it will become the default"},{"line_number":17,"context_line":"and assuming it doesn\u0027t show any major bugs it will be back-ported"},{"line_number":18,"context_line":"to replace Mitaka and possibly Liberty as well."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa0719c6_e1ff6332","line":16,"range":{"start_line":16,"start_character":38,"end_line":16,"end_character":64},"updated":"2016-03-21 22:11:48.000000000","message":"Should we just go ahead and do this now for Newton since master is now Newton?","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c7eff935a51f5fd6ac9f20deeccdaa07993bdf57","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This is currently only available to agents that specifically request"},{"line_number":15,"context_line":"this type of client via the get_backoff_client function in"},{"line_number":16,"context_line":"neutron.common.rpc. Once Newton opens it will become the default"},{"line_number":17,"context_line":"and assuming it doesn\u0027t show any major bugs it will be back-ported"},{"line_number":18,"context_line":"to replace Mitaka and possibly Liberty as well."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5a18252c_6fc1ad2e","line":16,"range":{"start_line":16,"start_character":38,"end_line":16,"end_character":64},"in_reply_to":"fa0719c6_e1ff6332","updated":"2016-04-12 01:34:23.000000000","message":"Yep","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"0b334576cf9920f05447503882b02af5acfc3b8c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"back-ported. A larger refactor of delivering data to the agents"},{"line_number":32,"context_line":"is being discussed in I3af200ad84483e6e1fe619d516ff20bc87041f7c."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Closes-Bug: #1554332"},{"line_number":35,"context_line":"Change-Id: I923e415c1b8e9a431be89221c78c14f39c42c80f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a122d0e_89565204","line":34,"updated":"2016-05-04 17:58:44.000000000","message":"Did we get to a resolution regarding [1]. What\u0027s the long term plan here? \n\n[1] http://lists.openstack.org/pipermail/openstack-dev/2016-April/092914.html","commit_id":"2fbd29fc261cca7b0f3a7955f75e786045fe7a9c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3c77e7fe11cbda2bcbef6ddf848c6ad1c0cd9a28","unresolved":false,"context_lines":[{"line_number":31,"context_line":"back-ported. A larger refactor of delivering data to the agents"},{"line_number":32,"context_line":"is being discussed in I3af200ad84483e6e1fe619d516ff20bc87041f7c."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Closes-Bug: #1554332"},{"line_number":35,"context_line":"Change-Id: I923e415c1b8e9a431be89221c78c14f39c42c80f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a122d0e_342e578c","line":34,"updated":"2016-05-05 09:50:46.000000000","message":"Merge this. Back-port it when it looks stable.\n\nIncorporate whatever boden does in olso messaging here when it\u0027s done.","commit_id":"2fbd29fc261cca7b0f3a7955f75e786045fe7a9c"}],"neutron/common/rpc.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e0ca9f34262723d3883d4f94b4fa277dcc3fad2e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"import collections"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from debtcollector import removals"},{"line_number":19,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_70e0becd","line":16,"updated":"2016-03-01 01:46:51.000000000","message":"missing space","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"f9892fcd165c382a5824ae91ed7c22616ed8fb8b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"import collections"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from debtcollector import removals"},{"line_number":19,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_d06b8a1c","line":16,"in_reply_to":"9aed3d3a_702efefb","updated":"2016-03-01 01:51:08.000000000","message":"Done","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b91cee35cf389f3f97bb23de5caa8a6fc432be59","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"import collections"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from debtcollector import removals"},{"line_number":19,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_702efefb","line":16,"in_reply_to":"9aed3d3a_70e0becd","updated":"2016-03-01 01:49:01.000000000","message":"Kevin is sitting next to me, I love pissing him off.","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2eea5f77875813e8a87021c8b84b7c4ea094e88a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"import collections"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from debtcollector import removals"},{"line_number":19,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_db70cb74","line":16,"in_reply_to":"9aed3d3a_d06b8a1c","updated":"2016-03-01 02:06:44.000000000","message":"Done","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"187136869793a80005bf11efe1e3ce7b6f0c45f3","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"def cleanup():"},{"line_number":79,"context_line":"    global TRANSPORT, NOTIFICATION_TRANSPORT, NOTIFIER, _METHOD_TIMEOUTS"},{"line_number":80,"context_line":"    assert TRANSPORT is not None"},{"line_number":81,"context_line":"    assert NOTIFICATION_TRANSPORT is not None"},{"line_number":82,"context_line":"    assert NOTIFIER is not None"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_19913a9a","line":79,"updated":"2016-03-07 21:23:13.000000000","message":"From a readability point of view, I think that since METHOD_TIMEOUTS is used exclusively by _ContextWrapper, it should be scoped to that class (Via a class member). i.e. line 135 becomes _ContextWrapper.timeouts[scoped_method] \u003d 42","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"41fcd932eb5b8039d36103aa64ca563f33ceeeab","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"def cleanup():"},{"line_number":79,"context_line":"    global TRANSPORT, NOTIFICATION_TRANSPORT, NOTIFIER, _METHOD_TIMEOUTS"},{"line_number":80,"context_line":"    assert TRANSPORT is not None"},{"line_number":81,"context_line":"    assert NOTIFICATION_TRANSPORT is not None"},{"line_number":82,"context_line":"    assert NOTIFIER is not None"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_47c90b78","line":79,"updated":"2016-03-08 05:14:46.000000000","message":"That works for me","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"41fcd932eb5b8039d36103aa64ca563f33ceeeab","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    return ALLOWED_EXMODS + EXTRA_EXMODS"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"class _ContextWrapper(object):"},{"line_number":101,"context_line":"    \"\"\"Wraps oslo messaging contexts to set the timeout for calls."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    This intercepts RPC calls and sets the timeout value to the globally"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_27c67f67","line":100,"updated":"2016-03-08 05:14:46.000000000","message":"+1. that was my motivation","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"187136869793a80005bf11efe1e3ce7b6f0c45f3","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    return ALLOWED_EXMODS + EXTRA_EXMODS"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"class _ContextWrapper(object):"},{"line_number":101,"context_line":"    \"\"\"Wraps oslo messaging contexts to set the timeout for calls."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    This intercepts RPC calls and sets the timeout value to the globally"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_b992c655","line":100,"updated":"2016-03-07 21:23:13.000000000","message":"I think you\u0027re right in implementing _ContextWrapper that accepts _CallContext, and does not inherit from it. Otherwise you\u0027d have to modify RPCClient.prepare to return Neutron\u0027s version of CallContext, and who knows what future changes may be made to RPCClient.prepare.","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"187136869793a80005bf11efe1e3ce7b6f0c45f3","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def call(self, ctxt, method, **kwargs):"},{"line_number":117,"context_line":"        # two methods with the same name in different namespaces should"},{"line_number":118,"context_line":"        # be tracked independently"},{"line_number":119,"context_line":"        if self._original_context.target.namespace:"},{"line_number":120,"context_line":"            scoped_method \u003d \u0027%s.%s\u0027 % (self._original_context.target.namespace,"},{"line_number":121,"context_line":"                                       method)"},{"line_number":122,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_deb0588e","line":119,"updated":"2016-03-07 21:23:13.000000000","message":".target.namespace is not part of Oslo messaging\u0027s API.","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"41fcd932eb5b8039d36103aa64ca563f33ceeeab","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def call(self, ctxt, method, **kwargs):"},{"line_number":117,"context_line":"        # two methods with the same name in different namespaces should"},{"line_number":118,"context_line":"        # be tracked independently"},{"line_number":119,"context_line":"        if self._original_context.target.namespace:"},{"line_number":120,"context_line":"            scoped_method \u003d \u0027%s.%s\u0027 % (self._original_context.target.namespace,"},{"line_number":121,"context_line":"                                       method)"},{"line_number":122,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_87a153ac","line":119,"updated":"2016-03-08 05:14:46.000000000","message":"True that they aren\u0027t documented, but they are attributes of an object that oslo messaging returns that don\u0027t start with an underscore.","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"187136869793a80005bf11efe1e3ce7b6f0c45f3","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            scoped_method \u003d method"},{"line_number":124,"context_line":"        # set the timeout from the global method timeout tracker for this"},{"line_number":125,"context_line":"        # method"},{"line_number":126,"context_line":"        self._original_context.timeout \u003d _METHOD_TIMEOUTS[scoped_method]"},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            return self._original_context.call(ctxt, method, **kwargs)"},{"line_number":129,"context_line":"        except oslo_messaging.MessagingTimeout:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_9e6d3007","line":126,"updated":"2016-03-07 21:23:13.000000000","message":"Technically neither is the timeout attribute.","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"41fcd932eb5b8039d36103aa64ca563f33ceeeab","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            scoped_method \u003d method"},{"line_number":124,"context_line":"        # set the timeout from the global method timeout tracker for this"},{"line_number":125,"context_line":"        # method"},{"line_number":126,"context_line":"        self._original_context.timeout \u003d _METHOD_TIMEOUTS[scoped_method]"},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            return self._original_context.call(ctxt, method, **kwargs)"},{"line_number":129,"context_line":"        except oslo_messaging.MessagingTimeout:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_67a6c7c2","line":126,"updated":"2016-03-08 05:14:46.000000000","message":"ditto","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"75304d8dfd21f9a937b9b0729355dfdb14b3ea4f","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":139,"context_line":"                wait \u003d random.uniform(0, TRANSPORT.conf.rpc_response_timeout)"},{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"approximately %(wait)s seconds before next \""},{"line_number":142,"context_line":"                              \"attempt.\"),"},{"line_number":143,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":144,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_718f85cc","line":141,"updated":"2016-03-08 18:07:40.000000000","message":"Done","commit_id":"c65b8b976d42a8fe8f8efa979a6078079d19f23a"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"6d70b976d1005ef7a477f3a1ae6189c8b2c7621b","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":139,"context_line":"                wait \u003d random.uniform(0, TRANSPORT.conf.rpc_response_timeout)"},{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"approximately %(wait)s seconds before next \""},{"line_number":142,"context_line":"                              \"attempt.\"),"},{"line_number":143,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":144,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_7e47681d","line":141,"updated":"2016-03-08 10:13:31.000000000","message":"Just using %(wait)f and dropping \"approximately\" gives shorter log. ;)","commit_id":"c65b8b976d42a8fe8f8efa979a6078079d19f23a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"75304d8dfd21f9a937b9b0729355dfdb14b3ea4f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                              \"attempt.\"),"},{"line_number":143,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":144,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":145,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":146,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":147,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""},{"line_number":148,"context_line":"                                  \"to %(new)s seconds.\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_d1bc996e","line":145,"updated":"2016-03-08 18:07:40.000000000","message":"No, if you see in my commit message I argue that the cost of triggering a timeout due to high load isn\u0027t worth the limited benefit reducing the timeout brings. If we have a normal automatic reduction strategy and the server requires a higher timeout than the base number, we will trigger timeouts every time we try to reduce the value too far.\n\nSomeone in the future could possibly do some follow-up work to have it adapt based on known response times, but I want to be pretty conservative.","commit_id":"c65b8b976d42a8fe8f8efa979a6078079d19f23a"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"6d70b976d1005ef7a477f3a1ae6189c8b2c7621b","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                              \"attempt.\"),"},{"line_number":143,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":144,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":145,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":146,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":147,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""},{"line_number":148,"context_line":"                                  \"to %(new)s seconds.\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_9efa34bc","line":145,"updated":"2016-03-08 10:13:31.000000000","message":"We have no chance to shorten timeout value after a load spike?","commit_id":"c65b8b976d42a8fe8f8efa979a6078079d19f23a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"75304d8dfd21f9a937b9b0729355dfdb14b3ea4f","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"},{"line_number":155,"context_line":"    \"\"\"An olso messaging RPC Client that implements a timeout backoff."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    This has all of the same interfaces as oslo_messaging.RPCClient but"},{"line_number":158,"context_line":"    if the timeout parameter is not specified, the _ContextWrapper returned"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_b1bf4d5f","line":155,"updated":"2016-03-08 18:07:40.000000000","message":"Done","commit_id":"c65b8b976d42a8fe8f8efa979a6078079d19f23a"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"6d70b976d1005ef7a477f3a1ae6189c8b2c7621b","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"},{"line_number":155,"context_line":"    \"\"\"An olso messaging RPC Client that implements a timeout backoff."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    This has all of the same interfaces as oslo_messaging.RPCClient but"},{"line_number":158,"context_line":"    if the timeout parameter is not specified, the _ContextWrapper returned"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_5e59ccfd","line":155,"updated":"2016-03-08 10:13:31.000000000","message":"s/olso/oslo/","commit_id":"c65b8b976d42a8fe8f8efa979a6078079d19f23a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b7ed12db2b18ee61d165727456bc8234ceebcbc0","unresolved":false,"context_lines":[{"line_number":167,"context_line":"def get_client(target, version_cap\u003dNone, serializer\u003dNone):"},{"line_number":168,"context_line":"    assert TRANSPORT is not None"},{"line_number":169,"context_line":"    serializer \u003d RequestContextSerializer(serializer)"},{"line_number":170,"context_line":"    return BackingOffClient(TRANSPORT,"},{"line_number":171,"context_line":"                            target,"},{"line_number":172,"context_line":"                            version_cap\u003dversion_cap,"},{"line_number":173,"context_line":"                            serializer\u003dserializer)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_1d78332b","line":170,"updated":"2016-03-11 04:11:51.000000000","message":"can we split this as we agreed, please?","commit_id":"3636b02a90ac8582a5c3dde19b44a67bf013334d"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"43dfaba650ffb5e5eb52fe2caa6bf124a44c9d35","unresolved":false,"context_lines":[{"line_number":167,"context_line":"def get_client(target, version_cap\u003dNone, serializer\u003dNone):"},{"line_number":168,"context_line":"    assert TRANSPORT is not None"},{"line_number":169,"context_line":"    serializer \u003d RequestContextSerializer(serializer)"},{"line_number":170,"context_line":"    return BackingOffClient(TRANSPORT,"},{"line_number":171,"context_line":"                            target,"},{"line_number":172,"context_line":"                            version_cap\u003dversion_cap,"},{"line_number":173,"context_line":"                            serializer\u003dserializer)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_fcf620f8","line":170,"in_reply_to":"5aef4532_1d78332b","updated":"2016-03-11 10:22:44.000000000","message":"What split? :) sorry, I didn\u0027t see that conversation, just curious.","commit_id":"3636b02a90ac8582a5c3dde19b44a67bf013334d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a0b766b6d477370a197e8408597c20837aad058b","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            return self._original_context.call(ctxt, method, **kwargs)"},{"line_number":137,"context_line":"        except oslo_messaging.MessagingTimeout:"},{"line_number":138,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":139,"context_line":"                wait \u003d random.uniform(0, TRANSPORT.conf.rpc_response_timeout)"},{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_c3aea884","line":139,"updated":"2016-03-14 06:46:42.000000000","message":"No action required: we overload the meaning of rpc_responce_timeout here a bit. Maybe would be better to have a separate knob for the wait.\nBut meh.","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"bd7f77e79bff2f6bab4978b42804176c04cbf739","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_08a26fae","line":143,"updated":"2016-03-14 05:51:43.000000000","message":"Having larger timeout than other clients\u0027 means it can consume more CPU on server per RPC call.\nIf fairness between clients is really an issue, larger timeouts should be associated with forced sleep per RPC call.","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a0b766b6d477370a197e8408597c20837aad058b","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_83f94083","line":143,"range":{"start_line":143,"start_character":26,"end_line":143,"end_character":61},"updated":"2016-03-14 06:46:42.000000000","message":"Note to reviewers: it\u0027s generally not ok to access oslo library options directly, but it seems oslo.messaging even documents those as API for projects. So we are good here.","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1dedb6fadca5f125cc365ac7fb2ca078db5ec73b","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_8905ba7b","line":143,"updated":"2016-03-14 18:41:48.000000000","message":"Setting a higher timeout helps, but it doesn\u0027t help operators detect when they are reaching a server limit until its too late. A higher timeout also does not have any kind of sleep to back-off when the load is too high.","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e59026156352c770bc8e4fd78767c08814854adf","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_4310d801","line":143,"in_reply_to":"3afc51ec_08a26fae","updated":"2016-03-14 06:55:55.000000000","message":"Toshihiro,\n\nhow does a timeout value affect per-call consumption?\na timeout doesn\u0027t cancel the server-side processing, does it?","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"bf6ffad74f0f2665d7052f9bf59fa54d3d14b7e9","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_4321f89e","line":143,"in_reply_to":"3afc51ec_08a26fae","updated":"2016-03-14 06:18:08.000000000","message":"You mean like L150?","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"a49978a42915f18c3241a019ada6116e5e5fcd66","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_e32f643c","line":143,"in_reply_to":"3afc51ec_4321f89e","updated":"2016-03-14 06:44:32.000000000","message":"No, L150 fires only once per RPC timeout.\n\nI meant:\n\n    def call(...):\n...\n        if self._original_context.timeout \u003e TRANSPORT.conf.rpc_response_timeout:\n            eventlet.sleep(...)\n        return self._orignal_context.call(...)\n\nIn this way, the code would be much more complicated as we\u0027ll also want to monitor RPC response times and gradually decrease timeout when appropriate.\nI\u0027m not sure \"punishing\" agents with large timeouts is good, though.","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"5bf27b00b7f5859f525fbf7ce0e15442c3342e13","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_3e715ee1","line":143,"in_reply_to":"3afc51ec_4345786e","updated":"2016-03-14 09:01:59.000000000","message":"Hi Yamamoto-san, I simply assumed server RPC code would abort on client timeout, but without any ground ;)\n\nHi Kevin, then I wonder if just having larger timeouts from the beginning can be a simpler solution.","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ad73286c528fc94490e61e4029c70ff943a43b9d","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_4345786e","line":143,"in_reply_to":"3afc51ec_e32f643c","updated":"2016-03-14 07:24:26.000000000","message":"No, high timeouts don\u0027t mean sleeps are necessary. It just means the server is slow. Sleeps should only be necessary if the situation keeps degrading.","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a0b766b6d477370a197e8408597c20837aad058b","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def prepare(self, *args, **kwargs):"},{"line_number":162,"context_line":"        ctx \u003d super(BackingOffClient, self).prepare(*args, **kwargs)"},{"line_number":163,"context_line":"        # don\u0027t enclose Contexts that explicitly set a timeout"},{"line_number":164,"context_line":"        return _ContextWrapper(ctx) if \u0027timeout\u0027 not in kwargs else ctx"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def get_backoff_client(target, version_cap\u003dNone, serializer\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_23866c13","line":164,"updated":"2016-03-14 06:46:42.000000000","message":"No action required: well... in theory timeout could also be passed as positional. :)","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"49ffb2222edb8984b658131026445ec18c118189","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            return self._original_context.call(ctxt, method, **kwargs)"},{"line_number":137,"context_line":"        except oslo_messaging.MessagingTimeout:"},{"line_number":138,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":139,"context_line":"                wait \u003d random.uniform(0, TRANSPORT.conf.rpc_response_timeout)"},{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"}],"source_content_type":"text/x-python","patch_set":7,"id":"1af94dfe_78969895","line":139,"updated":"2016-03-15 14:42:36.000000000","message":"why not making this random wait also exponential by using self._METHOD_TIMEOUTS[scoped_method] ?","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b4ac9acd893f689ec6bf00fa575c14c87e8a7a22","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            return self._original_context.call(ctxt, method, **kwargs)"},{"line_number":137,"context_line":"        except oslo_messaging.MessagingTimeout:"},{"line_number":138,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":139,"context_line":"                wait \u003d random.uniform(0, TRANSPORT.conf.rpc_response_timeout)"},{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_a1872b0e","line":139,"in_reply_to":"1af94dfe_78969895","updated":"2016-03-21 22:11:48.000000000","message":"@ajo I don\u0027t think that really makes sense given the stated intent for this wait.  It is intended to \"introduce a splay across all of the agents that may be trying to communicate with the server.\"  I don\u0027t think increasing that exponentially will make much of a difference.","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"73a98259c11fad652e3cb1a8a3090a51294a55d1","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":7,"id":"1af94dfe_af31655c","line":143,"updated":"2016-03-17 20:08:12.000000000","message":"This ceiling is also mentioned in your commit message; does it warrant doc changes??","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b4ac9acd893f689ec6bf00fa575c14c87e8a7a22","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_016ed72e","line":143,"in_reply_to":"1af94dfe_af31655c","updated":"2016-03-21 22:11:48.000000000","message":"What doc would you suggest changing?","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"4c5ea853166da4d4cfa66a494fbe743e2ee52b51","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":141,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":142,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba0121b8_8af5d4cc","line":143,"in_reply_to":"fa0719c6_016ed72e","updated":"2016-03-29 19:52:32.000000000","message":"Good point. I was thinking rpc_response_timeout was part of neutrons conf props, but it\u0027s from oslo.messaging. My thought is just that admins may be interested in this value/setting.\n\nIf it makes sense, maybe under the networking admin guide [1]; perhaps under the \"Advanced configuration options\"?\n\n[1] http://docs.openstack.org/admin-guide-cloud/networking.html","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"73a98259c11fad652e3cb1a8a3090a51294a55d1","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""},{"line_number":147,"context_line":"                                  \"to %(new)s seconds.\"),"},{"line_number":148,"context_line":"                              {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":149,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"}],"source_content_type":"text/x-python","patch_set":7,"id":"1af94dfe_ef008d68","line":146,"updated":"2016-03-17 20:08:12.000000000","message":"Do you think it\u0027s called for to log error on this one? While I agree the previous LOG.error() seems well placed, I would\u0027ve expected this message to be debug or warn, but perhaps I\u0027m missing something.","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b4ac9acd893f689ec6bf00fa575c14c87e8a7a22","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""},{"line_number":147,"context_line":"                                  \"to %(new)s seconds.\"),"},{"line_number":148,"context_line":"                              {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":149,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_aea43a57","line":146,"in_reply_to":"1af94dfe_ef008d68","updated":"2016-03-21 22:11:48.000000000","message":"+1","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c7eff935a51f5fd6ac9f20deeccdaa07993bdf57","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":144,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":145,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":146,"context_line":"                    LOG.error(_LE(\"Increasing timeout for %(method)s calls \""},{"line_number":147,"context_line":"                                  \"to %(new)s seconds.\"),"},{"line_number":148,"context_line":"                              {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":149,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a18252c_af30e59f","line":146,"in_reply_to":"1af94dfe_ef008d68","updated":"2016-04-12 01:34:23.000000000","message":"Yeah, warning sounds good.","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b4ac9acd893f689ec6bf00fa575c14c87e8a7a22","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def get_backoff_client(target, version_cap\u003dNone, serializer\u003dNone):"},{"line_number":168,"context_line":"    assert TRANSPORT is not None"},{"line_number":169,"context_line":"    serializer \u003d RequestContextSerializer(serializer)"},{"line_number":170,"context_line":"    return BackingOffClient(TRANSPORT,"},{"line_number":171,"context_line":"                            target,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_0eb1e68f","line":168,"range":{"start_line":168,"start_character":4,"end_line":168,"end_character":10},"updated":"2016-03-21 22:11:48.000000000","message":"nit:  I really don\u0027t like asserts.  The behavior is implicitly tied to the __debug__ variable and I just don\u0027t think it is worth it.  I\u0027d prefer a straight up raise exception.  But, okay.","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c7eff935a51f5fd6ac9f20deeccdaa07993bdf57","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def get_backoff_client(target, version_cap\u003dNone, serializer\u003dNone):"},{"line_number":168,"context_line":"    assert TRANSPORT is not None"},{"line_number":169,"context_line":"    serializer \u003d RequestContextSerializer(serializer)"},{"line_number":170,"context_line":"    return BackingOffClient(TRANSPORT,"},{"line_number":171,"context_line":"                            target,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a18252c_4f72f17d","line":168,"range":{"start_line":168,"start_character":4,"end_line":168,"end_character":10},"in_reply_to":"fa0719c6_0eb1e68f","updated":"2016-04-12 01:34:23.000000000","message":"This is just following the pattern established for get_client down below. I thought it was better to keep them consistent.","commit_id":"33221428bafc18f42c04f7f28bcd91010a0ee86e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"69b978dbd5cdf3932b9370b0aaae838a00703693","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    def __getattr__(self, name):"},{"line_number":121,"context_line":"        return getattr(self._original_context, name)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def call(self, ctxt, method, **kwargs):"},{"line_number":124,"context_line":"        # two methods with the same name in different namespaces should"},{"line_number":125,"context_line":"        # be tracked independently"},{"line_number":126,"context_line":"        if self._original_context.target.namespace:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a18252c_2ee3ed06","line":123,"updated":"2016-04-13 09:57:08.000000000","message":"This approach isn\u0027t meant to bake in any automatic retry logic. This is just to force the clients to slow down. The agents already have mechanisms to decide how to retry on failures so we don\u0027t want to interfere with that in this patch.","commit_id":"14d1c78bd11a1090e96d94d18f6b2c711458137a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"de58d8ec726e342f29b60bd6be562d98669d8bd2","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    def __getattr__(self, name):"},{"line_number":121,"context_line":"        return getattr(self._original_context, name)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def call(self, ctxt, method, **kwargs):"},{"line_number":124,"context_line":"        # two methods with the same name in different namespaces should"},{"line_number":125,"context_line":"        # be tracked independently"},{"line_number":126,"context_line":"        if self._original_context.target.namespace:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a18252c_58cbcb72","line":123,"updated":"2016-04-12 10:59:00.000000000","message":"maybe i am missing something here. should there no be a decorator above this that catches the oslo_messaging.MessagingTimeout and then does the retry?","commit_id":"14d1c78bd11a1090e96d94d18f6b2c711458137a"},{"author":{"_account_id":13717,"name":"Inessa Vasilevskaya","email":"ivasilevskaya@mirantis.com","username":"ivasilevskaya"},"change_message_id":"45684cf64378fa2a2bed21a5b84a389d44f04af8","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    def __getattr__(self, name):"},{"line_number":121,"context_line":"        return getattr(self._original_context, name)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def call(self, ctxt, method, **kwargs):"},{"line_number":124,"context_line":"        # two methods with the same name in different namespaces should"},{"line_number":125,"context_line":"        # be tracked independently"},{"line_number":126,"context_line":"        if self._original_context.target.namespace:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a18252c_d58f6fca","line":123,"in_reply_to":"5a18252c_58cbcb72","updated":"2016-04-13 09:08:30.000000000","message":"garyk, as far as I understand this patch does not introduce the retry logic, just proper timeout settings, and retry functionality will be added in a different patch.","commit_id":"14d1c78bd11a1090e96d94d18f6b2c711458137a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"69b978dbd5cdf3932b9370b0aaae838a00703693","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":147,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":148,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":149,"context_line":"                time.sleep(wait)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a18252c_8ef201d1","line":149,"updated":"2016-04-13 09:57:08.000000000","message":"It\u0027s up to the caller when and how to retry. This is just to force in a delay before letting it continue to splay clients of the same type.","commit_id":"14d1c78bd11a1090e96d94d18f6b2c711458137a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"de58d8ec726e342f29b60bd6be562d98669d8bd2","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":147,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":148,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":149,"context_line":"                time.sleep(wait)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a18252c_5892ab58","line":149,"updated":"2016-04-12 10:59:00.000000000","message":"ok, so we are sleeping, but when is a retry taken?","commit_id":"14d1c78bd11a1090e96d94d18f6b2c711458137a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ff16e353767d9bf30713850070c192cb5f3a0b57","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":147,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":148,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":149,"context_line":"                time.sleep(wait)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_961b33ca","line":149,"updated":"2016-04-23 09:34:02.000000000","message":"Even if we have the smaller timeouts starting out, that won\u0027t help the case where the agent ends up sleeping for a long time if the server is down for a long time (e.g. 10 minutes). We currently can\u0027t tell the difference between the server being down vs being overloaded, so we have to be safe an assume the overloaded case for now and sleep for an appropriate amount of time under that assumption.","commit_id":"5d4234424de588ef383ada62911675a5d98b0fb0"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"d9d109fc8ab6dfac87618a25a3b54091d96aefa2","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        self._original_context.timeout \u003d self._METHOD_TIMEOUTS[scoped_method]"},{"line_number":134,"context_line":"        try:"},{"line_number":135,"context_line":"            return self._original_context.call(ctxt, method, **kwargs)"},{"line_number":136,"context_line":"        except oslo_messaging.MessagingTimeout:"},{"line_number":137,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":138,"context_line":"                wait \u003d random.uniform(0, TRANSPORT.conf.rpc_response_timeout)"},{"line_number":139,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":140,"context_line":"                              \"%(wait)s seconds before next attempt.\"),"},{"line_number":141,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":142,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":143,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":144,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":145,"context_line":"                    LOG.warning(_LW(\"Increasing timeout for %(method)s calls \""},{"line_number":146,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":147,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":148,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":149,"context_line":"                time.sleep(wait)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_4ee525da","line":149,"range":{"start_line":136,"start_character":0,"end_line":149,"end_character":32},"updated":"2016-04-20 09:23:30.000000000","message":"I may sound like a complete idiot... :-) but still...\nhow about this mod???\n\nexcept oslo_messaging.MessagingTimeout:\n    with excutils.save_and_reraise_exception():\n\twait \u003d random.uniform(0, TRANSPORT.conf.rpc_response_timeout)\n\tceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10\n\tnew_timeout \u003d min(self._original_context.timeout * 2, ceiling)\n        LOG.warning(_LW(\"Modified timeout for %(method)s call \"\n        \t        \"to %(new)s seconds.\"),\n\t\t    {\u0027method\u0027: scoped_method, \u0027new\u0027: (new_timeout - wait)})\n\tself._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout - wait\n\nNo need to call import time and call sleep(), but still achieve spread!","commit_id":"5d4234424de588ef383ada62911675a5d98b0fb0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1d4ba09a632cf5a39684ba5b908224c533025fd4","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":147,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":148,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":149,"context_line":"                time.sleep(wait)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_a11f74b5","line":149,"updated":"2016-04-21 06:34:29.000000000","message":"If we don\u0027t sleep, we don\u0027t wait, which is the backoff portion that is important if the server is heavily loaded. Randomly changing the timeouts would only affect how long each agent will wait until it gives up. It wouldn\u0027t leave any time in between for the server to clear the AMQP backlog.","commit_id":"5d4234424de588ef383ada62911675a5d98b0fb0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ff4a62ae4411d9a27557b43bbaf8200df990099b","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":147,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":148,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":149,"context_line":"                time.sleep(wait)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_5ab7ded7","line":149,"updated":"2016-04-19 08:47:17.000000000","message":"do we need to consider using eventlet.sleep?","commit_id":"5d4234424de588ef383ada62911675a5d98b0fb0"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5cfc7dc5144cb78d575b2b1c7762c247d61c72ef","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":147,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":148,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":149,"context_line":"                time.sleep(wait)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_c07b5328","line":149,"in_reply_to":"1a122d0e_398c2cd9","updated":"2016-04-22 06:11:33.000000000","message":"For the server down case, lets say the agents have timed out for a few cycles. Now when the admin manages to get the server back up after maintenance, the agents might end up being sleeping for minutes, before retrying and waiting on a large timeout! If it\u0027s waiting on RPC, there will be no issues and the agent will see the server back up immediately when he sees an RPC response, and will start up quickly. But if it\u0027s on a big sleep, there will be nothing happening while being on sleep for minutes before retrying. Hope I am clear!\n\nIn my mod, even though I took the value of \u0027TRANSPORT.conf.rpc_response_timeout\u0027 which is a minute!!! That\u0027s too big sleep IMHO! If you are halving that, it makes for a good value. That too I honestly think if it moves up in fixed steps rather than a flat random seed space, it makes for a more smoother and slow yet random back off.\nLike a random sleep() between 0-30, 30-60, 60-90, 90-120 for each retry...\nThis way we may not end up in that big sleep!\n\nThese are just my thoughts, not arguing about the case. If you think it\u0027s additional unnecessary complexity with not much yield, it\u0027s OK. But my opinion is that it will make a good impact and will cater well to both server busy and server down cases.","commit_id":"5d4234424de588ef383ada62911675a5d98b0fb0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"2a40a145d8c96073538c29fb1a636f5857b82193","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":147,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":148,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":149,"context_line":"                time.sleep(wait)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_4c5ba3f6","line":149,"in_reply_to":"1a122d0e_5ab7ded7","updated":"2016-04-19 12:10:44.000000000","message":"We call eventlet.monkey_patch which swaps out time.sleep with eventlet.sleep.","commit_id":"5d4234424de588ef383ada62911675a5d98b0fb0"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"2b210aeabe1beb7022d1c36c85f8e84bca8de13a","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":147,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":148,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":149,"context_line":"                time.sleep(wait)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_edde763c","line":149,"in_reply_to":"1a122d0e_a11f74b5","updated":"2016-04-21 10:45:16.000000000","message":"OK, now I understand your point, I got carried away by \nwait \u003d random.uniform(0, TRANSPORT.conf.rpc_response_timeout)\n\nWith a timeout, the RPC call got scheduled on the server. Now it got into the queue, but the server is really busy operating on other calls. So the RPC client got timed out, but still the call is on the server\u0027s queue. Now when the message ultimately gets processed by the server, it will know that the message is expired, and so may drop the message (assuming that\u0027s the way it works!).\nWith this delay/sleep() you are reducing the chances of another message being retired on the server before the original one gets dropped, or allowing for a reduction in queue backlog.\n\nIf assuming my understanding as mentioned above, is accurate...\nWouldn\u0027t it be appropriate to have an increasing back-off albeit slowly? So that as we (client), get to know the condition, we retry more slowly yet randomly? More slowly because we got timed out, and now we give more life for the RPC message on the server, and go back to the server slowly than before. Randomly because we want the splay/spread between clients.\nOtherwise, we may go back at reduced interval than before!\n\nPlease see if my understanding is correct, and the mod I am trying to put forth is worthwhile!\n\n\n+    _METHOD_TIMEOUTS \u003d collections.defaultdict(\n+        lambda: [TRANSPORT.conf.rpc_response_timeout,  0])\n\n+        try:\n+            return self._original_context.call(ctxt, method, **kwargs)\n+        except oslo_messaging.MessagingTimeout:\n+            with excutils.save_and_reraise_exception():\n+                backoff_factor \u003d self._METHOD_TIMEOUTS[scoped_method][1]\n+                wait \u003d random.uniform((TRANSPORT.conf.rpc_response_timeout *\n+                                       backoff_factor),\n+                                      (TRANSPORT.conf.rpc_response_timeout *\n+                                       (backoff_factor + 1)))\n+                backoff_factor \u003d min(backoff_factor, 5)\n+                self._METHOD_TIMEOUTS[scoped_method][1] \u003d backoff_factor + 1\n+                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \"\n+                              \"%(wait)s seconds before next attempt.\"),\n+                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})\n+                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10\n+                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)\n+                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method][0]:\n+                    LOG.warning(_LW(\"Increasing timeout for %(method)s calls \"\n+                                    \"to %(new)s seconds.\"),\n+                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})\n+                    self._METHOD_TIMEOUTS[scoped_method][0] \u003d new_timeout\n+                time.sleep(wait)","commit_id":"5d4234424de588ef383ada62911675a5d98b0fb0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"436f4a4164012e6556eaf3d5a2868b2cf45996a1","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":147,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":148,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":149,"context_line":"                time.sleep(wait)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class BackingOffClient(oslo_messaging.RPCClient):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_398c2cd9","line":149,"in_reply_to":"1a122d0e_edde763c","updated":"2016-04-21 11:07:04.000000000","message":"We can just sleep for uniform of the current timeout. No need for the extra complexity of other factors.","commit_id":"5d4234424de588ef383ada62911675a5d98b0fb0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3c77e7fe11cbda2bcbef6ddf848c6ad1c0cd9a28","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    assert NOTIFIER is not None"},{"line_number":84,"context_line":"    TRANSPORT.cleanup()"},{"line_number":85,"context_line":"    NOTIFICATION_TRANSPORT.cleanup()"},{"line_number":86,"context_line":"    _ContextWrapper._reset_timeouts()"},{"line_number":87,"context_line":"    TRANSPORT \u003d NOTIFICATION_TRANSPORT \u003d NOTIFIER \u003d None"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_944dab74","line":86,"updated":"2016-05-05 09:50:46.000000000","message":"_reset_timeouts i\u0027ll change, but not _ContextWrapper. It\u0027s private to this module so it\u0027s acceptable for this module-level function to call it.","commit_id":"2fbd29fc261cca7b0f3a7955f75e786045fe7a9c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e5eb17600deb6fb73d4155633a806e73cb8009a3","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    assert NOTIFIER is not None"},{"line_number":84,"context_line":"    TRANSPORT.cleanup()"},{"line_number":85,"context_line":"    NOTIFICATION_TRANSPORT.cleanup()"},{"line_number":86,"context_line":"    _ContextWrapper._reset_timeouts()"},{"line_number":87,"context_line":"    TRANSPORT \u003d NOTIFICATION_TRANSPORT \u003d NOTIFIER \u003d None"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_69df763a","line":86,"updated":"2016-05-04 18:06:34.000000000","message":"if you intend _ContextWrapper and _reset_timeouts to be private implementation details why are you using them here? Consider making at the least the method public?","commit_id":"2fbd29fc261cca7b0f3a7955f75e786045fe7a9c"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d43ce8390828059f75ace3d812228019ae98983f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    assert NOTIFIER is not None"},{"line_number":84,"context_line":"    TRANSPORT.cleanup()"},{"line_number":85,"context_line":"    NOTIFICATION_TRANSPORT.cleanup()"},{"line_number":86,"context_line":"    _ContextWrapper._reset_timeouts()"},{"line_number":87,"context_line":"    TRANSPORT \u003d NOTIFICATION_TRANSPORT \u003d NOTIFIER \u003d None"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_7670ca08","line":86,"in_reply_to":"1a122d0e_944dab74","updated":"2016-05-05 14:06:30.000000000","message":"@kevin, it makes sense.","commit_id":"2fbd29fc261cca7b0f3a7955f75e786045fe7a9c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3c77e7fe11cbda2bcbef6ddf848c6ad1c0cd9a28","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":142,"context_line":"                              \"%(wait)s seconds before next attempt. If the \""},{"line_number":143,"context_line":"                              \"server is not down, consider increasing the \""},{"line_number":144,"context_line":"                              \"rpc_response_timeout option.\"),"},{"line_number":145,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":146,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":147,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_74528f14","line":144,"updated":"2016-05-05 09:50:46.000000000","message":"Done","commit_id":"2fbd29fc261cca7b0f3a7955f75e786045fe7a9c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e5eb17600deb6fb73d4155633a806e73cb8009a3","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                LOG.error(_LE(\"Timeout in RPC method %(method)s. Waiting for \""},{"line_number":142,"context_line":"                              \"%(wait)s seconds before next attempt. If the \""},{"line_number":143,"context_line":"                              \"server is not down, consider increasing the \""},{"line_number":144,"context_line":"                              \"rpc_response_timeout option.\"),"},{"line_number":145,"context_line":"                          {\u0027wait\u0027: int(round(wait)), \u0027method\u0027: scoped_method})"},{"line_number":146,"context_line":"                ceiling \u003d TRANSPORT.conf.rpc_response_timeout * 10"},{"line_number":147,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_096c029b","line":144,"updated":"2016-05-04 18:06:34.000000000","message":"I\u0027d add: as Neutron server(s) may be overloaded and unable to respond promptly.","commit_id":"2fbd29fc261cca7b0f3a7955f75e786045fe7a9c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3c77e7fe11cbda2bcbef6ddf848c6ad1c0cd9a28","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":148,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":149,"context_line":"                    LOG.warning(_LW(\"Increasing timeout for %(method)s calls \""},{"line_number":150,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":151,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":152,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":153,"context_line":"                time.sleep(wait)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_d453a314","line":150,"updated":"2016-05-05 09:50:46.000000000","message":"Done.\n\n@Sreekumar, the ideal behavior is to not collapse when the system gets busy. There isn\u0027t much point in optimizing for the case where the servers are completely dead since that\u0027s not normal operation.","commit_id":"2fbd29fc261cca7b0f3a7955f75e786045fe7a9c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e5eb17600deb6fb73d4155633a806e73cb8009a3","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":148,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":149,"context_line":"                    LOG.warning(_LW(\"Increasing timeout for %(method)s calls \""},{"line_number":150,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":151,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":152,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":153,"context_line":"                time.sleep(wait)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_e9b8a613","line":150,"updated":"2016-05-04 18:06:34.000000000","message":"I\u0027d add: to reset timeout to default value, restart the process, otherwise this warning to the operator is somewhat cryptic.","commit_id":"2fbd29fc261cca7b0f3a7955f75e786045fe7a9c"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"fbebda5f6cbfa26b415bd2c31697eabda2ff7124","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                new_timeout \u003d min(self._original_context.timeout * 2, ceiling)"},{"line_number":148,"context_line":"                if new_timeout \u003e self._METHOD_TIMEOUTS[scoped_method]:"},{"line_number":149,"context_line":"                    LOG.warning(_LW(\"Increasing timeout for %(method)s calls \""},{"line_number":150,"context_line":"                                    \"to %(new)s seconds.\"),"},{"line_number":151,"context_line":"                                {\u0027method\u0027: scoped_method, \u0027new\u0027: new_timeout})"},{"line_number":152,"context_line":"                    self._METHOD_TIMEOUTS[scoped_method] \u003d new_timeout"},{"line_number":153,"context_line":"                time.sleep(wait)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a122d0e_966addb3","line":150,"in_reply_to":"1a122d0e_e9b8a613","updated":"2016-05-05 02:39:38.000000000","message":"I\u0027ll second that, it will be very helpful especially since the sleep timeouts can get quite large.\nI also think it\u0027s a bit counter intuitive, the whole purpose of this will be to _not make the admin restart the agent services!!! He just brings the master svc up and the dependent ones just startup in a few seconds... that should be the ideal behavior.","commit_id":"2fbd29fc261cca7b0f3a7955f75e786045fe7a9c"}],"neutron/tests/unit/common/test_rpc.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"41fcd932eb5b8039d36103aa64ca563f33ceeeab","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            rpc_server.wait.assert_called_once_with()"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"class TimeoutTestCase(base.DietTestCase):"},{"line_number":309,"context_line":"    def setUp(self):"},{"line_number":310,"context_line":"        super(TimeoutTestCase, self).setUp()"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_c7ab5b88","line":308,"updated":"2016-03-08 05:14:46.000000000","message":"Done","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"187136869793a80005bf11efe1e3ce7b6f0c45f3","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            rpc_server.wait.assert_called_once_with()"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"class TimeoutTestCase(base.DietTestCase):"},{"line_number":309,"context_line":"    def setUp(self):"},{"line_number":310,"context_line":"        super(TimeoutTestCase, self).setUp()"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_b9512665","line":308,"updated":"2016-03-07 21:23:13.000000000","message":"Missing a test for the scenario where .prepare is called with a specific timeout, and that the exponential timeout does not increase.","commit_id":"7a2aa407646d6ab85737233302c22db362e90612"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e59026156352c770bc8e4fd78767c08814854adf","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                         rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_1\u0027])"},{"line_number":342,"context_line":"        self.assertEqual(rpc.TRANSPORT.conf.rpc_response_timeout,"},{"line_number":343,"context_line":"                         rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_2\u0027])"},{"line_number":344,"context_line":"        # a change to an existing should affect new or existing ones"},{"line_number":345,"context_line":"        rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_2\u0027] \u003d 7000"},{"line_number":346,"context_line":"        self.assertEqual(rpc.TRANSPORT.conf.rpc_response_timeout,"},{"line_number":347,"context_line":"                         rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_1\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_837dc01e","line":344,"range":{"start_line":344,"start_character":34,"end_line":344,"end_character":40},"updated":"2016-03-14 06:55:55.000000000","message":"you mean should not?","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ad73286c528fc94490e61e4029c70ff943a43b9d","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                         rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_1\u0027])"},{"line_number":342,"context_line":"        self.assertEqual(rpc.TRANSPORT.conf.rpc_response_timeout,"},{"line_number":343,"context_line":"                         rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_2\u0027])"},{"line_number":344,"context_line":"        # a change to an existing should affect new or existing ones"},{"line_number":345,"context_line":"        rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_2\u0027] \u003d 7000"},{"line_number":346,"context_line":"        self.assertEqual(rpc.TRANSPORT.conf.rpc_response_timeout,"},{"line_number":347,"context_line":"                         rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_1\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_e31be47e","line":344,"range":{"start_line":344,"start_character":34,"end_line":344,"end_character":40},"in_reply_to":"3afc51ec_837dc01e","updated":"2016-03-14 07:24:26.000000000","message":"Done","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a0b766b6d477370a197e8408597c20837aad058b","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            with testtools.ExpectedException(messaging.MessagingTimeout):"},{"line_number":355,"context_line":"                self.client.call(self.call_context, \u0027method_1\u0027)"},{"line_number":356,"context_line":"            # sleep value should always be between 0 and configured timeout"},{"line_number":357,"context_line":"            self.assertGreaterEqual(self.sleep.call_args_list[0][0][0], 0)"},{"line_number":358,"context_line":"            self.assertLessEqual(self.sleep.call_args_list[0][0][0], 2)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def test_method_timeout_increases_on_timeout_exception(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_037a50f1","line":357,"range":{"start_line":357,"start_character":17,"end_line":357,"end_character":35},"updated":"2016-03-14 06:46:42.000000000","message":"wow, I am so 90s, haven\u0027t seen the predicate before.","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a0b766b6d477370a197e8408597c20837aad058b","unresolved":false,"context_lines":[{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        # we only care to check the timeouts sent to the transport"},{"line_number":367,"context_line":"        timeouts \u003d [call[1][\u0027timeout\u0027]"},{"line_number":368,"context_line":"                    for call in rpc.TRANSPORT._send.call_args_list]"},{"line_number":369,"context_line":"        self.assertEqual([1, 2, 4, 8, 16], timeouts)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def test_method_timeout_10x_config_ceiling(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_63d7d4bf","line":368,"range":{"start_line":368,"start_character":32,"end_line":368,"end_character":51},"updated":"2016-03-14 06:46:42.000000000","message":"That is VERY unsafe since we access private method in the library. Can we go some other route here?\n\nIdeally, we should just validate whatever we actually pass to .call in the context.","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ad73286c528fc94490e61e4029c70ff943a43b9d","unresolved":false,"context_lines":[{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        # we only care to check the timeouts sent to the transport"},{"line_number":367,"context_line":"        timeouts \u003d [call[1][\u0027timeout\u0027]"},{"line_number":368,"context_line":"                    for call in rpc.TRANSPORT._send.call_args_list]"},{"line_number":369,"context_line":"        self.assertEqual([1, 2, 4, 8, 16], timeouts)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def test_method_timeout_10x_config_ceiling(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_8e6e872d","line":368,"range":{"start_line":368,"start_character":32,"end_line":368,"end_character":51},"in_reply_to":"3afc51ec_63d7d4bf","updated":"2016-03-14 07:24:26.000000000","message":"The timeout is not passed in the call. The context looks it up from \u0027self\u0027. This seems to be the only way I can see for use to actually ensure that we are setting the correct thing.","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"75a80a68e6bff9110fa38232be43f76998466884","unresolved":false,"context_lines":[{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        # we only care to check the timeouts sent to the transport"},{"line_number":367,"context_line":"        timeouts \u003d [call[1][\u0027timeout\u0027]"},{"line_number":368,"context_line":"                    for call in rpc.TRANSPORT._send.call_args_list]"},{"line_number":369,"context_line":"        self.assertEqual([1, 2, 4, 8, 16], timeouts)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def test_method_timeout_10x_config_ceiling(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_49e8f9b4","line":368,"range":{"start_line":368,"start_character":32,"end_line":368,"end_character":51},"in_reply_to":"3afc51ec_8e6e872d","updated":"2016-03-14 07:53:36.000000000","message":"You could capture self and validate timeout on the object. It would at least be less fragile [though even .timeout access on the context object does not seem like an official public API].","commit_id":"6c0c5e2ec3bcbd6b37ed881dd1efb3fb74bb3ac2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"69b978dbd5cdf3932b9370b0aaae838a00703693","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                self.client.call(self.call_context, \u0027method_1\u0027)"},{"line_number":356,"context_line":"            # sleep value should always be between 0 and configured timeout"},{"line_number":357,"context_line":"            self.assertGreaterEqual(self.sleep.call_args_list[0][0][0], 0)"},{"line_number":358,"context_line":"            self.assertLessEqual(self.sleep.call_args_list[0][0][0], 2)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def test_method_timeout_increases_on_timeout_exception(self):"},{"line_number":361,"context_line":"        rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_1\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a18252c_6eede5ee","line":358,"updated":"2016-04-13 09:57:08.000000000","message":"For greaterequal and lessequal it does not really matter because it doesn\u0027t say which is expected vs observed in the traceback like it does with assertEqual.\n\nHere is an example failure:\n\n    Traceback (most recent call last):\n      File \"neutron/tests/unit/common/test_rpc.py\", line 357, in test_method_timeout_sleep\n        self.assertLessEqual(self.sleep.call_args_list[0][0][0], 0)\n      File \"/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/unittest2/case.py\", line 1227, in assertLessEqual\n        self.fail(self._formatMessage(msg, standardMsg))\n      File \"/home/administrator/code/neutron/.tox/py27/local/lib/python2.7/site-packages/unittest2/case.py\", line 690, in fail\n        raise self.failureException(msg)\n    AssertionError: 0.589777094586273 not less than or equal to 0\n\nAssertionError: 0.589777094586273 not less than or equal to 0","commit_id":"14d1c78bd11a1090e96d94d18f6b2c711458137a"},{"author":{"_account_id":13717,"name":"Inessa Vasilevskaya","email":"ivasilevskaya@mirantis.com","username":"ivasilevskaya"},"change_message_id":"45684cf64378fa2a2bed21a5b84a389d44f04af8","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            with testtools.ExpectedException(messaging.MessagingTimeout):"},{"line_number":355,"context_line":"                self.client.call(self.call_context, \u0027method_1\u0027)"},{"line_number":356,"context_line":"            # sleep value should always be between 0 and configured timeout"},{"line_number":357,"context_line":"            self.assertGreaterEqual(self.sleep.call_args_list[0][0][0], 0)"},{"line_number":358,"context_line":"            self.assertLessEqual(self.sleep.call_args_list[0][0][0], 2)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def test_method_timeout_increases_on_timeout_exception(self):"},{"line_number":361,"context_line":"        rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_1\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a18252c_d5680f8a","line":358,"range":{"start_line":357,"start_character":12,"end_line":358,"end_character":71},"updated":"2016-04-13 09:08:30.000000000","message":"Should not the order be (expected, actual)?","commit_id":"14d1c78bd11a1090e96d94d18f6b2c711458137a"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"ebd84cbdbb7291b70f9a14f14c44c804c906d149","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                self.client.call(self.call_context, \u0027method_1\u0027)"},{"line_number":356,"context_line":"            # sleep value should always be between 0 and configured timeout"},{"line_number":357,"context_line":"            self.assertGreaterEqual(self.sleep.call_args_list[0][0][0], 0)"},{"line_number":358,"context_line":"            self.assertLessEqual(self.sleep.call_args_list[0][0][0], 2)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def test_method_timeout_increases_on_timeout_exception(self):"},{"line_number":361,"context_line":"        rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_1\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a18252c_a5027807","line":358,"in_reply_to":"5a18252c_6eede5ee","updated":"2016-04-13 11:16:02.000000000","message":"Note that the argument order matters very much, but the arguments are not \u0027expected\u0027 or \u0027actual\u0027. GreaterEqual(a, b) asserts (a \u003e\u003d b) and LessEqual(a, b) asserts (a \u003c\u003d b).","commit_id":"14d1c78bd11a1090e96d94d18f6b2c711458137a"},{"author":{"_account_id":13717,"name":"Inessa Vasilevskaya","email":"ivasilevskaya@mirantis.com","username":"ivasilevskaya"},"change_message_id":"1923cdd4218af217934b8ed288e90788a4b09276","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                self.client.call(self.call_context, \u0027method_1\u0027)"},{"line_number":356,"context_line":"            # sleep value should always be between 0 and configured timeout"},{"line_number":357,"context_line":"            self.assertGreaterEqual(self.sleep.call_args_list[0][0][0], 0)"},{"line_number":358,"context_line":"            self.assertLessEqual(self.sleep.call_args_list[0][0][0], 2)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def test_method_timeout_increases_on_timeout_exception(self):"},{"line_number":361,"context_line":"        rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_1\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a18252c_74681888","line":358,"in_reply_to":"5a18252c_6eede5ee","updated":"2016-04-13 10:36:40.000000000","message":"Ok, no objections","commit_id":"14d1c78bd11a1090e96d94d18f6b2c711458137a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"529f344b6ce866216dde4b9097672249f93e661b","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                self.client.call(self.call_context, \u0027method_1\u0027)"},{"line_number":356,"context_line":"            # sleep value should always be between 0 and configured timeout"},{"line_number":357,"context_line":"            self.assertGreaterEqual(self.sleep.call_args_list[0][0][0], 0)"},{"line_number":358,"context_line":"            self.assertLessEqual(self.sleep.call_args_list[0][0][0], 2)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def test_method_timeout_increases_on_timeout_exception(self):"},{"line_number":361,"context_line":"        rpc._ContextWrapper._METHOD_TIMEOUTS[\u0027method_1\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_ee76503d","line":358,"in_reply_to":"5a18252c_a5027807","updated":"2016-04-15 17:16:44.000000000","message":"Well of course, but we could switch which ones we were using if we did care which side it was on, i.e:\n\nself.assertLessEqual(0, self.sleep.call_args_list[0][0][0])\nself.assertGreaterEqual(2, self.sleep.call_args_list[0][0][0])","commit_id":"14d1c78bd11a1090e96d94d18f6b2c711458137a"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cfe93b79ba9fa507092bb6c5e05265f396f73b13","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def test_timeout_unaffected_when_explicitly_set(self):"},{"line_number":328,"context_line":"        rpc.TRANSPORT.conf.rpc_response_timeout \u003d 5"},{"line_number":329,"context_line":"        ctx \u003d self.client.prepare(topic\u003d\u0027sandwiches\u0027, timeout\u003d77)"},{"line_number":330,"context_line":"        with testtools.ExpectedException(messaging.MessagingTimeout):"},{"line_number":331,"context_line":"            ctx.call(self.call_context, \u0027create_pb_and_j\u0027)"},{"line_number":332,"context_line":"        # ensure that the timeout was not increased and the back-off sleep"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_36955640","line":329,"updated":"2016-04-15 09:58:38.000000000","message":"I like the topic :)","commit_id":"160cd3996436045382df1b91dcf3b10ab72c0253"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cfe93b79ba9fa507092bb6c5e05265f396f73b13","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        for i in range(100):"},{"line_number":354,"context_line":"            with testtools.ExpectedException(messaging.MessagingTimeout):"},{"line_number":355,"context_line":"                self.client.call(self.call_context, \u0027method_1\u0027)"},{"line_number":356,"context_line":"            # sleep value should always be between 0 and configured timeout"},{"line_number":357,"context_line":"            self.assertGreaterEqual(self.sleep.call_args_list[0][0][0], 0)"},{"line_number":358,"context_line":"            self.assertLessEqual(self.sleep.call_args_list[0][0][0], 2)"},{"line_number":359,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_1622dab9","line":356,"updated":"2016-04-15 09:58:38.000000000","message":"Why is that here, but not in L369.\n\nMay be you are only seeing the first call by not resetting the mock?","commit_id":"160cd3996436045382df1b91dcf3b10ab72c0253"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"7e3ae1e3c2576b33f15ad5691d7fb311bfae9aaf","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        for i in range(100):"},{"line_number":354,"context_line":"            with testtools.ExpectedException(messaging.MessagingTimeout):"},{"line_number":355,"context_line":"                self.client.call(self.call_context, \u0027method_1\u0027)"},{"line_number":356,"context_line":"            # sleep value should always be between 0 and configured timeout"},{"line_number":357,"context_line":"            self.assertGreaterEqual(self.sleep.call_args_list[0][0][0], 0)"},{"line_number":358,"context_line":"            self.assertLessEqual(self.sleep.call_args_list[0][0][0], 2)"},{"line_number":359,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_ee813091","line":356,"in_reply_to":"1a122d0e_1622dab9","updated":"2016-04-15 17:23:32.000000000","message":"This is the sleep range, not the timeout range. It\u0027s always between 0 and the configured timeout. However you are right that I need to reset the mock so I\u0027m testing every call.","commit_id":"160cd3996436045382df1b91dcf3b10ab72c0253"}]}
