)]}'
{"neutron/agent/linux/utils.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"655f0c96f31b81ba555c3f328d8b79ecb6535888","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"def cmd_matches_expected(cmd, expected_cmd, process_name):"},{"line_number":343,"context_line":"    abs_cmd \u003d remove_abs_path(cmd)"},{"line_number":344,"context_line":"    abs_expected_cmd \u003d remove_abs_path(expected_cmd)"},{"line_number":345,"context_line":"    if process_name and abs_cmd[0] \u003d\u003d process_name:"},{"line_number":346,"context_line":"        # If Neutron has defined the title (setproctitle) of the running"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_25b9c32d","line":343,"range":{"start_line":343,"start_character":14,"end_line":343,"end_character":29},"updated":"2020-11-04 05:23:52.000000000","message":"this also doesn\u0027t expect process name as cmd[0]. Would get_cmdline_from_pid() be better place to strip process name and \u0027(\u0027 \u0027)\u0027?","commit_id":"a1894bf96ccdf7010d1cc3397bd80ab55cd3328e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"bed6fa408198e3b2684cc4fcdfd4d078a7fe728f","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"def cmd_matches_expected(cmd, expected_cmd, process_name):"},{"line_number":343,"context_line":"    abs_cmd \u003d remove_abs_path(cmd)"},{"line_number":344,"context_line":"    abs_expected_cmd \u003d remove_abs_path(expected_cmd)"},{"line_number":345,"context_line":"    if process_name and abs_cmd[0] \u003d\u003d process_name:"},{"line_number":346,"context_line":"        # If Neutron has defined the title (setproctitle) of the running"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_b9a3339e","line":343,"range":{"start_line":343,"start_character":14,"end_line":343,"end_character":29},"in_reply_to":"1f621f24_057da2e6","updated":"2020-11-04 16:18:25.000000000","message":"I don\u0027t think so. \"get_cmdline_from_pid\" should return what is printed in \"ps\" (or in this case what is stored in /proc/%s/cmdline). I think this method should return the string stored, nothing else.","commit_id":"a1894bf96ccdf7010d1cc3397bd80ab55cd3328e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e21b6aa3c7f333301db7fd4ccb824c88f14f9697","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"def cmd_matches_expected(cmd, expected_cmd, process_name):"},{"line_number":343,"context_line":"    abs_cmd \u003d remove_abs_path(cmd)"},{"line_number":344,"context_line":"    abs_expected_cmd \u003d remove_abs_path(expected_cmd)"},{"line_number":345,"context_line":"    if process_name and abs_cmd[0] \u003d\u003d process_name:"},{"line_number":346,"context_line":"        # If Neutron has defined the title (setproctitle) of the running"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_df78972b","line":343,"range":{"start_line":343,"start_character":14,"end_line":343,"end_character":29},"in_reply_to":"1f621f24_25b9c32d","updated":"2020-11-04 10:03:33.000000000","message":"\"get_cmdline_from_pid\" should honour its name and should only retrieve the command line. Is this method, \"cmd_matches_expected\", which should take care of this process_name (as implemented now) when comparing the expected cmd.","commit_id":"a1894bf96ccdf7010d1cc3397bd80ab55cd3328e"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"bbf1577de36c9ec0997432bc6a07f5bcf7ed6662","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"def cmd_matches_expected(cmd, expected_cmd, process_name):"},{"line_number":343,"context_line":"    abs_cmd \u003d remove_abs_path(cmd)"},{"line_number":344,"context_line":"    abs_expected_cmd \u003d remove_abs_path(expected_cmd)"},{"line_number":345,"context_line":"    if process_name and abs_cmd[0] \u003d\u003d process_name:"},{"line_number":346,"context_line":"        # If Neutron has defined the title (setproctitle) of the running"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_1923fd57","line":343,"range":{"start_line":343,"start_character":14,"end_line":343,"end_character":29},"in_reply_to":"1f621f24_86ec06f4","updated":"2020-11-11 08:35:46.000000000","message":"but will this work if original cmd is not prefixed with the script executable? Like \"[\u0027neutron-dhcp-agent\u0027, \u0027(/home/zuul/src...)\u0027]\" then at line 352 it will be \"[\u0027/home/zuul/src...\u0027]\" (abs path not removed), right? Then we\u0027ll get IndexError or just false negative result, I guess (given abs_expected_cmd has abs path removed at #344)","commit_id":"a1894bf96ccdf7010d1cc3397bd80ab55cd3328e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5700232f3a7eb19b5a5429e5b1a22786dac892fd","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"def cmd_matches_expected(cmd, expected_cmd, process_name):"},{"line_number":343,"context_line":"    abs_cmd \u003d remove_abs_path(cmd)"},{"line_number":344,"context_line":"    abs_expected_cmd \u003d remove_abs_path(expected_cmd)"},{"line_number":345,"context_line":"    if process_name and abs_cmd[0] \u003d\u003d process_name:"},{"line_number":346,"context_line":"        # If Neutron has defined the title (setproctitle) of the running"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_86ec06f4","line":343,"range":{"start_line":343,"start_character":14,"end_line":343,"end_character":29},"in_reply_to":"1f621f24_97a39b9e","updated":"2020-11-10 23:22:40.000000000","message":"I will work because it matches L352, when the process name is already removed and the parenthesis. Then, the remaining string is again processed by \"remove_abs_path\"\n\nBut I\u0027ll move this process name removal to the beginning of the method.","commit_id":"a1894bf96ccdf7010d1cc3397bd80ab55cd3328e"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b9fe9158577b4124692e45c05b610e953789e948","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"def cmd_matches_expected(cmd, expected_cmd, process_name):"},{"line_number":343,"context_line":"    abs_cmd \u003d remove_abs_path(cmd)"},{"line_number":344,"context_line":"    abs_expected_cmd \u003d remove_abs_path(expected_cmd)"},{"line_number":345,"context_line":"    if process_name and abs_cmd[0] \u003d\u003d process_name:"},{"line_number":346,"context_line":"        # If Neutron has defined the title (setproctitle) of the running"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_97a39b9e","line":343,"range":{"start_line":343,"start_character":14,"end_line":343,"end_character":29},"in_reply_to":"1f621f24_b9a3339e","updated":"2020-11-05 06:03:02.000000000","message":"ok I won\u0027t argue about get_cmdline_from_pid. Do you think remove_abs_path() will work correctly if passed cmd is [\u0027neutron-dhcp-agent\u0027, \u0027(python\u0027, \u0027/home/zuul/src...\u0027] instead of [\u0027python\u0027, \u0027/home/zuul/src...\u0027]?","commit_id":"a1894bf96ccdf7010d1cc3397bd80ab55cd3328e"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e96ec1618bbd213096aa5cbbe0bb7e5f3d473341","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"def cmd_matches_expected(cmd, expected_cmd, process_name):"},{"line_number":343,"context_line":"    abs_cmd \u003d remove_abs_path(cmd)"},{"line_number":344,"context_line":"    abs_expected_cmd \u003d remove_abs_path(expected_cmd)"},{"line_number":345,"context_line":"    if process_name and abs_cmd[0] \u003d\u003d process_name:"},{"line_number":346,"context_line":"        # If Neutron has defined the title (setproctitle) of the running"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_057da2e6","line":343,"range":{"start_line":343,"start_character":14,"end_line":343,"end_character":29},"in_reply_to":"1f621f24_df78972b","updated":"2020-11-04 12:22:57.000000000","message":"\u003e \"get_cmdline_from_pid\" should honour its name and should only retrieve the command line. \n\nagree, but in case of process_name it will return \"\u003cprocess_name\u003e (cmd)\" according to your comment #346. I think it should return just cmd.\n\nAlso if cmd[0] is process_name then remove_abs_path() won\u0027t work correctly. Am I missing something?","commit_id":"a1894bf96ccdf7010d1cc3397bd80ab55cd3328e"}]}
