)]}'
{"tools/logparse.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"a44681205130b1f9cd15efc52a497577c9208dca","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # \"Running cmd (subprocess): sudo nova-rootwrap\""},{"line_number":78,"context_line":"        self.call_count \u003d 0"},{"line_number":79,"context_line":"        self.rootwrap_re \u003d re.compile("},{"line_number":80,"context_line":"            \u0027Running cmd .* nova-rootwrap\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def parse_line(self, line):"},{"line_number":83,"context_line":"        if self.rootwrap_re.search(line) is not None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a98d1f4_165ee911","line":80,"updated":"2016-09-30 15:18:21.000000000","message":"Possibly, it can be without .*. Simple string \"Running cmd (subprocess): sudo nova-rootwrap\".\nI see two places in nova:\nhttps://github.com/openstack/nova/blob/master/nova/utils.py#L239\nhttps://github.com/openstack/nova/blob/master/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py#L73\nThe second can be modified.","commit_id":"32aa9e7e7cd6624086e3920141d52d7f86d8b8f3"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f59ebc5c82585fe1ab93fc5c61762e2902c84385","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # \"Running cmd (subprocess): sudo nova-rootwrap\""},{"line_number":78,"context_line":"        self.call_count \u003d 0"},{"line_number":79,"context_line":"        self.rootwrap_re \u003d re.compile("},{"line_number":80,"context_line":"            \u0027Running cmd .* nova-rootwrap\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def parse_line(self, line):"},{"line_number":83,"context_line":"        if self.rootwrap_re.search(line) is not None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a98d1f4_d8d3c302","line":80,"in_reply_to":"3a98d1f4_165ee911","updated":"2016-09-30 15:56:35.000000000","message":"I didn\u0027t look at where this was generated to make sure that it would always be exactly the same. I was concerned that in some places the sudo would not be necessary and therefore not used. I\u0027ll take a look but if it\u0027s guaranteed to be the same every time then I\u0027ll update.","commit_id":"32aa9e7e7cd6624086e3920141d52d7f86d8b8f3"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"a44681205130b1f9cd15efc52a497577c9208dca","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        self.periodic_re \u003d re.compile(\u0027Running periodic task\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def parse_line(self, line):"},{"line_number":131,"context_line":"        if self.periodic_re.search(line) is not None:"},{"line_number":132,"context_line":"            self.runs +\u003d 1"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def stats(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a98d1f4_16d7c9ed","line":131,"updated":"2016-09-30 15:18:21.000000000","message":"This can be done without regex at all.\nIt\u0027s almost two times faster (http://ix.io/1rPn) for non-matching lines.\nThe same for the MessageParser.","commit_id":"32aa9e7e7cd6624086e3920141d52d7f86d8b8f3"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f59ebc5c82585fe1ab93fc5c61762e2902c84385","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        self.periodic_re \u003d re.compile(\u0027Running periodic task\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def parse_line(self, line):"},{"line_number":131,"context_line":"        if self.periodic_re.search(line) is not None:"},{"line_number":132,"context_line":"            self.runs +\u003d 1"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def stats(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a98d1f4_18f0cbc8","line":131,"in_reply_to":"3a98d1f4_16d7c9ed","updated":"2016-09-30 15:56:35.000000000","message":"Sure, I can update these.","commit_id":"32aa9e7e7cd6624086e3920141d52d7f86d8b8f3"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"a44681205130b1f9cd15efc52a497577c9208dca","unresolved":false,"context_lines":[{"line_number":141,"context_line":"class RequestIdsParser(BaseParser):"},{"line_number":142,"context_line":"    def __init__(self):"},{"line_number":143,"context_line":"        self.ids \u003d set()"},{"line_number":144,"context_line":"        self.id_re \u003d re.compile(r\u0027(req-\\S+)\u0027)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def parse_line(self, line):"},{"line_number":147,"context_line":"        match \u003d self.id_re.search(line)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a98d1f4_e760e203","line":144,"updated":"2016-09-30 15:18:21.000000000","message":"nit: Why we need the parens here?","commit_id":"32aa9e7e7cd6624086e3920141d52d7f86d8b8f3"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f59ebc5c82585fe1ab93fc5c61762e2902c84385","unresolved":false,"context_lines":[{"line_number":141,"context_line":"class RequestIdsParser(BaseParser):"},{"line_number":142,"context_line":"    def __init__(self):"},{"line_number":143,"context_line":"        self.ids \u003d set()"},{"line_number":144,"context_line":"        self.id_re \u003d re.compile(r\u0027(req-\\S+)\u0027)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def parse_line(self, line):"},{"line_number":147,"context_line":"        match \u003d self.id_re.search(line)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a98d1f4_98a93b93","line":144,"in_reply_to":"3a98d1f4_e760e203","updated":"2016-09-30 15:56:35.000000000","message":"The parens create a grouping so we can get this string with match.group(0) on line 149 below.","commit_id":"32aa9e7e7cd6624086e3920141d52d7f86d8b8f3"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"76e49bb2bf6616b40c33cfd23c544db6a6e5acc3","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        self.error_count \u003d 0"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"class RootwrapParser(BaseParser):"},{"line_number":76,"context_line":"    def __init__(self):"},{"line_number":77,"context_line":"        # \"Running cmd (subprocess): sudo nova-rootwrap\""},{"line_number":78,"context_line":"        self.call_count \u003d 0"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a98d1f4_c968fbf7","line":75,"range":{"start_line":75,"start_character":6,"end_line":75,"end_character":20},"updated":"2016-10-04 08:04:54.000000000","message":"I think it would be good to add more stats on that, e.g. frequencies of command execution","commit_id":"3a2e2f2fbe0134ed460891a33793fe04b572bf26"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"ca57a93969d975e3f03031d97fbc79cbac034308","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        self.error_count \u003d 0"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"class RootwrapParser(BaseParser):"},{"line_number":76,"context_line":"    def __init__(self):"},{"line_number":77,"context_line":"        # \"Running cmd (subprocess): sudo nova-rootwrap\""},{"line_number":78,"context_line":"        self.call_count \u003d 0"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a98d1f4_6519bc22","line":75,"range":{"start_line":75,"start_character":6,"end_line":75,"end_character":20},"in_reply_to":"3a98d1f4_c968fbf7","updated":"2016-10-04 12:24:44.000000000","message":"Sure. I\u0027m happy to expand this out, or for anyone to propose modifications.","commit_id":"3a2e2f2fbe0134ed460891a33793fe04b572bf26"}],"tools/post_test_hook.sh":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"b388ec1d5aefed9841835f628483a925ee2b6acd","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"sudo $BASE/new/nova/tools/logparse.py"}],"source_content_type":"text/x-sh","patch_set":2,"id":"5a8bc5a2_2d621417","line":3,"updated":"2016-09-28 11:52:38.000000000","message":"I thought that sudo is removed by this point in the run","commit_id":"7fe9f076400683e430f99555aeacceda03cf33b9"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"44b8ddaecf5482274895f36ab65295dc48dde570","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"sudo $BASE/new/nova/tools/logparse.py"}],"source_content_type":"text/x-sh","patch_set":2,"id":"3a98d1f4_2113cf0e","line":3,"in_reply_to":"3a98d1f4_bfe113d3","updated":"2016-09-29 18:48:04.000000000","message":"http://logs.openstack.org/31/376531/7/check/gate-tempest-dsvm-neutron-placement-full-ubuntu-xenial-nv/88778e7/logs/devstack-gate-post_test_hook.txt.gz#_2016-09-29_18_35_48_437\n\nPermission denied without the use of sudo.","commit_id":"7fe9f076400683e430f99555aeacceda03cf33b9"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"c94424722793843c232aa5bce4ba76e8d5742df5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"sudo $BASE/new/nova/tools/logparse.py"}],"source_content_type":"text/x-sh","patch_set":2,"id":"3a98d1f4_bfe113d3","line":3,"in_reply_to":"5a8bc5a2_2d621417","updated":"2016-09-28 12:46:45.000000000","message":"When attempting this in my PoC patch which hijacked the live-migration post_test_hook logparse.py couldn\u0027t access the log files due to permission issues and using sudo worked. However it\u0027s not very clear to me what the actual environment looks like in terms of file owners and what user processes are run as. If this can be done without sudo that\u0027s certainly preferable.","commit_id":"7fe9f076400683e430f99555aeacceda03cf33b9"}]}
