)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b38f5338931f43d8ef8c45e91a259fa3a8d164be","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"agent: use psutil to avoid shell out to a find a child process"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This method is being called regularly (once a second) and"},{"line_number":10,"context_line":"goes through a fork/close_fds/exec loop just to call /bin/ps"},{"line_number":11,"context_line":"in order to find the list of child pids. We can have that easier"},{"line_number":12,"context_line":"avoiding all the subprocess overhead by using psutil."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3f79a3b5_9e89cfc8","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":11},"updated":"2018-10-19 01:26:13.000000000","message":"The method now is essential and important to the neutron agents, it\u0027s better to add a LP but to trace such change.","commit_id":"420400017f940dfcfff8bba67a5894eeda87fde9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b38f5338931f43d8ef8c45e91a259fa3a8d164be","unresolved":false,"context_lines":[{"line_number":11,"context_line":"in order to find the list of child pids. We can have that easier"},{"line_number":12,"context_line":"avoiding all the subprocess overhead by using psutil."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"in a cProfile micro-benchmark, it seems using psutil is"},{"line_number":15,"context_line":"also about 30% faster."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ic9a270634c8568676f7cb8322676a79605334516"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3f79a3b5_5ebd7765","line":15,"range":{"start_line":14,"start_character":0,"end_line":15,"end_character":22},"updated":"2018-10-19 01:26:13.000000000","message":"Thanks for the testing, this is really a good news for us.","commit_id":"420400017f940dfcfff8bba67a5894eeda87fde9"}],"neutron/agent/linux/utils.py":[{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"f2f953dd4693407520f84e341b810dcde6a97974","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            try:"},{"line_number":277,"context_line":"                # We shouldn\u0027t have more than one child per process"},{"line_number":278,"context_line":"                # so keep getting the children of the first one"},{"line_number":279,"context_line":"                pid \u003d find_child_pids(pid)[0]"},{"line_number":280,"context_line":"            except IndexError:"},{"line_number":281,"context_line":"                return  # We never found the child pid with expected_cmd"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_a9501e0b","side":"PARENT","line":279,"range":{"start_line":279,"start_character":22,"end_line":279,"end_character":37},"updated":"2018-10-18 18:32:30.000000000","message":"I wonder if it is possible to leave this call untouched and replace the implementation of method \u0027find_child_pids\u0027 instead. In this way, the change will be beneficial to all callers of \u0027find_child_pids\u0027.","commit_id":"f253d676b8f96b52f16382830349da50c3e366bc"},{"author":{"_account_id":6593,"name":"Dirk Mueller","email":"dirk@dmllr.de","username":"dmllr"},"change_message_id":"604c0eccd329a1e7c4ed9291982ccced6be2294c","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            try:"},{"line_number":277,"context_line":"                # We shouldn\u0027t have more than one child per process"},{"line_number":278,"context_line":"                # so keep getting the children of the first one"},{"line_number":279,"context_line":"                pid \u003d find_child_pids(pid)[0]"},{"line_number":280,"context_line":"            except IndexError:"},{"line_number":281,"context_line":"                return  # We never found the child pid with expected_cmd"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_aa2c8d93","side":"PARENT","line":279,"range":{"start_line":279,"start_character":22,"end_line":279,"end_character":37},"in_reply_to":"3f79a3b5_04d25734","updated":"2018-10-18 20:10:52.000000000","message":"there is only one other place outside tests, and that one could be easily removed as well. that would drop all of the code. \n\nBut your wish is my demand.. ;-)","commit_id":"f253d676b8f96b52f16382830349da50c3e366bc"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a999fb1a90046919e6222b3bf8b55873312d5afa","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            try:"},{"line_number":277,"context_line":"                # We shouldn\u0027t have more than one child per process"},{"line_number":278,"context_line":"                # so keep getting the children of the first one"},{"line_number":279,"context_line":"                pid \u003d find_child_pids(pid)[0]"},{"line_number":280,"context_line":"            except IndexError:"},{"line_number":281,"context_line":"                return  # We never found the child pid with expected_cmd"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_04d25734","side":"PARENT","line":279,"range":{"start_line":279,"start_character":22,"end_line":279,"end_character":37},"in_reply_to":"3f79a3b5_a9501e0b","updated":"2018-10-18 19:42:59.000000000","message":"+1 to Hongbin. This function is uses in couple other places in Neutron also","commit_id":"f253d676b8f96b52f16382830349da50c3e366bc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b38f5338931f43d8ef8c45e91a259fa3a8d164be","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    running, re-parented to init, so the only way to ensure that both"},{"line_number":271,"context_line":"    die is to target the child process directly."},{"line_number":272,"context_line":"    \"\"\""},{"line_number":273,"context_line":"    pid \u003d str(pid)"},{"line_number":274,"context_line":"    if run_as_root:"},{"line_number":275,"context_line":"        while True:"},{"line_number":276,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_1e6cdf05","side":"PARENT","line":273,"range":{"start_line":273,"start_character":4,"end_line":273,"end_character":18},"updated":"2018-10-19 01:26:13.000000000","message":"Seems that psutil does not accept str pid, so it\u0027s better to convert all the pid to intger here:\npid \u003d int(pid)\nto prevent some caller passing a str pid to this function.","commit_id":"f253d676b8f96b52f16382830349da50c3e366bc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b38f5338931f43d8ef8c45e91a259fa3a8d164be","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from oslo_utils import encodeutils"},{"line_number":32,"context_line":"from oslo_utils import excutils"},{"line_number":33,"context_line":"from oslo_utils import fileutils"},{"line_number":34,"context_line":"import psutil"},{"line_number":35,"context_line":"from six.moves import http_client as httplib"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"from neutron._i18n import _"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_f9025d08","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":13},"updated":"2018-10-19 01:26:13.000000000","message":"This is a python built-in module? Or you need add this to the requirements.txt.","commit_id":"420400017f940dfcfff8bba67a5894eeda87fde9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"f2ba735e788bd9255d61cb091ebd26f5b4d940c9","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from oslo_utils import encodeutils"},{"line_number":32,"context_line":"from oslo_utils import excutils"},{"line_number":33,"context_line":"from oslo_utils import fileutils"},{"line_number":34,"context_line":"import psutil"},{"line_number":35,"context_line":"from six.moves import http_client as httplib"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"from neutron._i18n import _"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_d18e5579","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":13},"in_reply_to":"3f79a3b5_9f89c9c8","updated":"2018-10-19 05:16:49.000000000","message":"Sorry, I missed it.","commit_id":"420400017f940dfcfff8bba67a5894eeda87fde9"},{"author":{"_account_id":6593,"name":"Dirk Mueller","email":"dirk@dmllr.de","username":"dmllr"},"change_message_id":"6b59745dbe72fd4e096eec26673c90502c10270a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from oslo_utils import encodeutils"},{"line_number":32,"context_line":"from oslo_utils import excutils"},{"line_number":33,"context_line":"from oslo_utils import fileutils"},{"line_number":34,"context_line":"import psutil"},{"line_number":35,"context_line":"from six.moves import http_client as httplib"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"from neutron._i18n import _"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_9f89c9c8","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":13},"in_reply_to":"3f79a3b5_f9025d08","updated":"2018-10-19 04:57:52.000000000","message":"https://git.openstack.org/cgit/openstack/neutron/tree/requirements.txt#n48","commit_id":"420400017f940dfcfff8bba67a5894eeda87fde9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"de2169d0a678020ff170a13aa0523b5cdcd2c948","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            try:"},{"line_number":254,"context_line":"                # We shouldn\u0027t have more than one child per process"},{"line_number":255,"context_line":"                # so keep getting the children of the first one"},{"line_number":256,"context_line":"                pid \u003d psutil.Process(pid).children()[0].pid"},{"line_number":257,"context_line":"            except (psutil.NoSuchProcess, IndexError):"},{"line_number":258,"context_line":"                return  # We never found the child pid with expected_cmd"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_1a4b60b2","line":256,"range":{"start_line":256,"start_character":37,"end_line":256,"end_character":40},"updated":"2018-10-22 12:30:48.000000000","message":"Please see my comment here:\nhttps://review.openstack.org/#/c/611690/2/neutron/agent/linux/utils.py@a273\n\n \u003e Seems that psutil does not accept str pid, so it\u0027s better to\n \u003e convert all the pid to intger here:\n \u003e pid \u003d int(pid)\n \u003e to prevent some caller passing a str pid to this function.\n\n\n\nAnd the test shows that indeed users can give a string pid here:\nhttp://logs.openstack.org/90/611690/4/check/openstack-tox-py27/8e07c10/testr_results.html.gz#test__kill_listen_processes_parents_and_childs","commit_id":"eee117e33eafa8843f9ab25ed4956c5ec09f738e"}],"neutron/tests/unit/agent/linux/test_utils.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"2f0f466810716c78539c215a76d34cf5318f30c2","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import socket"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import mock"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import psutil"},{"line_number":22,"context_line":"import six"},{"line_number":23,"context_line":"import testtools"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_e3da991a","line":20,"updated":"2018-10-19 19:56:54.000000000","message":"Is this going to generate a pep8 error?  I don\u0027t see os used anywhere.","commit_id":"40c50c78f5af15ffbca314eea7dca415049c9009"}]}
