)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"a6219af04f8b5e8da5c561c4f2a12fb674fb7a31","unresolved":false,"context_lines":[{"line_number":11,"context_line":"using rootwrap. This is a way too long, and can be replaced by some calls"},{"line_number":12,"context_line":"to ip using the -batch option."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Close-Bug: #1807396"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ic1c59a67aed6245b070640d7c63a8a96ac234279"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3f79a3b5_24d349d6","line":14,"updated":"2018-12-07 16:36:14.000000000","message":"nit: Closes-Bug","commit_id":"cc54c744e8524034e06087a8745bdcef90179d8a"}],"neutron/agent/l3/dvr_local_router.py":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"78b7d6dd500a924506a71dd1aedb41bd83347395","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                        device.neigh.add(ip, mac)"},{"line_number":260,"context_line":"                    else:"},{"line_number":261,"context_line":"                        os.write(batchfilehandle,"},{"line_number":262,"context_line":"       \"netns exec %s ip -%s neigh replace %s lladdr %s nud permanent dev %s\\n\""},{"line_number":263,"context_line":"       % (self.ns_name, netaddr.IPNetwork(ip).version, ip, mac, device))"},{"line_number":264,"context_line":"                elif operation \u003d\u003d \u0027delete\u0027:"},{"line_number":265,"context_line":"                    device.neigh.delete(ip, mac)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_0b637ade","line":262,"updated":"2018-07-10 15:23:07.000000000","message":"IIUC this will still execute one call to \"ip neigh replace\" per entry inside the \"ip netns exec\". Wouldn\u0027t it make much more sense to create one call doing\n\n    ip netns exec %s ip -batch bfh\n\n?","commit_id":"d551f6e4102c44b113ac8b377b392da6ed56c764"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"049abd8bc7568a7e7af9dc910b5e9c6dbfd8b714","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                                           \u0027add\u0027,"},{"line_number":297,"context_line":"                                           bfh\u003dbatchfilehandle)"},{"line_number":298,"context_line":"        os.close(batchfilehandle)"},{"line_number":299,"context_line":"        utils.execute([\u0027ip\u0027, \u0027-batch\u0027, batchfilename],"},{"line_number":300,"context_line":"                      run_as_root\u003dTrue,"},{"line_number":301,"context_line":"                      log_fail_as_error\u003dTrue)"},{"line_number":302,"context_line":"        os.remove(batchfilename)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_ae4be85a","line":299,"updated":"2018-12-05 15:51:40.000000000","message":"I think -batch can read from stdin, is there a way we can send the commands on stdin rather than write out a temp file?","commit_id":"bfe1b3132aee8db304f1889a27cbce0a8aee75ba"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"67a3bd78ec5c9ef8986e9aee93ac8385a38e763a","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                                           \u0027add\u0027,"},{"line_number":297,"context_line":"                                           bfh\u003dbatchfilehandle)"},{"line_number":298,"context_line":"        os.close(batchfilehandle)"},{"line_number":299,"context_line":"        utils.execute([\u0027ip\u0027, \u0027-batch\u0027, batchfilename],"},{"line_number":300,"context_line":"                      run_as_root\u003dTrue,"},{"line_number":301,"context_line":"                      log_fail_as_error\u003dTrue)"},{"line_number":302,"context_line":"        os.remove(batchfilename)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_574b955b","line":299,"updated":"2018-12-07 16:45:25.000000000","message":"I wonder if it would be helpful if there were a way to feed some input to stdin here https://github.com/openstack/neutron/blob/master/neutron/agent/linux/utils.py#L112. I believe ip -batch can read from stdin, so no need to write out a temp file. We could batch up all the commands and feed them in through stdin. Thoughts?","commit_id":"cc54c744e8524034e06087a8745bdcef90179d8a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"21da186a2ee6f90b7dd810fef157593933ab51fb","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            lib_constants.ROUTER_INTERFACE_OWNERS +"},{"line_number":287,"context_line":"            tuple(common_utils.get_dvr_allowed_address_pair_device_owners()))"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        batchfilehandle, batchfilename \u003d tempfile.mkstemp()"},{"line_number":290,"context_line":"        for p in subnet_ports:"},{"line_number":291,"context_line":"            if p[\u0027device_owner\u0027] not in ignored_device_owners:"},{"line_number":292,"context_line":"                for fixed_ip in p[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_4a07431f","line":289,"updated":"2018-12-10 21:40:48.000000000","message":"I don\u0027t like the idea of creating temp files, as they can get orphaned pretty easily.","commit_id":"5f70b72192a0053921448b70ac9963f3f3a6a845"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"21da186a2ee6f90b7dd810fef157593933ab51fb","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                                           \u0027add\u0027,"},{"line_number":297,"context_line":"                                           bfh\u003dbatchfilehandle)"},{"line_number":298,"context_line":"        os.close(batchfilehandle)"},{"line_number":299,"context_line":"        utils.execute([\u0027ip\u0027, \u0027-batch\u0027, batchfilename],"},{"line_number":300,"context_line":"                      run_as_root\u003dTrue,"},{"line_number":301,"context_line":"                      log_fail_as_error\u003dTrue)"},{"line_number":302,"context_line":"        os.remove(batchfilename)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_6507d016","line":299,"updated":"2018-12-10 21:40:48.000000000","message":"We\u0027ve moved away from using /sbin/ip to using pyroute2, so will need to adapt this accordingly.  But this might be the only place we need to do the batching.\n\nIn addition there was an older review that was abandoned because we thought pyroute2 would solve the issue,\nhttps://review.openstack.org/#/c/431197/ - perhaps it has some nuggets we can use here as well.","commit_id":"5f70b72192a0053921448b70ac9963f3f3a6a845"}]}
