)]}'
{"neutron/tests/functional/agent/test_l3_agent.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"107f81d6840c8bc3aa04011037827e40ceb7a856","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from oslo_utils import uuidutils"},{"line_number":25,"context_line":"import six"},{"line_number":26,"context_line":"import testtools"},{"line_number":27,"context_line":"import time"},{"line_number":28,"context_line":"import webob"},{"line_number":29,"context_line":"import webob.dec"},{"line_number":30,"context_line":"import webob.exc"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_61f3ca73","line":27,"updated":"2015-09-07 12:37:04.000000000","message":"time is stdlib, so could be moved up.","commit_id":"7c8e337c4f15d6d159f93fc3760d08cefd86e2f5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"55e6462a56605ef80b69197c61ad51d3b4409a8e","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from oslo_utils import uuidutils"},{"line_number":25,"context_line":"import six"},{"line_number":26,"context_line":"import testtools"},{"line_number":27,"context_line":"import time"},{"line_number":28,"context_line":"import webob"},{"line_number":29,"context_line":"import webob.dec"},{"line_number":30,"context_line":"import webob.exc"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_07a9be8f","line":27,"in_reply_to":"da20952f_61f3ca73","updated":"2015-09-07 13:19:58.000000000","message":"ooops","commit_id":"7c8e337c4f15d6d159f93fc3760d08cefd86e2f5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"107f81d6840c8bc3aa04011037827e40ceb7a856","unresolved":false,"context_lines":[{"line_number":917,"context_line":"    def _query_metadata_proxy(self, machine):"},{"line_number":918,"context_line":"        url \u003d \u0027http://%(host)s:%(port)s\u0027 % {\u0027host\u0027: dhcp.METADATA_DEFAULT_IP,"},{"line_number":919,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":920,"context_line":"        cmd \u003d \u0027curl\u0027, \u0027--max-time\u0027, METADATA_REQUEST_TIMEOUT, \u0027-D-\u0027, url"},{"line_number":921,"context_line":"        i \u003d 0"},{"line_number":922,"context_line":"        while i \u003c\u003d METADATA_REQUEST_TIMEOUT:"},{"line_number":923,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_a1fc82b5","line":920,"updated":"2015-09-07 12:37:04.000000000","message":"Shouldn\u0027t --max-time argument be (timeout - i)? Otherwise we may spend twice as much time trying to access the metadata server before failing.","commit_id":"7c8e337c4f15d6d159f93fc3760d08cefd86e2f5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b1f36e03ddc87dab3d9d5d30eae5c15dc068f480","unresolved":false,"context_lines":[{"line_number":917,"context_line":"    def _query_metadata_proxy(self, machine):"},{"line_number":918,"context_line":"        url \u003d \u0027http://%(host)s:%(port)s\u0027 % {\u0027host\u0027: dhcp.METADATA_DEFAULT_IP,"},{"line_number":919,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":920,"context_line":"        cmd \u003d \u0027curl\u0027, \u0027--max-time\u0027, METADATA_REQUEST_TIMEOUT, \u0027-D-\u0027, url"},{"line_number":921,"context_line":"        i \u003d 0"},{"line_number":922,"context_line":"        while i \u003c\u003d METADATA_REQUEST_TIMEOUT:"},{"line_number":923,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_e2e4b80d","line":920,"in_reply_to":"da20952f_47b816c8","updated":"2015-09-07 13:39:27.000000000","message":"I mean, let\u0027s say you get Connection refused for next 11 checks (55 secs total), and then the last one is triggered with 60 secs timeout, and now it hangs there for 60 secs more (because now it\u0027s not Connection refused but mere timeout), and then fails 60+55 secs later after the first query attempt was issued. Is it (115 secs wait time) really what we would want in this case?\n\nIt may be indeed the case, or we may be ok with waiting twice more than the TIMEOUT. I want to hear from you whether you think we can live with it.","commit_id":"7c8e337c4f15d6d159f93fc3760d08cefd86e2f5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"55e6462a56605ef80b69197c61ad51d3b4409a8e","unresolved":false,"context_lines":[{"line_number":917,"context_line":"    def _query_metadata_proxy(self, machine):"},{"line_number":918,"context_line":"        url \u003d \u0027http://%(host)s:%(port)s\u0027 % {\u0027host\u0027: dhcp.METADATA_DEFAULT_IP,"},{"line_number":919,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":920,"context_line":"        cmd \u003d \u0027curl\u0027, \u0027--max-time\u0027, METADATA_REQUEST_TIMEOUT, \u0027-D-\u0027, url"},{"line_number":921,"context_line":"        i \u003d 0"},{"line_number":922,"context_line":"        while i \u003c\u003d METADATA_REQUEST_TIMEOUT:"},{"line_number":923,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_47b816c8","line":920,"in_reply_to":"da20952f_a1fc82b5","updated":"2015-09-07 13:19:58.000000000","message":"This would change the existing logic. If we did what you suggest, they we\u0027d have to retry for more than just \u0027connection refused\u0027 error, no? This is equivalent to the previous logic, with the caveat that if we immediately fail on connection refused we try until the actual max-time (which is not honored on such an error).\n\nMakes sense?","commit_id":"7c8e337c4f15d6d159f93fc3760d08cefd86e2f5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b220684756206c26ed78aa43da69c8bd43f3deca","unresolved":false,"context_lines":[{"line_number":917,"context_line":"    def _query_metadata_proxy(self, machine):"},{"line_number":918,"context_line":"        url \u003d \u0027http://%(host)s:%(port)s\u0027 % {\u0027host\u0027: dhcp.METADATA_DEFAULT_IP,"},{"line_number":919,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":920,"context_line":"        cmd \u003d \u0027curl\u0027, \u0027--max-time\u0027, METADATA_REQUEST_TIMEOUT, \u0027-D-\u0027, url"},{"line_number":921,"context_line":"        i \u003d 0"},{"line_number":922,"context_line":"        while i \u003c\u003d METADATA_REQUEST_TIMEOUT:"},{"line_number":923,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_5601a9ad","line":920,"in_reply_to":"da20952f_e2e4b80d","updated":"2015-09-07 14:00:06.000000000","message":"oh, I see what you mean now. To avoid fiddling with the command line to ensure the timeout logic is preserved for different errors being returned I\u0027d say we can cut back and wait METADATA_REQUEST_TIMEOUT/2. Let\u0027s face it: even 30 seconds is a looooong time for the router to come up.","commit_id":"7c8e337c4f15d6d159f93fc3760d08cefd86e2f5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"107f81d6840c8bc3aa04011037827e40ceb7a856","unresolved":false,"context_lines":[{"line_number":924,"context_line":"                raw_headers \u003d machine.execute(cmd)"},{"line_number":925,"context_line":"                break"},{"line_number":926,"context_line":"            except RuntimeError as e:"},{"line_number":927,"context_line":"                if \u0027Connection refused\u0027 in str(e):"},{"line_number":928,"context_line":"                    time.sleep(METADATA_REQUEST_SLEEP)"},{"line_number":929,"context_line":"                    i +\u003d METADATA_REQUEST_SLEEP"},{"line_number":930,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_418a461c","line":927,"updated":"2015-09-07 12:37:04.000000000","message":"Do we guarantee that tests are executed using C locale? Because otherwise translated curl may fail to match against the message string.\n\nAlso matching against a message seems a bit wrong to me. Could we instead stop using curl and rely on e.g. urllib or httplib?","commit_id":"7c8e337c4f15d6d159f93fc3760d08cefd86e2f5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b1f36e03ddc87dab3d9d5d30eae5c15dc068f480","unresolved":false,"context_lines":[{"line_number":924,"context_line":"                raw_headers \u003d machine.execute(cmd)"},{"line_number":925,"context_line":"                break"},{"line_number":926,"context_line":"            except RuntimeError as e:"},{"line_number":927,"context_line":"                if \u0027Connection refused\u0027 in str(e):"},{"line_number":928,"context_line":"                    time.sleep(METADATA_REQUEST_SLEEP)"},{"line_number":929,"context_line":"                    i +\u003d METADATA_REQUEST_SLEEP"},{"line_number":930,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_22b5d0eb","line":927,"in_reply_to":"da20952f_0733fe62","updated":"2015-09-07 13:39:27.000000000","message":"Yeah, probably urllib rewrite would be too invasive and not critical now.","commit_id":"7c8e337c4f15d6d159f93fc3760d08cefd86e2f5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"55e6462a56605ef80b69197c61ad51d3b4409a8e","unresolved":false,"context_lines":[{"line_number":924,"context_line":"                raw_headers \u003d machine.execute(cmd)"},{"line_number":925,"context_line":"                break"},{"line_number":926,"context_line":"            except RuntimeError as e:"},{"line_number":927,"context_line":"                if \u0027Connection refused\u0027 in str(e):"},{"line_number":928,"context_line":"                    time.sleep(METADATA_REQUEST_SLEEP)"},{"line_number":929,"context_line":"                    i +\u003d METADATA_REQUEST_SLEEP"},{"line_number":930,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_0733fe62","line":927,"in_reply_to":"da20952f_418a461c","updated":"2015-09-07 13:19:58.000000000","message":"Assuming this matters in the gate, yes :)\n\nAs for the latter, I agree that using urllib might be better, but this would require changing the fixture, and it\u0027s going to be a lot more radical change. Do you think this is a pre-requisite to this fix? If so, I\u0027ll proceed as you suggest.","commit_id":"7c8e337c4f15d6d159f93fc3760d08cefd86e2f5"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b3dc5ae5db90d18ea25cdb1390ac611d274a75dc","unresolved":false,"context_lines":[{"line_number":919,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":920,"context_line":"        cmd \u003d \u0027curl\u0027, \u0027--max-time\u0027, METADATA_REQUEST_TIMEOUT, \u0027-D-\u0027, url"},{"line_number":921,"context_line":"        i \u003d 0"},{"line_number":922,"context_line":"        CONNECTION_REFUSED_TIMEOUT \u003d METADATA_REQUEST_TIMEOUT / 2"},{"line_number":923,"context_line":"        while i \u003c\u003d CONNECTION_REFUSED_TIMEOUT:"},{"line_number":924,"context_line":"            try:"},{"line_number":925,"context_line":"                raw_headers \u003d machine.execute(cmd)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_f9830ec9","line":922,"updated":"2015-09-07 14:38:03.000000000","message":"In python3 \u0027/\u0027 returns a float. Use \u0027//\u0027 for compatibility.","commit_id":"c5287cb27f9ac02c8994364a2e5cc31ef5def123"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"052812cdaf6fffe68557faec4dd9172b48362757","unresolved":false,"context_lines":[{"line_number":919,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":920,"context_line":"        cmd \u003d \u0027curl\u0027, \u0027--max-time\u0027, METADATA_REQUEST_TIMEOUT, \u0027-D-\u0027, url"},{"line_number":921,"context_line":"        i \u003d 0"},{"line_number":922,"context_line":"        CONNECTION_REFUSED_TIMEOUT \u003d METADATA_REQUEST_TIMEOUT / 2"},{"line_number":923,"context_line":"        while i \u003c\u003d CONNECTION_REFUSED_TIMEOUT:"},{"line_number":924,"context_line":"            try:"},{"line_number":925,"context_line":"                raw_headers \u003d machine.execute(cmd)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_8c22ce50","line":922,"in_reply_to":"da20952f_f9830ec9","updated":"2015-09-07 14:53:20.000000000","message":"The py34 should have caught that, why didn\u0027t?","commit_id":"c5287cb27f9ac02c8994364a2e5cc31ef5def123"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f7c30788b22fd1de41085f00cfe56a156e132612","unresolved":false,"context_lines":[{"line_number":920,"context_line":"        cmd \u003d \u0027curl\u0027, \u0027--max-time\u0027, METADATA_REQUEST_TIMEOUT, \u0027-D-\u0027, url"},{"line_number":921,"context_line":"        i \u003d 0"},{"line_number":922,"context_line":"        CONNECTION_REFUSED_TIMEOUT \u003d METADATA_REQUEST_TIMEOUT / 2"},{"line_number":923,"context_line":"        while i \u003c\u003d CONNECTION_REFUSED_TIMEOUT:"},{"line_number":924,"context_line":"            try:"},{"line_number":925,"context_line":"                raw_headers \u003d machine.execute(cmd)"},{"line_number":926,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_2c3ce291","line":923,"updated":"2015-09-07 14:49:16.000000000","message":"we will wait at most CONNECTION_REFUSED_TIMEOUT seconds between all curl queries so in the worse case 7 queries[1] and each query can take METADATA_REQUEST_TIMEOUT seconds so 450 seconds, am i wrong?\n\nI would prefer we limit the number of curl queries or the global time (including query durations).\n\nThoughts?\n\n\n\n[1] CONNECTION_REFUSED_TIMEOUT/METADATA_REQUEST_SLEEP +1  (30/5  + 1 \u003d\u003e 7)\n\n[2] [1] * METADATA_REQUEST_TIMEOUT + CONNECTION_REFUSED_TIMEOUT (7 * 60 + 30 \u003d\u003e 450)","commit_id":"c5287cb27f9ac02c8994364a2e5cc31ef5def123"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"052812cdaf6fffe68557faec4dd9172b48362757","unresolved":false,"context_lines":[{"line_number":920,"context_line":"        cmd \u003d \u0027curl\u0027, \u0027--max-time\u0027, METADATA_REQUEST_TIMEOUT, \u0027-D-\u0027, url"},{"line_number":921,"context_line":"        i \u003d 0"},{"line_number":922,"context_line":"        CONNECTION_REFUSED_TIMEOUT \u003d METADATA_REQUEST_TIMEOUT / 2"},{"line_number":923,"context_line":"        while i \u003c\u003d CONNECTION_REFUSED_TIMEOUT:"},{"line_number":924,"context_line":"            try:"},{"line_number":925,"context_line":"                raw_headers \u003d machine.execute(cmd)"},{"line_number":926,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_ac79d230","line":923,"in_reply_to":"da20952f_2c3ce291","updated":"2015-09-07 14:53:20.000000000","message":"I must be dumb, but I don\u0027t understand how we could possibly wait 450 sec.\n\nA connection refused error doesn\u0027t wait, any other: we fail and exit the loop. What am I missing?","commit_id":"c5287cb27f9ac02c8994364a2e5cc31ef5def123"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f7c30788b22fd1de41085f00cfe56a156e132612","unresolved":false,"context_lines":[{"line_number":932,"context_line":"                    self.fail(\u0027metadata proxy unreachable \u0027"},{"line_number":933,"context_line":"                              \u0027on %s before timeout\u0027 % url)"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        if i \u003e CONNECTION_REFUSED_TIMEOUT:"},{"line_number":936,"context_line":"            self.fail(\u0027Timed out waiting metadata proxy to become available\u0027)"},{"line_number":937,"context_line":"        return raw_headers.splitlines()[0]"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_f9d1cecc","line":935,"updated":"2015-09-07 14:49:16.000000000","message":"you can use \"else:\" instead of \"if ...:\"","commit_id":"c5287cb27f9ac02c8994364a2e5cc31ef5def123"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"052812cdaf6fffe68557faec4dd9172b48362757","unresolved":false,"context_lines":[{"line_number":932,"context_line":"                    self.fail(\u0027metadata proxy unreachable \u0027"},{"line_number":933,"context_line":"                              \u0027on %s before timeout\u0027 % url)"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        if i \u003e CONNECTION_REFUSED_TIMEOUT:"},{"line_number":936,"context_line":"            self.fail(\u0027Timed out waiting metadata proxy to become available\u0027)"},{"line_number":937,"context_line":"        return raw_headers.splitlines()[0]"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_4cefd6e8","line":935,"in_reply_to":"da20952f_f9d1cecc","updated":"2015-09-07 14:53:20.000000000","message":"but I don\u0027t have to...","commit_id":"c5287cb27f9ac02c8994364a2e5cc31ef5def123"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"a52fcff8dd811731ef6b125e1cf41b3d07e36c85","unresolved":false,"context_lines":[{"line_number":926,"context_line":"                break"},{"line_number":927,"context_line":"            except RuntimeError as e:"},{"line_number":928,"context_line":"                if \u0027Connection refused\u0027 in str(e):"},{"line_number":929,"context_line":"                    time.sleep(METADATA_REQUEST_SLEEP)"},{"line_number":930,"context_line":"                    i +\u003d METADATA_REQUEST_SLEEP"},{"line_number":931,"context_line":"                else:"},{"line_number":932,"context_line":"                    self.fail(\u0027metadata proxy unreachable \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_ef201c9c","line":929,"updated":"2015-09-07 15:07:00.000000000","message":"It seems we don\u0027t need to sleep. curl will wait for METADATA_REQUEST_TIMEOUT for us, right?","commit_id":"4b2e6842f320405cd963f560bc06849b4b7bb1eb"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"566c619c0b8703f3ef1db66e5aafc23f60d1f6cc","unresolved":false,"context_lines":[{"line_number":926,"context_line":"                break"},{"line_number":927,"context_line":"            except RuntimeError as e:"},{"line_number":928,"context_line":"                if \u0027Connection refused\u0027 in str(e):"},{"line_number":929,"context_line":"                    time.sleep(METADATA_REQUEST_SLEEP)"},{"line_number":930,"context_line":"                    i +\u003d METADATA_REQUEST_SLEEP"},{"line_number":931,"context_line":"                else:"},{"line_number":932,"context_line":"                    self.fail(\u0027metadata proxy unreachable \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_ef7c9c72","line":929,"in_reply_to":"da20952f_ef201c9c","updated":"2015-09-07 15:10:54.000000000","message":"no, it won\u0027t on connection reset.","commit_id":"4b2e6842f320405cd963f560bc06849b4b7bb1eb"}]}
