)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"6ecf2216613d5feb0de45ad37da8694c6c9e200a","unresolved":false,"context_lines":[{"line_number":27,"context_line":"backdoor_port\u003d8002"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"We can later print the stats from the trace file like below"},{"line_number":30,"context_line":"stats \u003d pstats.Stats(\u0027neutron0imTJk.prof\u0027)"},{"line_number":31,"context_line":"stats.print_stats()"},{"line_number":32,"context_line":"The trace file will look like (for above neutron API calls) [1]"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bfdaf3ff_bd926b4a","line":30,"range":{"start_line":30,"start_character":22,"end_line":30,"end_character":40},"updated":"2019-01-15 06:50:20.000000000","message":"Shouldn\u0027t this start with \u0027/tmp/\u0027?","commit_id":"d2eeac1400d86ab6215166493054750474a5c351"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"01bcf4a06cca819797346b3528e7fbee7a48fa09","unresolved":false,"context_lines":[{"line_number":27,"context_line":"backdoor_port\u003d8002"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"We can later print the stats from the trace file like below"},{"line_number":30,"context_line":"stats \u003d pstats.Stats(\u0027neutron0imTJk.prof\u0027)"},{"line_number":31,"context_line":"stats.print_stats()"},{"line_number":32,"context_line":"The trace file will look like (for above neutron API calls) [1]"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bfdaf3ff_ca6f4b90","line":30,"range":{"start_line":30,"start_character":22,"end_line":30,"end_character":40},"in_reply_to":"bfdaf3ff_bd926b4a","updated":"2019-01-16 08:28:40.000000000","message":"yes","commit_id":"d2eeac1400d86ab6215166493054750474a5c351"}],"doc/source/user/usage.rst":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"25ed8d19f7c9eabc9b371b9e0be832f549546357","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    $ echo \"prof()\" | nc localhost 8002"},{"line_number":205,"context_line":"    $ neutron net-create n1; neutron port-create --name p1 n1;"},{"line_number":206,"context_line":"    $ neutron port-delete p1; neutron port-delete p1"},{"line_number":207,"context_line":"    $ echo \"prof(\u0027neutron\u0027)\" | nc localhost 8002"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"This will generate \"/tmp/neutron.prof\" as stats file. Later user can print"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bfdaf3ff_ad6a21b0","line":207,"range":{"start_line":207,"start_character":17,"end_line":207,"end_character":26},"updated":"2019-01-16 09:20:43.000000000","message":"A bit of nitpicking mostly: \nmay be it\u0027s better if we provide the full path here to the profile output?\nOtherwise it can be confusing, or may be users want to store them in a certain \"non-tmp\" place.","commit_id":"5249d058bbd451d38d7328a2fb08e20c3708ba7e"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"43d11353057a726bfc3874f5a3fe975e8bd617db","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    $ echo \"prof()\" | nc localhost 8002"},{"line_number":205,"context_line":"    $ neutron net-create n1; neutron port-create --name p1 n1;"},{"line_number":206,"context_line":"    $ neutron port-delete p1; neutron port-delete p1"},{"line_number":207,"context_line":"    $ echo \"prof(\u0027neutron\u0027)\" | nc localhost 8002"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"This will generate \"/tmp/neutron.prof\" as stats file. Later user can print"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bfdaf3ff_f80ea58b","line":207,"range":{"start_line":207,"start_character":17,"end_line":207,"end_character":26},"in_reply_to":"bfdaf3ff_ad6a21b0","updated":"2019-01-16 10:48:51.000000000","message":"We wanted to confine it to write to only to /tmp directory as per concerns raised here\nhttps://review.openstack.org/#/c/627414/3/oslo_service/eventlet_backdoor.py","commit_id":"5249d058bbd451d38d7328a2fb08e20c3708ba7e"}],"oslo_service/eventlet_backdoor.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"0877e004e22266e69c0d812eacbd22cbb3f56212","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        yappi.set_context_name_callback("},{"line_number":101,"context_line":"            lambda: greenlet.getcurrent().__class__.__name__)"},{"line_number":102,"context_line":"        yappi.start()"},{"line_number":103,"context_line":"    else:"},{"line_number":104,"context_line":"        yappi.stop()"},{"line_number":105,"context_line":"        stats \u003d yappi.get_func_stats()"},{"line_number":106,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f769fc5_c6d779bf","line":103,"updated":"2019-01-01 22:22:25.000000000","message":"Would it make sense to have separate trace/dump_trace commands rather than make one do double duty?\n\nWhat happens if trace is called twice without any arguments?","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"7bba0ccd5f8e4dc44e1eaf0196de80859ebfd384","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        yappi.set_context_name_callback("},{"line_number":101,"context_line":"            lambda: greenlet.getcurrent().__class__.__name__)"},{"line_number":102,"context_line":"        yappi.start()"},{"line_number":103,"context_line":"    else:"},{"line_number":104,"context_line":"        yappi.stop()"},{"line_number":105,"context_line":"        stats \u003d yappi.get_func_stats()"},{"line_number":106,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffd0ebdf_bbf95b4e","line":103,"in_reply_to":"1f769fc5_c6d779bf","updated":"2019-01-03 06:13:04.000000000","message":"echo -e \"trace()\" | nc localhost 8025\nneutron net-delete 20ab4d8b-eb76-4bea-8367-002f428251da\necho -e \"trace()\" | nc localhost 8025\nneutron net-delete 66a7baf2-e9cd-4458-a4a0-36bf4bdcd94e\necho -e \"trace()\" | nc localhost 8025\nneutron net-delete 1436a3ca-0dc9-4b7c-84ef-28c28337bafb\necho -e \"trace(\u0027/tmp/trace2\u0027)\" | nc localhost 8025\n\nBut still in the stats file I can see delete_network called 3 times i.e\n        3    0.000    0.000   28.360    9.453 /usr/lib/python2.7/site-packages/neutron/plugins/ml2/plugin.py:1077(Ml2Plugin.delete_network)\n        3    0.001    0.000   28.359    9.453 /usr/lib/python2.7/site-packages/neutron/db/db_base_plugin_v2.py:462(Ml2Plugin.delete_network)\n\nSo later calls to trace without arguments are insignificant.\nSo I feel one command is sufficient for now. May be we can enhance it later.","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"0877e004e22266e69c0d812eacbd22cbb3f56212","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        yappi.stop()"},{"line_number":105,"context_line":"        stats \u003d yappi.get_func_stats()"},{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            stats.save(trace_file, \"pstat\")"},{"line_number":108,"context_line":"        except Exception as e:"},{"line_number":109,"context_line":"            print(\"Error while saving the trace stats \", str(e))"},{"line_number":110,"context_line":"        yappi.clear_stats()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f769fc5_46ccc934","line":107,"updated":"2019-01-01 22:22:25.000000000","message":"I get that the eventlet backdoor is only supposed to be enabled for debugging purposes, but the ability to write to an arbitrary location still makes me nervous from a security perspective. Can we perhaps confine it to /tmp?","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"7bba0ccd5f8e4dc44e1eaf0196de80859ebfd384","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        yappi.stop()"},{"line_number":105,"context_line":"        stats \u003d yappi.get_func_stats()"},{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            stats.save(trace_file, \"pstat\")"},{"line_number":108,"context_line":"        except Exception as e:"},{"line_number":109,"context_line":"            print(\"Error while saving the trace stats \", str(e))"},{"line_number":110,"context_line":"        yappi.clear_stats()"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffd0ebdf_db877fb6","line":107,"in_reply_to":"1f769fc5_46ccc934","updated":"2019-01-03 06:13:04.000000000","message":"That\u0027s a valid concern. I will update it to write to only /tmp directory.","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"0877e004e22266e69c0d812eacbd22cbb3f56212","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        \u0027fo\u0027: _find_objects,"},{"line_number":184,"context_line":"        \u0027pgt\u0027: _print_greenthreads,"},{"line_number":185,"context_line":"        \u0027pnt\u0027: _print_nativethreads,"},{"line_number":186,"context_line":"        \u0027trace\u0027: _trace,"},{"line_number":187,"context_line":"    }"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    if conf.backdoor_port is None and conf.backdoor_socket is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f769fc5_a6da7de6","line":186,"updated":"2019-01-01 22:22:25.000000000","message":"I wonder if \u0027prof\u0027 would be a more descriptive name than \u0027trace\u0027?","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"7bba0ccd5f8e4dc44e1eaf0196de80859ebfd384","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        \u0027fo\u0027: _find_objects,"},{"line_number":184,"context_line":"        \u0027pgt\u0027: _print_greenthreads,"},{"line_number":185,"context_line":"        \u0027pnt\u0027: _print_nativethreads,"},{"line_number":186,"context_line":"        \u0027trace\u0027: _trace,"},{"line_number":187,"context_line":"    }"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    if conf.backdoor_port is None and conf.backdoor_socket is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffd0ebdf_7bc213ec","line":186,"in_reply_to":"1f769fc5_a6da7de6","updated":"2019-01-03 06:13:04.000000000","message":"agree.","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"6ecf2216613d5feb0de45ad37da8694c6c9e200a","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        # in temp directory."},{"line_number":110,"context_line":"        try:"},{"line_number":111,"context_line":"            stats.save("},{"line_number":112,"context_line":"                tempfile.mkstemp(suffix\u003d\".prof\", prefix\u003dfname)[1], \"pstat\")"},{"line_number":113,"context_line":"        except Exception as e:"},{"line_number":114,"context_line":"            print(\"Error while saving the trace stats \", str(e))"},{"line_number":115,"context_line":"        yappi.clear_stats()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bfdaf3ff_62f3020c","line":112,"updated":"2019-01-15 06:50:20.000000000","message":"We\u0027re not closing the file that mkstemp opens here, so this leaks a file descriptor.\n\nFor these purposes I think just using os.path.join(tempfile.gettempdir(), fname + \u0027.prof\u0027) is probably sufficient. When debugging it\u0027s not uncommon to want to be able to overwrite a previous file, it can be a pain when you don\u0027t know the filename in advance, and since we\u0027re not actually going to read the file again there\u0027s no obvious security-related reasons to ensure uniqueness provided that we add the \u0027.prof\u0027 to the end.","commit_id":"d2eeac1400d86ab6215166493054750474a5c351"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"01bcf4a06cca819797346b3528e7fbee7a48fa09","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        # in temp directory."},{"line_number":110,"context_line":"        try:"},{"line_number":111,"context_line":"            stats.save("},{"line_number":112,"context_line":"                tempfile.mkstemp(suffix\u003d\".prof\", prefix\u003dfname)[1], \"pstat\")"},{"line_number":113,"context_line":"        except Exception as e:"},{"line_number":114,"context_line":"            print(\"Error while saving the trace stats \", str(e))"},{"line_number":115,"context_line":"        yappi.clear_stats()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bfdaf3ff_2a0617d0","line":112,"in_reply_to":"bfdaf3ff_62f3020c","updated":"2019-01-16 08:28:40.000000000","message":"Thanks. I will update it.","commit_id":"d2eeac1400d86ab6215166493054750474a5c351"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"25ed8d19f7c9eabc9b371b9e0be832f549546357","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"def _capture_profile(fname\u003d\u0027\u0027):"},{"line_number":95,"context_line":"    if not fname:"},{"line_number":96,"context_line":"        yappi.set_clock_type(\u0027cpu\u0027)"},{"line_number":97,"context_line":"        # We need to set context to greenlet to profile greenlets"},{"line_number":98,"context_line":"        # https://bitbucket.org/sumerc/yappi/pull-requests/3"}],"source_content_type":"text/x-python","patch_set":5,"id":"bfdaf3ff_8d5f1d0d","line":95,"updated":"2019-01-16 09:20:43.000000000","message":"If the admin does it wrong (yappi was already started), may be we need to stop it first?, or warn the admin that it needs to provide a file name?","commit_id":"5249d058bbd451d38d7328a2fb08e20c3708ba7e"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"43d11353057a726bfc3874f5a3fe975e8bd617db","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"def _capture_profile(fname\u003d\u0027\u0027):"},{"line_number":95,"context_line":"    if not fname:"},{"line_number":96,"context_line":"        yappi.set_clock_type(\u0027cpu\u0027)"},{"line_number":97,"context_line":"        # We need to set context to greenlet to profile greenlets"},{"line_number":98,"context_line":"        # https://bitbucket.org/sumerc/yappi/pull-requests/3"}],"source_content_type":"text/x-python","patch_set":5,"id":"bfdaf3ff_b83fbd23","line":95,"in_reply_to":"bfdaf3ff_8d5f1d0d","updated":"2019-01-16 10:48:51.000000000","message":"As explained in https://review.openstack.org/#/c/627414/3/oslo_service/eventlet_backdoor.py\n\ncalling start mutliple times without calling stop is not a problem.","commit_id":"5249d058bbd451d38d7328a2fb08e20c3708ba7e"},{"author":{"_account_id":10061,"name":"Joe Talerico","email":"jtaleric@redhat.com","username":"rook"},"change_message_id":"74a775f6b885661c033f2b397f502abc5e6cacd8","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            stats.save(stats_file, \"pstat\")"},{"line_number":112,"context_line":"        except Exception as e:"},{"line_number":113,"context_line":"            print(\"Error while saving the trace stats \", str(e))"},{"line_number":114,"context_line":"        yappi.clear_stats()"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def _print_greenthreads(simple\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bfdaf3ff_9803d90f","line":114,"updated":"2019-01-16 11:12:20.000000000","message":"Don\u0027t we want to clear stats in any situation? maybe add finally?","commit_id":"5249d058bbd451d38d7328a2fb08e20c3708ba7e"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"f93eb8d81d7c32bf386e35a174fb766780ba5386","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            stats.save(stats_file, \"pstat\")"},{"line_number":112,"context_line":"        except Exception as e:"},{"line_number":113,"context_line":"            print(\"Error while saving the trace stats \", str(e))"},{"line_number":114,"context_line":"        yappi.clear_stats()"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def _print_greenthreads(simple\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bfdaf3ff_fea52d05","line":114,"in_reply_to":"bfdaf3ff_9803d90f","updated":"2019-01-16 12:35:05.000000000","message":"I will update.","commit_id":"5249d058bbd451d38d7328a2fb08e20c3708ba7e"}],"requirements.txt":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"0877e004e22266e69c0d812eacbd22cbb3f56212","unresolved":false,"context_lines":[{"line_number":17,"context_line":"PasteDeploy\u003e\u003d1.5.0 # MIT"},{"line_number":18,"context_line":"Routes\u003e\u003d2.3.1 # MIT"},{"line_number":19,"context_line":"Paste\u003e\u003d2.0.2 # MIT"},{"line_number":20,"context_line":"Yappi\u003e\u003d0.98 # MIT"}],"source_content_type":"text/plain","patch_set":3,"id":"1f769fc5_86e1819d","line":20,"updated":"2019-01-01 22:22:25.000000000","message":"yappi is only supported up to Python 3.4,[1] but OpenStack needs to support Python 3.6+\n\nAre the docs simply out of date, or could this be a real problem?\n\n[1] https://pypi.org/project/yappi/#limitations","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"7bba0ccd5f8e4dc44e1eaf0196de80859ebfd384","unresolved":false,"context_lines":[{"line_number":17,"context_line":"PasteDeploy\u003e\u003d1.5.0 # MIT"},{"line_number":18,"context_line":"Routes\u003e\u003d2.3.1 # MIT"},{"line_number":19,"context_line":"Paste\u003e\u003d2.0.2 # MIT"},{"line_number":20,"context_line":"Yappi\u003e\u003d0.98 # MIT"}],"source_content_type":"text/plain","patch_set":3,"id":"ffd0ebdf_c6bb220c","line":20,"in_reply_to":"1f769fc5_86e1819d","updated":"2019-01-03 06:13:04.000000000","message":"I will check","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"228795bb8d6f705303dd92137105ccf3c66808c0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"PasteDeploy\u003e\u003d1.5.0 # MIT"},{"line_number":18,"context_line":"Routes\u003e\u003d2.3.1 # MIT"},{"line_number":19,"context_line":"Paste\u003e\u003d2.0.2 # MIT"},{"line_number":20,"context_line":"Yappi\u003e\u003d0.98 # MIT"}],"source_content_type":"text/plain","patch_set":3,"id":"ffd0ebdf_a16cc89c","line":20,"in_reply_to":"ffd0ebdf_0624ca0c","updated":"2019-01-03 08:16:10.000000000","message":"Cool, I repeated your test on python3.7 with the same result.\n\nIt would be great if we could prod the maintainer into regularly running his test suite on the newer versions.","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"c6280d72563943184bed13bc8347795d6407395c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"PasteDeploy\u003e\u003d1.5.0 # MIT"},{"line_number":18,"context_line":"Routes\u003e\u003d2.3.1 # MIT"},{"line_number":19,"context_line":"Paste\u003e\u003d2.0.2 # MIT"},{"line_number":20,"context_line":"Yappi\u003e\u003d0.98 # MIT"}],"source_content_type":"text/plain","patch_set":3,"id":"ffd0ebdf_4acf227f","line":20,"in_reply_to":"ffd0ebdf_a16cc89c","updated":"2019-01-04 04:00:38.000000000","message":"Thanks Zane for testing on python3.7. sure, I will check with maintainer","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"27cbcc4dd4d1852778b6177f00cc04df814c5e2f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"PasteDeploy\u003e\u003d1.5.0 # MIT"},{"line_number":18,"context_line":"Routes\u003e\u003d2.3.1 # MIT"},{"line_number":19,"context_line":"Paste\u003e\u003d2.0.2 # MIT"},{"line_number":20,"context_line":"Yappi\u003e\u003d0.98 # MIT"}],"source_content_type":"text/plain","patch_set":3,"id":"ffd0ebdf_0624ca0c","line":20,"in_reply_to":"ffd0ebdf_c6bb220c","updated":"2019-01-03 07:02:08.000000000","message":"Thanks Zane. I have tested with python3.6 and it is working\n\nhttps://gist.github.com/venkataanil/c9f160f095ed6faaf57c446e9b339aa9#file-yappi_python3-6-txt","commit_id":"4e1895a3ca77bd926eba8049b180a4b753e57bf8"}]}
