)]}'
{"ironic/drivers/modules/console_utils.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"659bccfcca4084397d6ae3cd8c391ae67df3537d","unresolved":false,"context_lines":[{"line_number":221,"context_line":"    for pipe in outputs:"},{"line_number":222,"context_line":"        pipe_obj \u003d getattr(obj, pipe)"},{"line_number":223,"context_line":"        outputs[pipe][\u0027source\u0027] \u003d pipe_obj"},{"line_number":224,"context_line":"        flags \u003d fcntl.fcntl(pipe_obj, fcntl.F_GETFL)"},{"line_number":225,"context_line":"        fcntl.fcntl(pipe_obj, fcntl.F_SETFL, flags | os.O_NONBLOCK)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def _wait(node_uuid, popen_obj):"},{"line_number":228,"context_line":"        locals[\u0027returncode\u0027] \u003d popen_obj.poll()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_a7bc9edc","line":225,"range":{"start_line":224,"start_character":0,"end_line":225,"end_character":67},"updated":"2019-09-10 09:48:45.000000000","message":"nit: this may look cleaner as a separate func\nsomething like\nsetNonBlocking(obj.stdout)\nsetNonBlocking(obj.stderr)","commit_id":"e478cd82c74583d89cfe6bdd4d84cb39381b2531"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c35a59e6e89d277d3c76ee4370f909a3fe754e90","unresolved":false,"context_lines":[{"line_number":221,"context_line":"    for pipe in outputs:"},{"line_number":222,"context_line":"        pipe_obj \u003d getattr(obj, pipe)"},{"line_number":223,"context_line":"        outputs[pipe][\u0027source\u0027] \u003d pipe_obj"},{"line_number":224,"context_line":"        flags \u003d fcntl.fcntl(pipe_obj, fcntl.F_GETFL)"},{"line_number":225,"context_line":"        fcntl.fcntl(pipe_obj, fcntl.F_SETFL, flags | os.O_NONBLOCK)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def _wait(node_uuid, popen_obj):"},{"line_number":228,"context_line":"        locals[\u0027returncode\u0027] \u003d popen_obj.poll()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_0246c050","line":225,"range":{"start_line":224,"start_character":0,"end_line":225,"end_character":67},"in_reply_to":"5faad753_a7bc9edc","updated":"2019-09-10 10:25:49.000000000","message":"with all those dicts it won\u0027t be much nicer :)","commit_id":"e478cd82c74583d89cfe6bdd4d84cb39381b2531"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"659bccfcca4084397d6ae3cd8c391ae67df3537d","unresolved":false,"context_lines":[{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        if locals[\u0027returncode\u0027] is not None:"},{"line_number":238,"context_line":"            watched \u003d {\u0027stdout\u0027, \u0027stderr\u0027}"},{"line_number":239,"context_line":"            while time.time() \u003c expiration and watched:"},{"line_number":240,"context_line":"                for pipe in outputs:"},{"line_number":241,"context_line":"                    if pipe not in watched:"},{"line_number":242,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_27d0ae1f","line":239,"range":{"start_line":239,"start_character":12,"end_line":239,"end_character":55},"updated":"2019-09-10 09:48:45.000000000","message":"It seems that while loop can create big cpu load without any no-op inside. It continuously makes non-blocking reads for 10 sec by default, so if there is some delay on server side ...\nI believe time.sleep should be inserted.","commit_id":"e478cd82c74583d89cfe6bdd4d84cb39381b2531"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c35a59e6e89d277d3c76ee4370f909a3fe754e90","unresolved":false,"context_lines":[{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        if locals[\u0027returncode\u0027] is not None:"},{"line_number":238,"context_line":"            watched \u003d {\u0027stdout\u0027, \u0027stderr\u0027}"},{"line_number":239,"context_line":"            while time.time() \u003c expiration and watched:"},{"line_number":240,"context_line":"                for pipe in outputs:"},{"line_number":241,"context_line":"                    if pipe not in watched:"},{"line_number":242,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_e26364db","line":239,"range":{"start_line":239,"start_character":12,"end_line":239,"end_character":55},"in_reply_to":"5faad753_27d0ae1f","updated":"2019-09-10 10:25:49.000000000","message":"yeah probably we could check the length of the data read, if it is what we requested (4096 bytes) we don\u0027t sleep, if it is less - we do, but 10 seconds interval when reading by 4096 byte chunks seems kinda hight default.","commit_id":"e478cd82c74583d89cfe6bdd4d84cb39381b2531"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"49ab8f486863c6cf7062608e71e7c8e1c4b76094","unresolved":false,"context_lines":[{"line_number":251,"context_line":"            \u0027node\u0027: node_uuid,"},{"line_number":252,"context_line":"            \u0027command\u0027: \u0027 \u0027.join(args)}"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    stdout_pipe, stderr_pipe \u003d ("},{"line_number":255,"context_line":"        _PopenNonblockingPipe(obj.stdout), _PopenNonblockingPipe(obj.stderr))"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def _wait(node_uuid, popen_obj):"},{"line_number":258,"context_line":"        locals[\u0027returncode\u0027] \u003d popen_obj.poll()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5faad753_771ddc64","line":255,"range":{"start_line":254,"start_character":0,"end_line":255,"end_character":77},"updated":"2019-09-11 08:50:14.000000000","message":"I like this","commit_id":"efc2d5fcd3e4c3d8e24801b45f61f7f747b7f340"}]}
