)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f1b0f3ab71602cc23f6f8069e3fe9e8d6600db9e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix of ping usage in net_helpers.async_ping()"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Current implementation of net_helpers.async_ping() is broken due its"},{"line_number":10,"context_line":"usage of -c parameter of ping and assumption that if some of the ICMP"},{"line_number":11,"context_line":"replies do not arrive, RuntimeException would be thrown. However, Linux"},{"line_number":12,"context_line":"ping works in the way that if at least one reply is received from any"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7aa08908_0790c8eb","line":9,"range":{"start_line":9,"start_character":54,"end_line":9,"end_character":60},"updated":"2016-06-09 20:44:40.000000000","message":"The commit message nor the bug description explains why async_ping is broken ... indeed it seems written that ping should receive \"count\" pong responses","commit_id":"1fe66cb8125451ed7a34312d91feadf6188cbd78"}],"neutron/tests/common/net_helpers.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e5516864220e677dda03ec6d9fc428b58fc4f102","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # See bug 1588731 for explanation why using -c count ping option"},{"line_number":105,"context_line":"    # cannot be used and it needs to be done using the following workaround."},{"line_number":106,"context_line":"    for _ in range(count):"},{"line_number":107,"context_line":"        start_time \u003d time.time()"},{"line_number":108,"context_line":"        ns_ip_wrapper.netns.execute([ping_command, \u0027-c\u0027, \u00271\u0027, \u0027-W\u0027, timeout,"},{"line_number":109,"context_line":"                                     dst_ip])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_2e201549","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":9},"updated":"2016-06-03 13:05:43.000000000","message":"Nit: There was a funny upstream ML thread about naming: http://lists.openstack.org/pipermail/openstack-dev/2014-October/048359.html","commit_id":"490318870aae67c7507a94666ed9020b0a17aea2"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"bb667f405571b335d655499b4f8adb5a46d53aae","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # See bug 1588731 for explanation why using -c count ping option"},{"line_number":105,"context_line":"    # cannot be used and it needs to be done using the following workaround."},{"line_number":106,"context_line":"    for _ in range(count):"},{"line_number":107,"context_line":"        start_time \u003d time.time()"},{"line_number":108,"context_line":"        ns_ip_wrapper.netns.execute([ping_command, \u0027-c\u0027, \u00271\u0027, \u0027-W\u0027, timeout,"},{"line_number":109,"context_line":"                                     dst_ip])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_c0994370","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":9},"in_reply_to":"9abb7d3a_0c738a16","updated":"2016-06-03 18:00:55.000000000","message":"Interesting, thanks :)","commit_id":"490318870aae67c7507a94666ed9020b0a17aea2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e12d01b789e2165c1a1164155da84c1e44ce1a17","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # See bug 1588731 for explanation why using -c count ping option"},{"line_number":105,"context_line":"    # cannot be used and it needs to be done using the following workaround."},{"line_number":106,"context_line":"    for _ in range(count):"},{"line_number":107,"context_line":"        start_time \u003d time.time()"},{"line_number":108,"context_line":"        ns_ip_wrapper.netns.execute([ping_command, \u0027-c\u0027, \u00271\u0027, \u0027-W\u0027, timeout,"},{"line_number":109,"context_line":"                                     dst_ip])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_0c738a16","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":9},"in_reply_to":"9abb7d3a_2e201549","updated":"2016-06-03 16:50:03.000000000","message":"@Jakub, interesting reading :)","commit_id":"490318870aae67c7507a94666ed9020b0a17aea2"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"8ac25f107ec56bde5fa73b4626c3d001c4546356","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # See bug 1588731 for explanation why using -c count ping option"},{"line_number":105,"context_line":"    # cannot be used and it needs to be done using the following workaround."},{"line_number":106,"context_line":"    for _ in range(count):"},{"line_number":107,"context_line":"        start_time \u003d time.time()"},{"line_number":108,"context_line":"        ns_ip_wrapper.netns.execute([ping_command, \u0027-c\u0027, \u00271\u0027, \u0027-W\u0027, timeout,"},{"line_number":109,"context_line":"                                     dst_ip])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_b1e72fe3","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":9},"in_reply_to":"9abb7d3a_c0994370","updated":"2016-06-03 18:45:13.000000000","message":"I\u0027m glad you liked it :) Though I linked it here to consider renaming _ to something like _unused to avoid shadowing in case net_helpers will import i18n functions.","commit_id":"490318870aae67c7507a94666ed9020b0a17aea2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e12d01b789e2165c1a1164155da84c1e44ce1a17","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        diff \u003d end_time - start_time"},{"line_number":112,"context_line":"        if 0 \u003c diff \u003c 1:"},{"line_number":113,"context_line":"            # wait at most one second between individual pings"},{"line_number":114,"context_line":"            time.sleep(1 - (end_time - start_time))"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_0ce1ca9a","line":114,"range":{"start_line":114,"start_character":28,"end_line":114,"end_character":49},"updated":"2016-06-03 16:50:03.000000000","message":"If you have already `diff` in 111 you can reuse it here.","commit_id":"490318870aae67c7507a94666ed9020b0a17aea2"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e5516864220e677dda03ec6d9fc428b58fc4f102","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                     dst_ip])"},{"line_number":110,"context_line":"        end_time \u003d time.time()"},{"line_number":111,"context_line":"        diff \u003d end_time - start_time"},{"line_number":112,"context_line":"        if 0 \u003c diff \u003c 1:"},{"line_number":113,"context_line":"            # wait at most one second between individual pings"},{"line_number":114,"context_line":"            time.sleep(1 - (end_time - start_time))"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_eeaa8d84","line":114,"range":{"start_line":112,"start_character":0,"end_line":114,"end_character":51},"updated":"2016-06-03 13:05:43.000000000","message":"So the idea is that the longer it takes to get icmp reply, the less time you\u0027ll sleep? And eventually if the roundtrip is more than 1 second, you won\u0027t sleep at all?\n\nCan you explain why is this needed?","commit_id":"490318870aae67c7507a94666ed9020b0a17aea2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e070907745f81ba5ec89f846e9e0fe9e85e6f0fa","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                     dst_ip])"},{"line_number":110,"context_line":"        end_time \u003d time.time()"},{"line_number":111,"context_line":"        diff \u003d end_time - start_time"},{"line_number":112,"context_line":"        if 0 \u003c diff \u003c 1:"},{"line_number":113,"context_line":"            # wait at most one second between individual pings"},{"line_number":114,"context_line":"            time.sleep(1 - (end_time - start_time))"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_8063bb19","line":114,"range":{"start_line":112,"start_character":0,"end_line":114,"end_character":51},"in_reply_to":"9abb7d3a_80a1fbab","updated":"2016-06-03 18:04:12.000000000","message":"Thanks for explanation.","commit_id":"490318870aae67c7507a94666ed9020b0a17aea2"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"bb667f405571b335d655499b4f8adb5a46d53aae","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                     dst_ip])"},{"line_number":110,"context_line":"        end_time \u003d time.time()"},{"line_number":111,"context_line":"        diff \u003d end_time - start_time"},{"line_number":112,"context_line":"        if 0 \u003c diff \u003c 1:"},{"line_number":113,"context_line":"            # wait at most one second between individual pings"},{"line_number":114,"context_line":"            time.sleep(1 - (end_time - start_time))"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_80a1fbab","line":114,"range":{"start_line":112,"start_character":0,"end_line":114,"end_character":51},"in_reply_to":"9abb7d3a_cf35f4db","updated":"2016-06-03 18:00:55.000000000","message":"The 1s waiting is to ensure that there will be e.g. 10 seconds of pinging. Apart from that this is consistent with the default ping interval (see -i option), this is needed for tests that span greater time interval, namely testing restarts in functional and fullstack. If we only pinged e.g. 20 times consecutively, placing each ping immediately right after the other, the whole async_ping (see line 118) would be over in much less time than e.g. restarting would even begin. Hence guaranteeing the time interval is necessary for such tests.\nI\u0027ll add customizable interval (a.k.a. -i ping option) in the next PS.","commit_id":"490318870aae67c7507a94666ed9020b0a17aea2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e12d01b789e2165c1a1164155da84c1e44ce1a17","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                     dst_ip])"},{"line_number":110,"context_line":"        end_time \u003d time.time()"},{"line_number":111,"context_line":"        diff \u003d end_time - start_time"},{"line_number":112,"context_line":"        if 0 \u003c diff \u003c 1:"},{"line_number":113,"context_line":"            # wait at most one second between individual pings"},{"line_number":114,"context_line":"            time.sleep(1 - (end_time - start_time))"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_cf35f4db","line":114,"range":{"start_line":112,"start_character":0,"end_line":114,"end_character":51},"in_reply_to":"9abb7d3a_eeaa8d84","updated":"2016-06-03 16:50:03.000000000","message":"Why do we even need to wait 1s?","commit_id":"490318870aae67c7507a94666ed9020b0a17aea2"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"709c454b1a2f274ddd7ce9d37c11a223d786faf4","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    ipversion \u003d netaddr.IPAddress(dst_ip).version"},{"line_number":100,"context_line":"    ping_command \u003d \u0027ping\u0027 if ipversion \u003d\u003d 4 else \u0027ping6\u0027"},{"line_number":101,"context_line":"    ns_ip_wrapper \u003d ip_lib.IPWrapper(src_namespace)"},{"line_number":102,"context_line":"    ns_ip_wrapper.netns.execute([ping_command, \u0027-c\u0027, count, \u0027-W\u0027, timeout,"},{"line_number":103,"context_line":"                                 dst_ip])"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_eefa0874","side":"PARENT","line":102,"updated":"2016-07-13 05:21:54.000000000","message":"If you replaced -W with -w, you wouldn\u0027t needed this complexity. it seems.","commit_id":"88710bbc6b9b2ebf23d84b92bcc5349515f1eddd"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"b98fa11ec4ba52cb3bdba1e38a19a8338e5321ff","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    ipversion \u003d netaddr.IPAddress(dst_ip).version"},{"line_number":100,"context_line":"    ping_command \u003d \u0027ping\u0027 if ipversion \u003d\u003d 4 else \u0027ping6\u0027"},{"line_number":101,"context_line":"    ns_ip_wrapper \u003d ip_lib.IPWrapper(src_namespace)"},{"line_number":102,"context_line":"    ns_ip_wrapper.netns.execute([ping_command, \u0027-c\u0027, count, \u0027-W\u0027, timeout,"},{"line_number":103,"context_line":"                                 dst_ip])"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_88db4a1b","side":"PARENT","line":102,"in_reply_to":"1aa78d24_eefa0874","updated":"2016-07-18 04:44:14.000000000","message":"No, it would not work as -w is unreliable. See https://bugs.launchpad.net/neutron/+bug/1588731 for further details.","commit_id":"88710bbc6b9b2ebf23d84b92bcc5349515f1eddd"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"1b38f81dd470d2daa1b172db9856be72950a7ffe","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    ipversion \u003d netaddr.IPAddress(dst_ip).version"},{"line_number":100,"context_line":"    ping_command \u003d \u0027ping\u0027 if ipversion \u003d\u003d 4 else \u0027ping6\u0027"},{"line_number":101,"context_line":"    ns_ip_wrapper \u003d ip_lib.IPWrapper(src_namespace)"},{"line_number":102,"context_line":"    ns_ip_wrapper.netns.execute([ping_command, \u0027-c\u0027, count, \u0027-W\u0027, timeout,"},{"line_number":103,"context_line":"                                 dst_ip])"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_d9b48336","side":"PARENT","line":102,"in_reply_to":"dada55a8_88db4a1b","updated":"2016-07-20 04:43:08.000000000","message":"When I tested, it worked. The point is to use only -w. You seem to have tested with both -w and -W.","commit_id":"88710bbc6b9b2ebf23d84b92bcc5349515f1eddd"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"2ff44212ab6944563257841950d7d85fd3c157de","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    ipversion \u003d netaddr.IPAddress(dst_ip).version"},{"line_number":100,"context_line":"    ping_command \u003d \u0027ping\u0027 if ipversion \u003d\u003d 4 else \u0027ping6\u0027"},{"line_number":101,"context_line":"    ns_ip_wrapper \u003d ip_lib.IPWrapper(src_namespace)"},{"line_number":102,"context_line":"    ns_ip_wrapper.netns.execute([ping_command, \u0027-c\u0027, count, \u0027-W\u0027, timeout,"},{"line_number":103,"context_line":"                                 dst_ip])"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_a1f10998","side":"PARENT","line":102,"in_reply_to":"dada55a8_d92ac38f","updated":"2016-07-22 10:58:19.000000000","message":"Oh sorry.\n\nAfter reading the man page again, that might be the intended behavior.","commit_id":"88710bbc6b9b2ebf23d84b92bcc5349515f1eddd"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"fcfe6d48320494c915a73afef60a3d36f49b75db","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    ipversion \u003d netaddr.IPAddress(dst_ip).version"},{"line_number":100,"context_line":"    ping_command \u003d \u0027ping\u0027 if ipversion \u003d\u003d 4 else \u0027ping6\u0027"},{"line_number":101,"context_line":"    ns_ip_wrapper \u003d ip_lib.IPWrapper(src_namespace)"},{"line_number":102,"context_line":"    ns_ip_wrapper.netns.execute([ping_command, \u0027-c\u0027, count, \u0027-W\u0027, timeout,"},{"line_number":103,"context_line":"                                 dst_ip])"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_d92ac38f","side":"PARENT","line":102,"in_reply_to":"dada55a8_d9b48336","updated":"2016-07-20 05:28:43.000000000","message":"This was tested and recorded in the bug report:\n\"Man page suggests to use -w parameter. However this does not help: When using -w parameter, it is still possible that one ICMP reply is missed (even when using -c) while ping resulting in 0: e.g. \"ping -c 3 -w 3\" would send _four_ icmp requests and receive three responses if e.g. second response is missed and the other responses would be fast enough. Because three responses would be received, ping would return 0 status code even though there was a single packet loss, and that would lead to false conclusion that ping test passes correctly.\"","commit_id":"88710bbc6b9b2ebf23d84b92bcc5349515f1eddd"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4c5a3d725cb39d0395b49816dc06e89f2654ec4a","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                     dst_ip])"},{"line_number":110,"context_line":"        end_time \u003d time.time()"},{"line_number":111,"context_line":"        diff \u003d end_time - start_time"},{"line_number":112,"context_line":"        if 0 \u003c diff \u003c interval:"},{"line_number":113,"context_line":"            # wait at most \"interval\" seconds between individual pings"},{"line_number":114,"context_line":"            time.sleep(interval - diff)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_1b8db27b","line":112,"range":{"start_line":112,"start_character":11,"end_line":112,"end_character":19},"updated":"2016-06-10 07:33:22.000000000","message":"Nit: This is always True","commit_id":"2dcacaae88970365350200ca58982a18e21c703d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"84fb92f8c4bed5b174fdf85af585132ecdf8b304","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                     dst_ip])"},{"line_number":110,"context_line":"        end_time \u003d time.time()"},{"line_number":111,"context_line":"        diff \u003d end_time - start_time"},{"line_number":112,"context_line":"        if 0 \u003c diff \u003c interval:"},{"line_number":113,"context_line":"            # wait at most \"interval\" seconds between individual pings"},{"line_number":114,"context_line":"            time.sleep(interval - diff)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_e9d75a21","line":112,"range":{"start_line":112,"start_character":11,"end_line":112,"end_character":19},"in_reply_to":"5a9d85d2_d334d1df","updated":"2016-06-20 13:01:33.000000000","message":"Aha, didn\u0027t know that. Thanks :)","commit_id":"2dcacaae88970365350200ca58982a18e21c703d"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"e75fb87af17550f1018607d644f5bd9fe78f0d72","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                     dst_ip])"},{"line_number":110,"context_line":"        end_time \u003d time.time()"},{"line_number":111,"context_line":"        diff \u003d end_time - start_time"},{"line_number":112,"context_line":"        if 0 \u003c diff \u003c interval:"},{"line_number":113,"context_line":"            # wait at most \"interval\" seconds between individual pings"},{"line_number":114,"context_line":"            time.sleep(interval - diff)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_d334d1df","line":112,"range":{"start_line":112,"start_character":11,"end_line":112,"end_character":19},"in_reply_to":"7aa08908_1b8db27b","updated":"2016-06-20 12:06:43.000000000","message":"Usually it is, yet it can rarely be negative. See documentation of time.time() [1]:\n\n\"While this function normally returns non-decreasing values, it can return a lower value than a previous call if the system clock has been set back between the two calls.\"\n\n[1] https://docs.python.org/2/library/time.html#time.time","commit_id":"2dcacaae88970365350200ca58982a18e21c703d"}]}
