)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"947b2496a089db937d66ba7b44ea9446cc601a68","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Change ip_lib\u0027s get_routing_table method to use pyroute2, rather than"},{"line_number":10,"context_line":"parsing the output of \u0027ip route\u0027."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Make use of oslo.privsep to support namespaces. This includes all"},{"line_number":13,"context_line":"relevant code necessary for oslo.privsep to work."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I89bfa3dbf1776da973cfca389b2841019a520f75"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a629dbe_14185374","line":12,"updated":"2016-11-11 13:08:21.000000000","message":"I appreciate the direction for Ocata, but we will need to backport the fix into Newton, and new dependencies are not allowed in stable branches. I am ok to apply the approach taken here, but a backportable fix should look different.","commit_id":"e2bd8be04d5a88c81248ae4885105c97bcd1c012"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"047e293b76ac8285bee867d2cf54ec64ce0cf6c5","unresolved":false,"context_lines":[{"line_number":10,"context_line":"parsing the output of \u0027ip route\u0027."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Make use of oslo.privsep to support namespaces. This includes all"},{"line_number":13,"context_line":"relevant code necessary for oslo.privsep to work."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I89bfa3dbf1776da973cfca389b2841019a520f75"},{"line_number":16,"context_line":"Partial-Bug: 1492714"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a74a57a_5862e1d9","line":13,"updated":"2016-11-22 22:04:16.000000000","message":"This patch should have a release note.","commit_id":"91f6ac3efbc764096205f9718fa6dc1515063c82"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"94a75ded71af162d84c10460e6a5e2059cb4f7b8","unresolved":false,"context_lines":[{"line_number":10,"context_line":"parsing the output of \u0027ip route\u0027."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Make use of oslo.privsep to support namespaces. This includes all"},{"line_number":13,"context_line":"relevant code necessary for oslo.privsep to work."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I89bfa3dbf1776da973cfca389b2841019a520f75"},{"line_number":16,"context_line":"Partial-Bug: 1492714"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a74a57a_f2866164","line":13,"in_reply_to":"5a74a57a_5862e1d9","updated":"2016-11-23 06:51:15.000000000","message":"Will add.","commit_id":"91f6ac3efbc764096205f9718fa6dc1515063c82"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"047e293b76ac8285bee867d2cf54ec64ce0cf6c5","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I89bfa3dbf1776da973cfca389b2841019a520f75"},{"line_number":16,"context_line":"Partial-Bug: 1492714"},{"line_number":17,"context_line":"Co-Authored-By: Angus Lees \u003cgus@inodes.org\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a74a57a_78487d5c","line":17,"updated":"2016-11-22 22:04:16.000000000","message":"what happened to the original patch [1]? Would be nice to get a sign off from Angus on this one.\n\n[1] https://review.openstack.org/#/c/155631/","commit_id":"91f6ac3efbc764096205f9718fa6dc1515063c82"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"94a75ded71af162d84c10460e6a5e2059cb4f7b8","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I89bfa3dbf1776da973cfca389b2841019a520f75"},{"line_number":16,"context_line":"Partial-Bug: 1492714"},{"line_number":17,"context_line":"Co-Authored-By: Angus Lees \u003cgus@inodes.org\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a74a57a_d2e88519","line":17,"in_reply_to":"5a74a57a_78487d5c","updated":"2016-11-23 06:51:15.000000000","message":"From the comments, it looks like it was abandon since they were unable to solve all the CI issues. I propose a more gradual approach by changing one function at a time (if this patch is accepted, I will submit more). It should make localising and fixing errors easier, if they show up.\n\n@gus gave a +1 to one of the earlier patch-sets. Is that enough? I will try and get a sign-off from him anyway.","commit_id":"91f6ac3efbc764096205f9718fa6dc1515063c82"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"b7313280dcdbe37ebf5807ca26612e287f5ec844","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I89bfa3dbf1776da973cfca389b2841019a520f75"},{"line_number":16,"context_line":"Partial-Bug: 1492714"},{"line_number":17,"context_line":"Co-Authored-By: Angus Lees \u003cgus@inodes.org\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a74a57a_43b6093e","line":17,"in_reply_to":"5a74a57a_d2e88519","updated":"2016-11-25 02:09:24.000000000","message":"I left 155631 to bitrot due to (perceived) lack of positive interest from Neutron cores.  See things like Sean\u0027s last comment on https://review.openstack.org/#/c/307566/","commit_id":"91f6ac3efbc764096205f9718fa6dc1515063c82"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"9fd03fca7a1d22d637dce85316b57b8268c4f598","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Omer Anson \u003comer.anson@toganetworks.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-11-29 08:43:33 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use pyroute2 to read routing table"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change ip_lib\u0027s get_routing_table method to use pyroute2, rather than"},{"line_number":10,"context_line":"parsing the output of \u0027ip route\u0027."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"1a6eadb0_9238f6d4","line":7,"updated":"2016-12-16 13:54:31.000000000","message":"Please update commit to start with \"Adopt Privsep:\"\n\nWe need to confirm this has no operator impact. At one point I think there was some weird config required for upgrade, but that may be gone now.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Omer Anson \u003comer.anson@toganetworks.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-11-29 08:43:33 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use pyroute2 to read routing table"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change ip_lib\u0027s get_routing_table method to use pyroute2, rather than"},{"line_number":10,"context_line":"parsing the output of \u0027ip route\u0027."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"1a6eadb0_48476b1d","line":7,"in_reply_to":"1a6eadb0_9238f6d4","updated":"2016-12-18 12:09:10.000000000","message":"Done\n\nIIRC, this config option was dealt with using config.setup_privsep.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Make use of oslo.privsep to support namespaces. This includes all"},{"line_number":13,"context_line":"relevant code necessary for oslo.privsep to work."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I89bfa3dbf1776da973cfca389b2841019a520f75"},{"line_number":16,"context_line":"Partial-Bug: 1492714"},{"line_number":17,"context_line":"Co-Authored-By: Angus Lees \u003cgus@inodes.org\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"1a6eadb0_3bfbbbc2","line":14,"updated":"2016-12-15 12:38:38.000000000","message":"Are any changes required to adopt the new library? If so, is it worth adding UpgradeImpact tag here? Also, DocImpact?","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c6e5588711be19bdb54e8448ab2300bcb8a8f186","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Make use of oslo.privsep to support namespaces. This includes all"},{"line_number":13,"context_line":"relevant code necessary for oslo.privsep to work."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I89bfa3dbf1776da973cfca389b2841019a520f75"},{"line_number":16,"context_line":"Partial-Bug: 1492714"},{"line_number":17,"context_line":"Co-Authored-By: Angus Lees \u003cgus@inodes.org\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"1a6eadb0_b91b4972","line":14,"in_reply_to":"1a6eadb0_01b4d27f","updated":"2016-12-15 15:19:13.000000000","message":"I mostly refer to the suggestion in fliters file to adopt to local requirements. If each user will need to adopt, then it\u0027s worth being written.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Make use of oslo.privsep to support namespaces. This includes all"},{"line_number":13,"context_line":"relevant code necessary for oslo.privsep to work."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I89bfa3dbf1776da973cfca389b2841019a520f75"},{"line_number":16,"context_line":"Partial-Bug: 1492714"},{"line_number":17,"context_line":"Co-Authored-By: Angus Lees \u003cgus@inodes.org\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"1a6eadb0_01b4d27f","line":14,"in_reply_to":"1a6eadb0_3bfbbbc2","updated":"2016-12-15 14:11:08.000000000","message":"Changes include installing the libraries (oslo.privsep, pyroute2) and adding privsep-helper to the rootwrap.d file. I\u0027ll update the UpgradeImpact.\n\nNot sure I understand what should go in the DocImpact?","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Make use of oslo.privsep to support namespaces. This includes all"},{"line_number":13,"context_line":"relevant code necessary for oslo.privsep to work."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I89bfa3dbf1776da973cfca389b2841019a520f75"},{"line_number":16,"context_line":"Partial-Bug: 1492714"},{"line_number":17,"context_line":"Co-Authored-By: Angus Lees \u003cgus@inodes.org\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"1a6eadb0_e80d97e9","line":14,"in_reply_to":"1a6eadb0_b91b4972","updated":"2016-12-18 12:09:10.000000000","message":"I hope I understood your meaning. I took the UpgradeImpact from the original patch.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"}],"etc/neutron/rootwrap.d/privsep.filters":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3eca80952122fce2916e9f2feb33081c2e60f751","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Command filters to allow privsep daemon to be started via rootwrap."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# This file should be owned by (and only-writeable by) the root user"},{"line_number":4,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":18,"id":"1a6eadb0_018052f6","line":1,"updated":"2016-12-15 12:44:57.000000000","message":"Also, I believe you need to mention the file in setup.cfg, otherwise it won\u0027t be installed with setup.py install, and services will break loose.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Command filters to allow privsep daemon to be started via rootwrap."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# This file should be owned by (and only-writeable by) the root user"},{"line_number":4,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":18,"id":"1a6eadb0_41796ac7","line":1,"in_reply_to":"1a6eadb0_018052f6","updated":"2016-12-15 14:11:08.000000000","message":"Will do.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Command filters to allow privsep daemon to be started via rootwrap."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# This file should be owned by (and only-writeable by) the root user"},{"line_number":4,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":18,"id":"1a6eadb0_ad48118c","line":1,"in_reply_to":"1a6eadb0_41796ac7","updated":"2016-12-18 12:09:10.000000000","message":"Done","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":29,"context_line":"# Same as above with a second `--config-file` arg, since many neutron"},{"line_number":30,"context_line":"# components are installed like that (eg: by devstack).  Adjust to"},{"line_number":31,"context_line":"# suit local requirements."},{"line_number":32,"context_line":"privsep: PathFilter, privsep-helper, root,"},{"line_number":33,"context_line":" --config-file, /etc,"},{"line_number":34,"context_line":" --config-file, /etc,"},{"line_number":35,"context_line":" --privsep_context, neutron.privileged.default,"}],"source_content_type":"application/octet-stream","patch_set":18,"id":"1a6eadb0_1b443f19","line":32,"updated":"2016-12-15 12:38:38.000000000","message":"This entry seems to suggest that we are passing CLI arguments from neutron services right into privsep-helper. Is it really the case? Because that may then break installations where CLI arguments passed are a lot more complex than what you capture here. For example, see how RDO loads neutron-server: https://github.com/rdo-packages/neutron-distgit/blob/rpm-master/neutron-server.service#L8\n\nI see that you suggest modifying the filter file to match local requirements. Can\u0027t we avoid that? Or better, why do we even want to pass those arguments into privsep-helper?\n\nI can miss something so please clarify.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":29,"context_line":"# Same as above with a second `--config-file` arg, since many neutron"},{"line_number":30,"context_line":"# components are installed like that (eg: by devstack).  Adjust to"},{"line_number":31,"context_line":"# suit local requirements."},{"line_number":32,"context_line":"privsep: PathFilter, privsep-helper, root,"},{"line_number":33,"context_line":" --config-file, /etc,"},{"line_number":34,"context_line":" --config-file, /etc,"},{"line_number":35,"context_line":" --privsep_context, neutron.privileged.default,"}],"source_content_type":"application/octet-stream","patch_set":18,"id":"1a6eadb0_a1e07e97","line":32,"in_reply_to":"1a6eadb0_1b443f19","updated":"2016-12-15 14:11:08.000000000","message":"I think a specialised daemon with its own parameters are called. I\u0027ll verify.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":29,"context_line":"# Same as above with a second `--config-file` arg, since many neutron"},{"line_number":30,"context_line":"# components are installed like that (eg: by devstack).  Adjust to"},{"line_number":31,"context_line":"# suit local requirements."},{"line_number":32,"context_line":"privsep: PathFilter, privsep-helper, root,"},{"line_number":33,"context_line":" --config-file, /etc,"},{"line_number":34,"context_line":" --config-file, /etc,"},{"line_number":35,"context_line":" --privsep_context, neutron.privileged.default,"}],"source_content_type":"application/octet-stream","patch_set":18,"id":"1a6eadb0_8d7d15b4","line":32,"in_reply_to":"1a6eadb0_a1e07e97","updated":"2016-12-18 12:09:10.000000000","message":"Command is constructed here: https://github.com/openstack/oslo.privsep/blob/61d66ac8194b5e7acaa3b2e5677b78e41cfeaa36/oslo_privsep/priv_context.py#L127\n\nIt takes parameters from the config files, and not from the caller.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"}],"neutron/agent/common/config.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"ff850ea61043ec4aedc0751fe115adeb4ad77840","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_config import cfg"},{"line_number":19,"context_line":"from oslo_privsep import priv_context"},{"line_number":20,"context_line":"import shlex"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from neutron._i18n import _"},{"line_number":23,"context_line":"from neutron.common import config"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a74a57a_96a1e5fa","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":12},"updated":"2016-11-28 16:58:29.000000000","message":"This is standard Python library - should go to L17","commit_id":"245d8c4cb8ac7386641092a58f57def616ff92d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5244f1a94d1df17c0f4a411e0d300f8062a0e383","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_config import cfg"},{"line_number":19,"context_line":"from oslo_privsep import priv_context"},{"line_number":20,"context_line":"import shlex"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from neutron._i18n import _"},{"line_number":23,"context_line":"from neutron.common import config"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a74a57a_4ce25a30","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":12},"in_reply_to":"5a74a57a_96a1e5fa","updated":"2016-11-28 17:05:02.000000000","message":"Done","commit_id":"245d8c4cb8ac7386641092a58f57def616ff92d5"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"3277fc5b1155eb1ea659ef7c5f6352de679a6449","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"def setup_privsep():"},{"line_number":177,"context_line":"    priv_context.init(root_helper\u003dshlex.split(get_root_helper(cfg.CONF)))"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a74a57a_672c8399","line":177,"updated":"2016-11-28 23:08:08.000000000","message":"Looks like there\u0027s an issue with setting up the config for the functional jobs http://logs.openstack.org/41/394741/16/check/gate-neutron-dsvm-functional-ubuntu-trusty/61e755b/logs/dsvm-functional-logs/neutron.tests.functional.agent.test_dhcp_agent.DHCPAgentOVSTestCase.test_enable_isolated_metadata_for_subnet_create_delete.txt.gz#_2016-11-28_19_52_39_828","commit_id":"8bfb5eae1dd790569ac2369570acc9f486af497c"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"71b6c6eea50fdfbf1ef27b8d318246127461048f","unresolved":false,"context_lines":[{"line_number":173,"context_line":"setup_logging \u003d config.setup_logging"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"def setup_privsep():"},{"line_number":177,"context_line":"    priv_context.init(root_helper\u003dshlex.split(get_root_helper(cfg.CONF)))"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a6eadb0_1e4c3fc7","line":176,"updated":"2016-12-21 13:16:42.000000000","message":"Nit: Would it make more sense to pass conf object to the function? Like it\u0027s done in all other functions above.","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d2448291be659925ea78bd697147579d0c466922","unresolved":false,"context_lines":[{"line_number":173,"context_line":"setup_logging \u003d config.setup_logging"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"def setup_privsep():"},{"line_number":177,"context_line":"    priv_context.init(root_helper\u003dshlex.split(get_root_helper(cfg.CONF)))"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a6eadb0_b2c7f796","line":176,"in_reply_to":"1a6eadb0_1e4c3fc7","updated":"2016-12-21 14:39:57.000000000","message":"I used the same signature as setup_logging.","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"}],"neutron/agent/dhcp_agent.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    register_options(cfg.CONF)"},{"line_number":43,"context_line":"    common_config.init(sys.argv[1:])"},{"line_number":44,"context_line":"    config.setup_logging()"},{"line_number":45,"context_line":"    config.setup_privsep()"},{"line_number":46,"context_line":"    server \u003d neutron_service.Service.create("},{"line_number":47,"context_line":"        binary\u003d\u0027neutron-dhcp-agent\u0027,"},{"line_number":48,"context_line":"        topic\u003dtopics.DHCP_AGENT,"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_56dcce72","line":45,"updated":"2016-12-15 12:38:38.000000000","message":"neither of those agents actually use the function. AFAIK the function is used in tests only. Does it mean we don\u0027t need to initialize it here, but in tests only? Which would also mean that maybe we should make the requirement a test-only for now.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    register_options(cfg.CONF)"},{"line_number":43,"context_line":"    common_config.init(sys.argv[1:])"},{"line_number":44,"context_line":"    config.setup_logging()"},{"line_number":45,"context_line":"    config.setup_privsep()"},{"line_number":46,"context_line":"    server \u003d neutron_service.Service.create("},{"line_number":47,"context_line":"        binary\u003d\u0027neutron-dhcp-agent\u0027,"},{"line_number":48,"context_line":"        topic\u003dtopics.DHCP_AGENT,"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_61258607","line":45,"in_reply_to":"1a6eadb0_56dcce72","updated":"2016-12-15 14:11:08.000000000","message":"I\u0027ll do that.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    register_options(cfg.CONF)"},{"line_number":43,"context_line":"    common_config.init(sys.argv[1:])"},{"line_number":44,"context_line":"    config.setup_logging()"},{"line_number":45,"context_line":"    config.setup_privsep()"},{"line_number":46,"context_line":"    server \u003d neutron_service.Service.create("},{"line_number":47,"context_line":"        binary\u003d\u0027neutron-dhcp-agent\u0027,"},{"line_number":48,"context_line":"        topic\u003dtopics.DHCP_AGENT,"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_6d2ef9a6","line":45,"in_reply_to":"1a6eadb0_61258607","updated":"2016-12-18 12:09:10.000000000","message":"Done","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"}],"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"21f12af130ae8add87bb8973a0525918462c1b12","unresolved":false,"context_lines":[{"line_number":969,"context_line":"    family \u003d {4: socket.AF_INET, 6: socket.AF_INET6}[ip_version]"},{"line_number":970,"context_line":"    try:"},{"line_number":971,"context_line":"        ipdb_routes \u003d privileged.get_routes(namespace)"},{"line_number":972,"context_line":"        ipdb_interfaces \u003d privileged.get_interfaces(namespace)"},{"line_number":973,"context_line":"    except OSError as e:"},{"line_number":974,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":975,"context_line":"            # namespace does not exist. No routes"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_66ab578a","line":972,"updated":"2016-11-08 05:55:24.000000000","message":"These are both potentially very large structures.  Better would be to push any filters you want below into these functions (and to the privileged side, and ideally to the kernel) so you only return just the routes desired.\n\nIn this case, it looks like that means passing ip_version (aka family) to get_routes and building some version of get_interfaces that only returns the interface names.  I suspect if you looked further at the callers of `get_routing_table` that they almost never want to actually get the *full* routing table (but that obviously involves a larger change).","commit_id":"d3aed270645e8e8013e05eba23ad8e44c6fea65c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"29784073baccb4c10dc81e2335323ae491bcf1ce","unresolved":false,"context_lines":[{"line_number":969,"context_line":"    family \u003d {4: socket.AF_INET, 6: socket.AF_INET6}[ip_version]"},{"line_number":970,"context_line":"    try:"},{"line_number":971,"context_line":"        ipdb_routes \u003d privileged.get_routes(namespace)"},{"line_number":972,"context_line":"        ipdb_interfaces \u003d privileged.get_interfaces(namespace)"},{"line_number":973,"context_line":"    except OSError as e:"},{"line_number":974,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":975,"context_line":"            # namespace does not exist. No routes"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_f420e84b","line":972,"in_reply_to":"9a629dbe_66ab578a","updated":"2016-11-08 09:24:46.000000000","message":"In that case, I think I\u0027ll move the whole implementation to privileged.\n\nThe original thought was to minimize the amount of work done with escalated privileges.","commit_id":"d3aed270645e8e8013e05eba23ad8e44c6fea65c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3b2e02d3178b4f8baeec74ccd899ac0983b7d8f8","unresolved":false,"context_lines":[{"line_number":969,"context_line":"        check_exit_code\u003dTrue)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    routes \u003d []"},{"line_number":972,"context_line":"    # Example for route_lines:"},{"line_number":973,"context_line":"    # default via 192.168.3.120 dev wlp3s0  proto static  metric 1024"},{"line_number":974,"context_line":"    # 10.0.0.0/8 dev tun0  proto static  scope link  metric 1024"},{"line_number":975,"context_line":"    # The first column is the destination, followed by key/value pairs."}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_d4009b36","side":"PARENT","line":972,"updated":"2016-11-11 13:25:23.000000000","message":"since we will need to have CLI based fix first, we may need to be a bit smarter about the format of the line than just assume it\u0027s in k,v pairs.\n\nI\u0027ve checked out the latest code of iproute2, and here is the current list of additional non-pair tags that may be present in the list:\n\n        if (r-\u003ertm_flags \u0026 RTNH_F_DEAD)\n                fprintf(fp, \"dead \");\n        if (r-\u003ertm_flags \u0026 RTNH_F_ONLINK)\n                fprintf(fp, \"onlink \");\n        if (r-\u003ertm_flags \u0026 RTNH_F_PERVASIVE)\n                fprintf(fp, \"pervasive \");\n        if (r-\u003ertm_flags \u0026 RTNH_F_OFFLOAD)\n                fprintf(fp, \"offload \");\n        if (r-\u003ertm_flags \u0026 RTM_F_NOTIFY)\n                fprintf(fp, \"notify \");\n        if (r-\u003ertm_flags \u0026 RTNH_F_LINKDOWN)\n                fprintf(fp, \"linkdown \");\n\nNote that they are not necessarily at the end of the list, f.e. a mark pair goes after, same for realm(s).\n\nAlternatively, we may just extract the explicit values we need.","commit_id":"e79cccef26371fc989f6e710a380a1e295e57b19"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"335f6c5df381ad9a172389708d9796a09ef0e6fc","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import eventlet"},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"from neutron.privileged.agent.linux import ip_lib as privileged"},{"line_number":22,"context_line":"from neutron_lib import constants"},{"line_number":23,"context_line":"from neutron_lib import exceptions"},{"line_number":24,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a629dbe_9a2aa92e","line":21,"updated":"2016-11-13 07:59:05.000000000","message":"the alias here is very confusing for me. what does privileged have to do with ip_lib?","commit_id":"ddea45e2f20113896d10e78b3861f00fe3f0c8e0"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1d10b1baab8b2477ac052b89658fbe0ed66d1227","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import eventlet"},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"from neutron.privileged.agent.linux import ip_lib as privileged"},{"line_number":22,"context_line":"from neutron_lib import constants"},{"line_number":23,"context_line":"from neutron_lib import exceptions"},{"line_number":24,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a629dbe_ba7ccdec","line":21,"in_reply_to":"9a629dbe_9a2aa92e","updated":"2016-11-13 09:25:56.000000000","message":"The thought is that each module only accesses its own neutron.privileged.\u003cmodule name\u003e object. e.g. ip_lib will never access neutron.privileged.utils. Therefore, the alias \u0027privileged\u0027 is the \u0027privileged escalation version\u0027 of this module.","commit_id":"ddea45e2f20113896d10e78b3861f00fe3f0c8e0"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"dd3da74d93d9a0806b901a49081c78771319b39f","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import eventlet"},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"from neutron.privileged.agent.linux import ip_lib as privileged"},{"line_number":22,"context_line":"from neutron_lib import constants"},{"line_number":23,"context_line":"from neutron_lib import exceptions"},{"line_number":24,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_830901e0","line":21,"in_reply_to":"9a629dbe_ba7ccdec","updated":"2016-11-25 02:09:13.000000000","message":"Right, there\u0027s no particular reason it has to be that way (or that we have to be strict about it).  In my original change, on which this is based, it made sense to put the privileged routines related to ip_lib in privileged.ip_lib, and then when I imported that back here I needed to name it something different because now I had two ip_lib\u0027s.  In other changes I aliased to something like priv_ip_lib to help distinguish the two.  Nothing special about these choices.","commit_id":"ddea45e2f20113896d10e78b3861f00fe3f0c8e0"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b4c8459f10f8dbc6dae46f3927af5ee880fdf887","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import eventlet"},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"from neutron.privileged.agent.linux import ip_lib as privileged"},{"line_number":22,"context_line":"from neutron_lib import constants"},{"line_number":23,"context_line":"from neutron_lib import exceptions"},{"line_number":24,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_605c2926","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":63},"updated":"2016-11-23 13:08:04.000000000","message":"This belongs to L33","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9f57c2f6f95c54d06dc3a18d98913b559840253c","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import eventlet"},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"from neutron.privileged.agent.linux import ip_lib as privileged"},{"line_number":22,"context_line":"from neutron_lib import constants"},{"line_number":23,"context_line":"from neutron_lib import exceptions"},{"line_number":24,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_2d6061ce","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":63},"in_reply_to":"5a74a57a_605c2926","updated":"2016-11-23 15:15:57.000000000","message":"Will fix","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0a1b6db9c18ce101f9e03a9d74a527484061573c","unresolved":false,"context_lines":[{"line_number":973,"context_line":"                               \u0027device\u0027: device_name,"},{"line_number":974,"context_line":"                               \u0027scope\u0027: scope}"},{"line_number":975,"context_line":"    \"\"\""},{"line_number":976,"context_line":"    return list(privileged.get_routing_table(ip_version, namespace))"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"def ensure_device_is_ready(device_name, namespace\u003dNone):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a74a57a_c1593e00","line":976,"updated":"2016-11-24 16:35:00.000000000","message":"Nit: If another respin will be needed, you can leave a comment here why do we have this list() thing here.","commit_id":"614df6b11283d1f9bcab63e4536a4eb316643ab4"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"ff850ea61043ec4aedc0751fe115adeb4ad77840","unresolved":false,"context_lines":[{"line_number":973,"context_line":"                               \u0027device\u0027: device_name,"},{"line_number":974,"context_line":"                               \u0027scope\u0027: scope}"},{"line_number":975,"context_line":"    \"\"\""},{"line_number":976,"context_line":"    return list(privileged.get_routing_table(ip_version, namespace))"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"def ensure_device_is_ready(device_name, namespace\u003dNone):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a74a57a_f6fcd9b9","line":976,"updated":"2016-11-28 16:58:29.000000000","message":"You forgot about the comment here I asked in previous patchset.","commit_id":"245d8c4cb8ac7386641092a58f57def616ff92d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5244f1a94d1df17c0f4a411e0d300f8062a0e383","unresolved":false,"context_lines":[{"line_number":973,"context_line":"                               \u0027device\u0027: device_name,"},{"line_number":974,"context_line":"                               \u0027scope\u0027: scope}"},{"line_number":975,"context_line":"    \"\"\""},{"line_number":976,"context_line":"    return list(privileged.get_routing_table(ip_version, namespace))"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"def ensure_device_is_ready(device_name, namespace\u003dNone):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a74a57a_8cef121d","line":976,"in_reply_to":"5a74a57a_f6fcd9b9","updated":"2016-11-28 17:05:02.000000000","message":"Done.","commit_id":"245d8c4cb8ac7386641092a58f57def616ff92d5"}],"neutron/common/eventlet_utils.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b4c8459f10f8dbc6dae46f3927af5ee880fdf887","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    else:"},{"line_number":33,"context_line":"        eventlet.monkey_patch()"},{"line_number":34,"context_line":"        p_c_e \u003d importutils.try_import(\u0027pyroute2.config.eventlet\u0027)"},{"line_number":35,"context_line":"        if p_c_e:"},{"line_number":36,"context_line":"            p_c_e.eventlet_config()"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_8096a592","line":35,"range":{"start_line":35,"start_character":11,"end_line":35,"end_character":16},"updated":"2016-11-23 13:08:04.000000000","message":"What does it mean when the package is not available? When it happens?","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c3661eba58d2fafb5931e64af66260d51e0f5519","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    else:"},{"line_number":33,"context_line":"        eventlet.monkey_patch()"},{"line_number":34,"context_line":"        p_c_e \u003d importutils.try_import(\u0027pyroute2.config.eventlet\u0027)"},{"line_number":35,"context_line":"        if p_c_e:"},{"line_number":36,"context_line":"            p_c_e.eventlet_config()"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_a8461f21","line":35,"range":{"start_line":35,"start_character":11,"end_line":35,"end_character":16},"in_reply_to":"5a74a57a_2d8ea178","updated":"2016-11-23 15:30:37.000000000","message":"If the consequence of failing the import here will cause other failures then it\u0027s better to fail right away.","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9f57c2f6f95c54d06dc3a18d98913b559840253c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    else:"},{"line_number":33,"context_line":"        eventlet.monkey_patch()"},{"line_number":34,"context_line":"        p_c_e \u003d importutils.try_import(\u0027pyroute2.config.eventlet\u0027)"},{"line_number":35,"context_line":"        if p_c_e:"},{"line_number":36,"context_line":"            p_c_e.eventlet_config()"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_2d8ea178","line":35,"range":{"start_line":35,"start_character":11,"end_line":35,"end_character":16},"in_reply_to":"5a74a57a_8096a592","updated":"2016-11-23 15:15:57.000000000","message":"It should never happen. My understanding is that the import of pyroute2 must be done after the call to monkey_patch.\n\nI can change it to import_module rather than try_import if preferred.","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"6c060fe16f383c26633c5c045f6f43035c374363","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    else:"},{"line_number":33,"context_line":"        eventlet.monkey_patch()"},{"line_number":34,"context_line":"        p_c_e \u003d importutils.try_import(\u0027pyroute2.config.eventlet\u0027)"},{"line_number":35,"context_line":"        if p_c_e:"},{"line_number":36,"context_line":"            p_c_e.eventlet_config()"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_a3427d0e","line":35,"range":{"start_line":35,"start_character":11,"end_line":35,"end_character":16},"in_reply_to":"5a74a57a_a8461f21","updated":"2016-11-25 02:09:41.000000000","message":"It\u0027s only necessary to import pyroute2 here if pyroute2 is actually required elsewhere.","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        eventlet.monkey_patch(os\u003dFalse, thread\u003dFalse)"},{"line_number":32,"context_line":"    else:"},{"line_number":33,"context_line":"        eventlet.monkey_patch()"},{"line_number":34,"context_line":"        p_c_e \u003d importutils.import_module(\u0027pyroute2.config.eventlet\u0027)"},{"line_number":35,"context_line":"        p_c_e.eventlet_config()"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_76538ae2","line":34,"updated":"2016-12-15 12:38:38.000000000","message":"is there a reason why we can\u0027t import it in global scope?","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        eventlet.monkey_patch(os\u003dFalse, thread\u003dFalse)"},{"line_number":32,"context_line":"    else:"},{"line_number":33,"context_line":"        eventlet.monkey_patch()"},{"line_number":34,"context_line":"        p_c_e \u003d importutils.import_module(\u0027pyroute2.config.eventlet\u0027)"},{"line_number":35,"context_line":"        p_c_e.eventlet_config()"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_a1c31e56","line":34,"in_reply_to":"1a6eadb0_76538ae2","updated":"2016-12-15 14:11:08.000000000","message":"Importing it in global scope fails the tests. From what I saw, calling eventlet.monkey_patch after importing pyroute2, causes the tests (on the gate) to hang, whether with or without eventlet_config.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"}],"neutron/common/exceptions.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8570658f353371e60a34920032e14118adf9eaf1","unresolved":false,"context_lines":[{"line_number":311,"context_line":"    message \u003d _(\"Both tenant_id and project_id passed as filters.\")"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"class NetworkNamespaceNotFound(e.NotFound):"},{"line_number":315,"context_line":"    message \u003d _(\"Network namespace %(netns_name)s could not be found.\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_f4aef296","line":314,"updated":"2016-12-20 15:34:50.000000000","message":"how \u0027common\u0027 is the exception to stay in neutron/common/exceptions.py?","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"11cec759355028a4d2bfffb59f31ac5670ae08aa","unresolved":false,"context_lines":[{"line_number":311,"context_line":"    message \u003d _(\"Both tenant_id and project_id passed as filters.\")"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"class NetworkNamespaceNotFound(e.NotFound):"},{"line_number":315,"context_line":"    message \u003d _(\"Network namespace %(netns_name)s could not be found.\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_a18359cb","line":314,"in_reply_to":"1a6eadb0_be0c543c","updated":"2016-12-20 16:44:01.000000000","message":"Can\u0027t we keep it where it\u0027s raised? Especially since it\u0027s prolly going to be RuntimeError.","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f08e551af5f0404a83a7529eb97ebb0fbb69f19c","unresolved":false,"context_lines":[{"line_number":311,"context_line":"    message \u003d _(\"Both tenant_id and project_id passed as filters.\")"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"class NetworkNamespaceNotFound(e.NotFound):"},{"line_number":315,"context_line":"    message \u003d _(\"Network namespace %(netns_name)s could not be found.\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_be0c543c","line":314,"in_reply_to":"1a6eadb0_f4aef296","updated":"2016-12-20 16:22:36.000000000","message":"I guess not very common, since I just added it. Where should I move it?","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"}],"neutron/privileged/__init__.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"f2d8eb512909fbb32e80ec642e2d896c7c21b3b2","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    pypath\u003d__name__ + \u0027.default\u0027,"},{"line_number":22,"context_line":"    # TODO(gus): CAP_SYS_ADMIN is required (only?) for manipulating"},{"line_number":23,"context_line":"    # network namespaces.  SYS_ADMIN is a lot of scary powers, so"},{"line_number":24,"context_line":"    # consider breaking this out into a separate minimal context."},{"line_number":25,"context_line":"    capabilities\u003d[c.CAP_SYS_ADMIN, c.CAP_NET_ADMIN],"},{"line_number":26,"context_line":")"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a74a57a_0444b2b4","line":24,"updated":"2016-11-28 20:42:14.000000000","message":"Just some food for thought:\n\nIn the context of this patch we do need to expose CAP_SYS_ADMIN to access a namespace to fetch the routing table, so this context may be a \"default\" for purposes of this patch. However, I wonder if calling this \"default\" will be problematic down the line as users with more basic needs may be over-elevating privileges without it being made as obvious as it could. As pointed out in the comment not every user needs CAP_SYS_ADMIN, so maybe we rename this to something other than \"default\".","commit_id":"8bfb5eae1dd790569ac2369570acc9f486af497c"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"70cad53e523f97cfe69f52ff522c32de3b9ff59b","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    pypath\u003d__name__ + \u0027.default\u0027,"},{"line_number":22,"context_line":"    # TODO(gus): CAP_SYS_ADMIN is required (only?) for manipulating"},{"line_number":23,"context_line":"    # network namespaces.  SYS_ADMIN is a lot of scary powers, so"},{"line_number":24,"context_line":"    # consider breaking this out into a separate minimal context."},{"line_number":25,"context_line":"    capabilities\u003d[c.CAP_SYS_ADMIN, c.CAP_NET_ADMIN],"},{"line_number":26,"context_line":")"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a74a57a_733a85e8","line":24,"in_reply_to":"5a74a57a_0444b2b4","updated":"2016-11-29 02:14:24.000000000","message":"Very many privileged operations in Neutron need to be done in a particular netns, so I\u0027m not sure it will make much practical difference to the amount of privileged code that gets run without SYS_ADMIN :(\n\nWe could (as a thought experiment) design a way in which a privsep-style persistent process was forked into a netns and then dropped SYS_ADMIN (keeping NET_ADMIN just in that netns) - but I feel that\u0027s a larger architectural change than will ever happen in an evolution of the existing neutron code...","commit_id":"8bfb5eae1dd790569ac2369570acc9f486af497c"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"ec4c7e3f19a926f49695362b3757b9a69682a2a1","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    pypath\u003d__name__ + \u0027.default\u0027,"},{"line_number":22,"context_line":"    # TODO(gus): CAP_SYS_ADMIN is required (only?) for manipulating"},{"line_number":23,"context_line":"    # network namespaces.  SYS_ADMIN is a lot of scary powers, so"},{"line_number":24,"context_line":"    # consider breaking this out into a separate minimal context."},{"line_number":25,"context_line":"    capabilities\u003d[c.CAP_SYS_ADMIN, c.CAP_NET_ADMIN],"},{"line_number":26,"context_line":")"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a74a57a_41e66517","line":24,"in_reply_to":"5a74a57a_733a85e8","updated":"2016-11-29 18:33:53.000000000","message":"Now that I think about it, I think you\u0027re right. I was initially trying to consider neutron components that don\u0027t need that kind of access, but the more I think about it the harder it is for me to think of things that don\u0027t require it.","commit_id":"8bfb5eae1dd790569ac2369570acc9f486af497c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_privsep import capabilities as c"},{"line_number":14,"context_line":"from oslo_privsep import priv_context"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# It is expected that most (if not all) neutron operations can be"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_16125609","line":13,"range":{"start_line":13,"start_character":41,"end_line":13,"end_character":42},"updated":"2016-12-15 12:38:38.000000000","message":"maybe use \u0027caps\u0027, to be more clear for readers","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_privsep import capabilities as c"},{"line_number":14,"context_line":"from oslo_privsep import priv_context"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# It is expected that most (if not all) neutron operations can be"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_819d4268","line":13,"range":{"start_line":13,"start_character":41,"end_line":13,"end_character":42},"in_reply_to":"1a6eadb0_16125609","updated":"2016-12-15 14:11:08.000000000","message":"Will do","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_privsep import capabilities as c"},{"line_number":14,"context_line":"from oslo_privsep import priv_context"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# It is expected that most (if not all) neutron operations can be"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_0d166555","line":13,"range":{"start_line":13,"start_character":41,"end_line":13,"end_character":42},"in_reply_to":"1a6eadb0_819d4268","updated":"2016-12-18 12:09:10.000000000","message":"Done","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"}],"neutron/privileged/agent/linux/ip_lib.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ee3caf7882bbfbc871aa2d503c3b51a91641a068","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import atexit"},{"line_number":14,"context_line":"from neutron import privileged"},{"line_number":15,"context_line":"import pyroute2"},{"line_number":16,"context_line":"import six"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_06d9bb21","line":14,"updated":"2016-11-08 06:00:48.000000000","message":"neutron should be in its own section","commit_id":"d3aed270645e8e8013e05eba23ad8e44c6fea65c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"29784073baccb4c10dc81e2335323ae491bcf1ce","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import atexit"},{"line_number":14,"context_line":"from neutron import privileged"},{"line_number":15,"context_line":"import pyroute2"},{"line_number":16,"context_line":"import six"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_341b401d","line":14,"in_reply_to":"9a629dbe_06d9bb21","updated":"2016-11-08 09:24:46.000000000","message":"Done","commit_id":"d3aed270645e8e8013e05eba23ad8e44c6fea65c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ee3caf7882bbfbc871aa2d503c3b51a91641a068","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import six"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_ipdb_cache \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def _ipdb(namespace):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_e6dbe719","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":11},"updated":"2016-11-08 06:00:48.000000000","message":"nit - please use upper case for global variables","commit_id":"d3aed270645e8e8013e05eba23ad8e44c6fea65c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"29784073baccb4c10dc81e2335323ae491bcf1ce","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import six"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_ipdb_cache \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def _ipdb(namespace):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_74d3f838","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":11},"in_reply_to":"9a629dbe_e6dbe719","updated":"2016-11-08 09:24:46.000000000","message":"Done","commit_id":"d3aed270645e8e8013e05eba23ad8e44c6fea65c"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"8eb51454e282e39131aee84f474c947ee0e351af","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import atexit"},{"line_number":14,"context_line":"import errno"},{"line_number":15,"context_line":"import pyroute2"},{"line_number":16,"context_line":"from pyroute2.netlink import rtnl"},{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":"import socket"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron import privileged"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_f6bfcbf8","line":18,"range":{"start_line":13,"start_character":0,"end_line":18,"end_character":13},"updated":"2016-11-09 14:28:28.000000000","message":"Breaks coding guidelines: http://docs.openstack.org/developer/hacking/#import-order-template","commit_id":"156343d36531de70b2c356ac3f8dbf812de7ce05"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"624de2e7ff5253b4095f2108c9daae91fdc94dc5","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import atexit"},{"line_number":14,"context_line":"import errno"},{"line_number":15,"context_line":"import pyroute2"},{"line_number":16,"context_line":"from pyroute2.netlink import rtnl"},{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":"import socket"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron import privileged"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_e68e2b78","line":18,"range":{"start_line":13,"start_character":0,"end_line":18,"end_character":13},"in_reply_to":"9a629dbe_f6bfcbf8","updated":"2016-11-09 19:02:09.000000000","message":"Done","commit_id":"156343d36531de70b2c356ac3f8dbf812de7ce05"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"8eb51454e282e39131aee84f474c947ee0e351af","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron import privileged"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"_IPDB_CACHE \u003d {}"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def _ipdb(namespace):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_5678778f","line":23,"range":{"start_line":23,"start_character":1,"end_line":23,"end_character":5},"updated":"2016-11-09 14:28:28.000000000","message":"Super nit: Can we use \"ip_db\" (assuming it\u0027s ip database). Not sure if it\u0027s just me, but \u0027ipdb\u0027 evokes a debugger to me.","commit_id":"156343d36531de70b2c356ac3f8dbf812de7ce05"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"624de2e7ff5253b4095f2108c9daae91fdc94dc5","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron import privileged"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"_IPDB_CACHE \u003d {}"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def _ipdb(namespace):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_e601cbb0","line":23,"range":{"start_line":23,"start_character":1,"end_line":23,"end_character":5},"in_reply_to":"9a629dbe_5678778f","updated":"2016-11-09 19:02:09.000000000","message":"I\u0027ll change it to _IP_DB_CACHE.","commit_id":"156343d36531de70b2c356ac3f8dbf812de7ce05"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"8eb51454e282e39131aee84f474c947ee0e351af","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    if not result:"},{"line_number":30,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":31,"context_line":"        result \u003d pyroute2.IPDB(nl\u003dnetns)"},{"line_number":32,"context_line":"        _IPDB_CACHE[namespace] \u003d result"},{"line_number":33,"context_line":"    return result"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_16e43f39","line":32,"range":{"start_line":32,"start_character":8,"end_line":32,"end_character":39},"updated":"2016-11-09 14:28:28.000000000","message":"Are those two operations above expensive? Why do we cache here? Can it happen that if I create a namespace \u0027foo\u0027, call get_routing_table(), then I remove namespace \u0027foo\u0027 and create again namespace \u0027foo\u0027, I\u0027ll get wrong \u0027result\u0027 object?","commit_id":"156343d36531de70b2c356ac3f8dbf812de7ce05"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"d744d6752c67f70113ca4ef0a92b2985949ddd7d","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    if not result:"},{"line_number":30,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":31,"context_line":"        result \u003d pyroute2.IPDB(nl\u003dnetns)"},{"line_number":32,"context_line":"        _IPDB_CACHE[namespace] \u003d result"},{"line_number":33,"context_line":"    return result"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_23dd8d0e","line":32,"range":{"start_line":32,"start_character":8,"end_line":32,"end_character":39},"in_reply_to":"9a629dbe_0aecb9f1","updated":"2016-11-25 02:08:21.000000000","message":"Depends what you mean by \"wrong\" in an ABA delete/recreate race[1] ;)  The cache will continue to hold on to the original namespace \u0027foo\u0027, but I can see how you might interpret delete+recreate to mean \"I actually want you to use this new one that I happened to give the same name now\".\n\n[1] https://en.wikipedia.org/wiki/ABA_problem\n\nYes those two calls are potentially expensive (fork, some communication, etc) compared to the trivial cost of one of the simple/common ip_lib function calls.\n\nIf you want to support manual intrusive changes made behind neutron\u0027s back, then yes you will need to lose the cache, as you discovered.","commit_id":"156343d36531de70b2c356ac3f8dbf812de7ce05"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"624de2e7ff5253b4095f2108c9daae91fdc94dc5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    if not result:"},{"line_number":30,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":31,"context_line":"        result \u003d pyroute2.IPDB(nl\u003dnetns)"},{"line_number":32,"context_line":"        _IPDB_CACHE[namespace] \u003d result"},{"line_number":33,"context_line":"    return result"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_660dbbe7","line":32,"range":{"start_line":32,"start_character":8,"end_line":32,"end_character":39},"in_reply_to":"9a629dbe_16e43f39","updated":"2016-11-09 19:02:09.000000000","message":"I\u0027ll test.\n\nThe caching is taken from @gus\u0027 original patch. From what I saw, objects returned from IPDB update automatically.","commit_id":"156343d36531de70b2c356ac3f8dbf812de7ce05"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"473175725a316d043600b781e88569007377c1e0","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    if not result:"},{"line_number":30,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":31,"context_line":"        result \u003d pyroute2.IPDB(nl\u003dnetns)"},{"line_number":32,"context_line":"        _IPDB_CACHE[namespace] \u003d result"},{"line_number":33,"context_line":"    return result"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_0aecb9f1","line":32,"range":{"start_line":32,"start_character":8,"end_line":32,"end_character":39},"in_reply_to":"9a629dbe_660dbbe7","updated":"2016-11-11 08:10:15.000000000","message":"Looks like when the namespace is removed and re-added, ipdb is not updated. I\u0027ll remove the cache.\n\nThanks. Nice catch.","commit_id":"156343d36531de70b2c356ac3f8dbf812de7ce05"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2b6cf844d4bd28920e1844bcf3bb5d7a6c780992","unresolved":false,"context_lines":[{"line_number":23,"context_line":"def get_routing_table(ip_version, namespace\u003dNone):"},{"line_number":24,"context_line":"    \"\"\"Return a list of dictionaries, each representing a route."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    @param ip_version: the routes of version to return, for example 4"},{"line_number":27,"context_line":"    @param namespace"},{"line_number":28,"context_line":"    @return: a list of dictionaries, each representing a route."},{"line_number":29,"context_line":"    The dictionary format is: {\u0027destination\u0027: cidr,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_02536fe2","line":26,"range":{"start_line":26,"start_character":4,"end_line":26,"end_character":5},"updated":"2016-11-23 16:34:40.000000000","message":"Nit: We use :param ip_version: around codebase but you can also find this doxygen like docs :)","commit_id":"4f3710ea9b627028186bd34d10d9f80223e3994b"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cd62a3fa0a8f1574faef24a151a57a07d1c22f67","unresolved":false,"context_lines":[{"line_number":23,"context_line":"def get_routing_table(ip_version, namespace\u003dNone):"},{"line_number":24,"context_line":"    \"\"\"Return a list of dictionaries, each representing a route."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    @param ip_version: the routes of version to return, for example 4"},{"line_number":27,"context_line":"    @param namespace"},{"line_number":28,"context_line":"    @return: a list of dictionaries, each representing a route."},{"line_number":29,"context_line":"    The dictionary format is: {\u0027destination\u0027: cidr,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_0547f9bb","line":26,"range":{"start_line":26,"start_character":4,"end_line":26,"end_character":5},"in_reply_to":"5a74a57a_02536fe2","updated":"2016-11-23 17:05:48.000000000","message":"Done","commit_id":"4f3710ea9b627028186bd34d10d9f80223e3994b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2b6cf844d4bd28920e1844bcf3bb5d7a6c780992","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                               \u0027device\u0027: device_name,"},{"line_number":32,"context_line":"                               \u0027scope\u0027: scope}"},{"line_number":33,"context_line":"    \"\"\""},{"line_number":34,"context_line":"    family \u003d {4: socket.AF_INET, 6: socket.AF_INET6}[ip_version]"},{"line_number":35,"context_line":"    try:"},{"line_number":36,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":37,"context_line":"    except OSError as e:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_a23abbcb","line":34,"range":{"start_line":34,"start_character":13,"end_line":34,"end_character":52},"updated":"2016-11-23 16:34:40.000000000","message":"We can define this as constant on module level so we don\u0027t construct the same dict per get_routing_table() call.","commit_id":"4f3710ea9b627028186bd34d10d9f80223e3994b"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cd62a3fa0a8f1574faef24a151a57a07d1c22f67","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                               \u0027device\u0027: device_name,"},{"line_number":32,"context_line":"                               \u0027scope\u0027: scope}"},{"line_number":33,"context_line":"    \"\"\""},{"line_number":34,"context_line":"    family \u003d {4: socket.AF_INET, 6: socket.AF_INET6}[ip_version]"},{"line_number":35,"context_line":"    try:"},{"line_number":36,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":37,"context_line":"    except OSError as e:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_251235b5","line":34,"range":{"start_line":34,"start_character":13,"end_line":34,"end_character":52},"in_reply_to":"5a74a57a_a23abbcb","updated":"2016-11-23 17:05:48.000000000","message":"Done","commit_id":"4f3710ea9b627028186bd34d10d9f80223e3994b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2b6cf844d4bd28920e1844bcf3bb5d7a6c780992","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        routes \u003d [{\u0027destination\u0027: route[\u0027dst\u0027],"},{"line_number":46,"context_line":"                   \u0027nexthop\u0027: route.get(\u0027gateway\u0027),"},{"line_number":47,"context_line":"                   \u0027device\u0027: ipdb_interfaces[route[\u0027oif\u0027]][\u0027ifname\u0027],"},{"line_number":48,"context_line":"                   \u0027scope\u0027: rtnl.rt_scope[route[\u0027scope\u0027]]}"},{"line_number":49,"context_line":"                  for route in ipdb_routes if route[\u0027family\u0027] \u003d\u003d family]"},{"line_number":50,"context_line":"    return routes"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_22d30b3a","line":48,"range":{"start_line":48,"start_character":42,"end_line":48,"end_character":56},"updated":"2016-11-23 16:34:40.000000000","message":"Based on the change in functional tests, can we rely that route always have scope defined?","commit_id":"4f3710ea9b627028186bd34d10d9f80223e3994b"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cd62a3fa0a8f1574faef24a151a57a07d1c22f67","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        routes \u003d [{\u0027destination\u0027: route[\u0027dst\u0027],"},{"line_number":46,"context_line":"                   \u0027nexthop\u0027: route.get(\u0027gateway\u0027),"},{"line_number":47,"context_line":"                   \u0027device\u0027: ipdb_interfaces[route[\u0027oif\u0027]][\u0027ifname\u0027],"},{"line_number":48,"context_line":"                   \u0027scope\u0027: rtnl.rt_scope[route[\u0027scope\u0027]]}"},{"line_number":49,"context_line":"                  for route in ipdb_routes if route[\u0027family\u0027] \u003d\u003d family]"},{"line_number":50,"context_line":"    return routes"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_851149af","line":48,"range":{"start_line":48,"start_character":42,"end_line":48,"end_character":56},"in_reply_to":"5a74a57a_22d30b3a","updated":"2016-11-23 17:05:48.000000000","message":"It appears reliable, but I\u0027ll make it more robust.","commit_id":"4f3710ea9b627028186bd34d10d9f80223e3994b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron import privileged"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"_IP_VERSION_FAMILIY_MAP \u003d {4: socket.AF_INET, 6: socket.AF_INET6}"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _get_scope_name(scope):"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_16aed697","line":22,"range":{"start_line":22,"start_character":12,"end_line":22,"end_character":19},"updated":"2016-12-15 12:38:38.000000000","message":"FAMILY","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron import privileged"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"_IP_VERSION_FAMILIY_MAP \u003d {4: socket.AF_INET, 6: socket.AF_INET6}"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _get_scope_name(scope):"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_a1a87e78","line":22,"range":{"start_line":22,"start_character":12,"end_line":22,"end_character":19},"in_reply_to":"1a6eadb0_16aed697","updated":"2016-12-15 14:11:08.000000000","message":"Will fix","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron import privileged"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"_IP_VERSION_FAMILIY_MAP \u003d {4: socket.AF_INET, 6: socket.AF_INET6}"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _get_scope_name(scope):"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_2d0b212d","line":22,"range":{"start_line":22,"start_character":12,"end_line":22,"end_character":19},"in_reply_to":"1a6eadb0_a1a87e78","updated":"2016-12-18 12:09:10.000000000","message":"Done","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _get_scope_name(scope):"},{"line_number":26,"context_line":"    \"\"\"Return the name of the scope (given as a numnber), or the scope number"},{"line_number":27,"context_line":"    if the name is unknown"},{"line_number":28,"context_line":"    \"\"\""},{"line_number":29,"context_line":"    return rtnl.rt_scope.get(scope, scope)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_56a20e9a","line":26,"range":{"start_line":26,"start_character":48,"end_line":26,"end_character":55},"updated":"2016-12-15 12:38:38.000000000","message":"number","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _get_scope_name(scope):"},{"line_number":26,"context_line":"    \"\"\"Return the name of the scope (given as a numnber), or the scope number"},{"line_number":27,"context_line":"    if the name is unknown"},{"line_number":28,"context_line":"    \"\"\""},{"line_number":29,"context_line":"    return rtnl.rt_scope.get(scope, scope)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_c1b73ad6","line":26,"range":{"start_line":26,"start_character":48,"end_line":26,"end_character":55},"in_reply_to":"1a6eadb0_56a20e9a","updated":"2016-12-15 14:11:08.000000000","message":"Will fix","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _get_scope_name(scope):"},{"line_number":26,"context_line":"    \"\"\"Return the name of the scope (given as a numnber), or the scope number"},{"line_number":27,"context_line":"    if the name is unknown"},{"line_number":28,"context_line":"    \"\"\""},{"line_number":29,"context_line":"    return rtnl.rt_scope.get(scope, scope)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_6d051913","line":26,"range":{"start_line":26,"start_character":48,"end_line":26,"end_character":55},"in_reply_to":"1a6eadb0_c1b73ad6","updated":"2016-12-18 12:09:10.000000000","message":"Done","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _get_scope_name(scope):"},{"line_number":26,"context_line":"    \"\"\"Return the name of the scope (given as a numnber), or the scope number"},{"line_number":27,"context_line":"    if the name is unknown"},{"line_number":28,"context_line":"    \"\"\""},{"line_number":29,"context_line":"    return rtnl.rt_scope.get(scope, scope)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_16b336ea","line":27,"updated":"2016-12-15 12:38:38.000000000","message":"add trailing dot.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _get_scope_name(scope):"},{"line_number":26,"context_line":"    \"\"\"Return the name of the scope (given as a numnber), or the scope number"},{"line_number":27,"context_line":"    if the name is unknown"},{"line_number":28,"context_line":"    \"\"\""},{"line_number":29,"context_line":"    return rtnl.rt_scope.get(scope, scope)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_e1bc36bd","line":27,"in_reply_to":"1a6eadb0_16b336ea","updated":"2016-12-15 14:11:08.000000000","message":"Will fix","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _get_scope_name(scope):"},{"line_number":26,"context_line":"    \"\"\"Return the name of the scope (given as a numnber), or the scope number"},{"line_number":27,"context_line":"    if the name is unknown"},{"line_number":28,"context_line":"    \"\"\""},{"line_number":29,"context_line":"    return rtnl.rt_scope.get(scope, scope)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_a8fd5f0a","line":27,"in_reply_to":"1a6eadb0_e1bc36bd","updated":"2016-12-18 12:09:10.000000000","message":"Done","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"def get_routing_table(ip_version, namespace\u003dNone):"},{"line_number":34,"context_line":"    \"\"\"Return a list of dictionaries, each representing a route."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    :param ip_version: the routes of version to return, for example 4"},{"line_number":37,"context_line":"    :param namespace: The name of the namespace from which to get the routes"},{"line_number":38,"context_line":"    :return: a list of dictionaries, each representing a route."},{"line_number":39,"context_line":"    The dictionary format is: {\u0027destination\u0027: cidr,"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_d618ded5","line":36,"range":{"start_line":36,"start_character":23,"end_line":36,"end_character":54},"updated":"2016-12-15 12:38:38.000000000","message":"consider \u0027ip version of routes to return\u0027","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":33,"context_line":"def get_routing_table(ip_version, namespace\u003dNone):"},{"line_number":34,"context_line":"    \"\"\"Return a list of dictionaries, each representing a route."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    :param ip_version: the routes of version to return, for example 4"},{"line_number":37,"context_line":"    :param namespace: The name of the namespace from which to get the routes"},{"line_number":38,"context_line":"    :return: a list of dictionaries, each representing a route."},{"line_number":39,"context_line":"    The dictionary format is: {\u0027destination\u0027: cidr,"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_c1de5a10","line":36,"range":{"start_line":36,"start_character":23,"end_line":36,"end_character":54},"in_reply_to":"1a6eadb0_d618ded5","updated":"2016-12-15 14:11:08.000000000","message":"Will fix","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":47,"context_line":"    except OSError as e:"},{"line_number":48,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":49,"context_line":"            # namespace does not exist. No routes"},{"line_number":50,"context_line":"            return []"},{"line_number":51,"context_line":"        raise"},{"line_number":52,"context_line":"    with pyroute2.IPDB(nl\u003dnetns) as ipdb:"},{"line_number":53,"context_line":"        ipdb_routes \u003d ipdb.routes"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_968e66ce","line":50,"range":{"start_line":49,"start_character":12,"end_line":50,"end_character":21},"updated":"2016-12-15 12:38:38.000000000","message":"I think before, ip_lib was raising a RuntimeError on missing namespace. Shouldn\u0027t we keep the behaviour? Is it even easy to achieve with privsep?","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":47,"context_line":"    except OSError as e:"},{"line_number":48,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":49,"context_line":"            # namespace does not exist. No routes"},{"line_number":50,"context_line":"            return []"},{"line_number":51,"context_line":"        raise"},{"line_number":52,"context_line":"    with pyroute2.IPDB(nl\u003dnetns) as ipdb:"},{"line_number":53,"context_line":"        ipdb_routes \u003d ipdb.routes"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_c83a9b98","line":50,"range":{"start_line":49,"start_character":12,"end_line":50,"end_character":21},"in_reply_to":"1a6eadb0_61f7468b","updated":"2016-12-18 12:09:10.000000000","message":"Done","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b557d1e07fbab49a5fd3694f41a2fb9edf34e659","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":47,"context_line":"    except OSError as e:"},{"line_number":48,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":49,"context_line":"            # namespace does not exist. No routes"},{"line_number":50,"context_line":"            return []"},{"line_number":51,"context_line":"        raise"},{"line_number":52,"context_line":"    with pyroute2.IPDB(nl\u003dnetns) as ipdb:"},{"line_number":53,"context_line":"        ipdb_routes \u003d ipdb.routes"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_61f7468b","line":50,"range":{"start_line":49,"start_character":12,"end_line":50,"end_character":21},"in_reply_to":"1a6eadb0_968e66ce","updated":"2016-12-15 14:11:08.000000000","message":"I\u0027ll verify. If so, I\u0027ll correct the behaviour here.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8570658f353371e60a34920032e14118adf9eaf1","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":48,"context_line":"    except OSError as e:"},{"line_number":49,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":50,"context_line":"            raise exceptions.NetworkNamespaceNotFound(netns_name\u003dnamespace)"},{"line_number":51,"context_line":"        raise"},{"line_number":52,"context_line":"    with pyroute2.IPDB(nl\u003dnetns) as ipdb:"},{"line_number":53,"context_line":"        ipdb_routes \u003d ipdb.routes"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_34ca2a6f","line":50,"updated":"2016-12-20 15:34:50.000000000","message":"but that\u0027s not a RuntimeError, so it changes the type raised from what was before.","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f08e551af5f0404a83a7529eb97ebb0fbb69f19c","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":48,"context_line":"    except OSError as e:"},{"line_number":49,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":50,"context_line":"            raise exceptions.NetworkNamespaceNotFound(netns_name\u003dnamespace)"},{"line_number":51,"context_line":"        raise"},{"line_number":52,"context_line":"    with pyroute2.IPDB(nl\u003dnetns) as ipdb:"},{"line_number":53,"context_line":"        ipdb_routes \u003d ipdb.routes"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_1ef2a8d2","line":50,"in_reply_to":"1a6eadb0_34ca2a6f","updated":"2016-12-20 16:22:36.000000000","message":"Yes. I can change it back. But I think this exception fits better. It raises an exception that describes the real problem, rather than \u0027the underlying implementation failed\u0027.","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"71b6c6eea50fdfbf1ef27b8d318246127461048f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    family \u003d _IP_VERSION_FAMILY_MAP[ip_version]"},{"line_number":54,"context_line":"    try:"},{"line_number":55,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":56,"context_line":"    except OSError as e:"},{"line_number":57,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":58,"context_line":"            raise NetworkNamespaceNotFound(netns_name\u003dnamespace)"},{"line_number":59,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a6eadb0_891d7b64","line":56,"updated":"2016-12-21 13:16:42.000000000","message":"I experienced a little different errors raised in Py3 at some cases. Can you please add another functional test that attempts to get_routing_table from non existent namespace? It could be handy in Py3 Pike goal.","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"47d67cb014e3faf6321fd13b41989b830c583b2a","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    family \u003d _IP_VERSION_FAMILY_MAP[ip_version]"},{"line_number":54,"context_line":"    try:"},{"line_number":55,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":56,"context_line":"    except OSError as e:"},{"line_number":57,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":58,"context_line":"            raise NetworkNamespaceNotFound(netns_name\u003dnamespace)"},{"line_number":59,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a6eadb0_8ab8ff12","line":56,"in_reply_to":"1a6eadb0_434977b6","updated":"2016-12-21 15:56:32.000000000","message":"I don\u0027t see how those two UTs validate that if Py3 raise FileNotFoundError, it will NOT be propagated further.","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d2448291be659925ea78bd697147579d0c466922","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    family \u003d _IP_VERSION_FAMILY_MAP[ip_version]"},{"line_number":54,"context_line":"    try:"},{"line_number":55,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":56,"context_line":"    except OSError as e:"},{"line_number":57,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":58,"context_line":"            raise NetworkNamespaceNotFound(netns_name\u003dnamespace)"},{"line_number":59,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a6eadb0_9264bbb9","line":56,"in_reply_to":"1a6eadb0_891d7b64","updated":"2016-12-21 14:39:57.000000000","message":"Yes. Python3 code turns OSErrors to their relevant subcalsses. But the unit tests cover this.\n\nBut I will add the functional test.","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"e9da30bb3b776f64b73cd4a5cecc579ede1c9b55","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    family \u003d _IP_VERSION_FAMILY_MAP[ip_version]"},{"line_number":54,"context_line":"    try:"},{"line_number":55,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":56,"context_line":"    except OSError as e:"},{"line_number":57,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":58,"context_line":"            raise NetworkNamespaceNotFound(netns_name\u003dnamespace)"},{"line_number":59,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":20,"id":"da4df55a_34cb7e74","line":56,"in_reply_to":"1a6eadb0_8ab8ff12","updated":"2016-12-21 20:03:47.000000000","message":"FileNotFoundError subclasses OSError, where errno is ENOENT. That\u0027s why in the unit tests I use exception.__class__ rather than putting OSError explicitly. Python 3 does this automagically (i.e. if you initialise an OSError with errno to ENOENT, the result is a FileNotFoundError).\n\nEach case here is covered by a test: The case where the network namespace is not found and a NetworkNamespaceNotFound exception is raised, or something else (a permission denied error), which is raised unmodified.\n\nOn the other hand, I may be missing something, or I may have misunderstood you :)\n\nIn any case, I have added the functional test.","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b2d91d03c2e4c0a89e9720c0315742444724b1da","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    family \u003d _IP_VERSION_FAMILY_MAP[ip_version]"},{"line_number":54,"context_line":"    try:"},{"line_number":55,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":56,"context_line":"    except OSError as e:"},{"line_number":57,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":58,"context_line":"            raise NetworkNamespaceNotFound(netns_name\u003dnamespace)"},{"line_number":59,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a6eadb0_cda77609","line":56,"in_reply_to":"1a6eadb0_9264bbb9","updated":"2016-12-21 14:54:38.000000000","message":"UT tests that \"if OSError is raised\" but not \"what does system raise in case of non-existing namespace\". The functional test can exercise better this exception: https://docs.python.org/3/library/exceptions.html#FileNotFoundError","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c24a00f419772066ccd0c249ad3c5a885ab5dbcb","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    family \u003d _IP_VERSION_FAMILY_MAP[ip_version]"},{"line_number":54,"context_line":"    try:"},{"line_number":55,"context_line":"        netns \u003d pyroute2.NetNS(namespace, flags\u003d0) if namespace else None"},{"line_number":56,"context_line":"    except OSError as e:"},{"line_number":57,"context_line":"        if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":58,"context_line":"            raise NetworkNamespaceNotFound(netns_name\u003dnamespace)"},{"line_number":59,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a6eadb0_434977b6","line":56,"in_reply_to":"1a6eadb0_cda77609","updated":"2016-12-21 15:53:47.000000000","message":"UT tests both: test_get_routing_table_nonexistent_namespace (line 1527 on PS20) and test_get_routing_table_other_error (line 1535 on PS20).","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"}],"neutron/tests/functional/agent/linux/test_ip_lib.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b4c8459f10f8dbc6dae46f3927af5ee880fdf887","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        device.link.delete()"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def test_get_routing_table(self):"},{"line_number":187,"context_line":"        attr \u003d self.generate_device_details()"},{"line_number":188,"context_line":"        device \u003d self.manage_device(attr)"},{"line_number":189,"context_line":"        device_ip \u003d attr.ip_cidrs[0].split(\u0027/\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_7b685cbb","line":186,"range":{"start_line":186,"start_character":8,"end_line":186,"end_character":30},"updated":"2016-11-23 13:08:04.000000000","message":"Would be worth to implement a test for ipv6 too","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9f57c2f6f95c54d06dc3a18d98913b559840253c","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        device.link.delete()"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def test_get_routing_table(self):"},{"line_number":187,"context_line":"        attr \u003d self.generate_device_details()"},{"line_number":188,"context_line":"        device \u003d self.manage_device(attr)"},{"line_number":189,"context_line":"        device_ip \u003d attr.ip_cidrs[0].split(\u0027/\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_eddae977","line":186,"range":{"start_line":186,"start_character":8,"end_line":186,"end_character":30},"in_reply_to":"5a74a57a_7b685cbb","updated":"2016-11-23 15:15:57.000000000","message":"Will do.","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"}],"neutron/tests/unit/agent/linux/test_ip_lib.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b4c8459f10f8dbc6dae46f3927af5ee880fdf887","unresolved":false,"context_lines":[{"line_number":1420,"context_line":"        }"},{"line_number":1421,"context_line":"    }"},{"line_number":1422,"context_line":""},{"line_number":1423,"context_line":"    ipdb_routes_4 \u003d ["},{"line_number":1424,"context_line":"        {"},{"line_number":1425,"context_line":"            \u0027oif\u0027: 2,"},{"line_number":1426,"context_line":"            \u0027dst_len\u0027: 24,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_0004557c","line":1423,"range":{"start_line":1423,"start_character":4,"end_line":1423,"end_character":8},"updated":"2016-11-23 13:08:04.000000000","message":"Nit: ip_db_routes","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9f57c2f6f95c54d06dc3a18d98913b559840253c","unresolved":false,"context_lines":[{"line_number":1420,"context_line":"        }"},{"line_number":1421,"context_line":"    }"},{"line_number":1422,"context_line":""},{"line_number":1423,"context_line":"    ipdb_routes_4 \u003d ["},{"line_number":1424,"context_line":"        {"},{"line_number":1425,"context_line":"            \u0027oif\u0027: 2,"},{"line_number":1426,"context_line":"            \u0027dst_len\u0027: 24,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_edf669d6","line":1423,"range":{"start_line":1423,"start_character":4,"end_line":1423,"end_character":8},"in_reply_to":"5a74a57a_0004557c","updated":"2016-11-23 15:15:57.000000000","message":"Will fix.","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b4c8459f10f8dbc6dae46f3927af5ee880fdf887","unresolved":false,"context_lines":[{"line_number":1523,"context_line":""},{"line_number":1524,"context_line":"    def setUp(self):"},{"line_number":1525,"context_line":"        super(TestGetRoutingTable, self).setUp()"},{"line_number":1526,"context_line":"        privileged.default.set_client_mode(False)"},{"line_number":1527,"context_line":"        self.addCleanup(privileged.default.set_client_mode, True)"},{"line_number":1528,"context_line":""},{"line_number":1529,"context_line":"    @mock.patch.object(pyroute2, \u0027IPDB\u0027)"},{"line_number":1530,"context_line":"    @mock.patch.object(pyroute2, \u0027NetNS\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_e0aaf96f","line":1527,"range":{"start_line":1526,"start_character":0,"end_line":1527,"end_character":65},"updated":"2016-11-23 13:08:04.000000000","message":"Is it safe? I\u0027d say we should switch the order as if an error happens after client_mode is set, it won\u0027t call the cleanup.","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9f57c2f6f95c54d06dc3a18d98913b559840253c","unresolved":false,"context_lines":[{"line_number":1523,"context_line":""},{"line_number":1524,"context_line":"    def setUp(self):"},{"line_number":1525,"context_line":"        super(TestGetRoutingTable, self).setUp()"},{"line_number":1526,"context_line":"        privileged.default.set_client_mode(False)"},{"line_number":1527,"context_line":"        self.addCleanup(privileged.default.set_client_mode, True)"},{"line_number":1528,"context_line":""},{"line_number":1529,"context_line":"    @mock.patch.object(pyroute2, \u0027IPDB\u0027)"},{"line_number":1530,"context_line":"    @mock.patch.object(pyroute2, \u0027NetNS\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_4d2cbd4a","line":1527,"range":{"start_line":1526,"start_character":0,"end_line":1527,"end_character":65},"in_reply_to":"5a74a57a_e0aaf96f","updated":"2016-11-23 15:15:57.000000000","message":"Will do.","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b4c8459f10f8dbc6dae46f3927af5ee880fdf887","unresolved":false,"context_lines":[{"line_number":1537,"context_line":"    @mock.patch.object(pyroute2, \u0027IPDB\u0027)"},{"line_number":1538,"context_line":"    @mock.patch.object(pyroute2, \u0027NetNS\u0027)"},{"line_number":1539,"context_line":"    def _test_get_routing_table(self, version, ipdb_routes, expected,"},{"line_number":1540,"context_line":"                                mock_netns, mock_ipdb):"},{"line_number":1541,"context_line":"        mock_ipdb_instance \u003d mock_ipdb.return_value"},{"line_number":1542,"context_line":"        mock_ipdb_enter \u003d mock_ipdb_instance.__enter__.return_value"},{"line_number":1543,"context_line":"        mock_ipdb_enter.interfaces \u003d self.ipdb_interfaces"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_603a6938","line":1540,"range":{"start_line":1540,"start_character":49,"end_line":1540,"end_character":53},"updated":"2016-11-23 13:08:04.000000000","message":"Nit: mock_ip_db","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9f57c2f6f95c54d06dc3a18d98913b559840253c","unresolved":false,"context_lines":[{"line_number":1537,"context_line":"    @mock.patch.object(pyroute2, \u0027IPDB\u0027)"},{"line_number":1538,"context_line":"    @mock.patch.object(pyroute2, \u0027NetNS\u0027)"},{"line_number":1539,"context_line":"    def _test_get_routing_table(self, version, ipdb_routes, expected,"},{"line_number":1540,"context_line":"                                mock_netns, mock_ipdb):"},{"line_number":1541,"context_line":"        mock_ipdb_instance \u003d mock_ipdb.return_value"},{"line_number":1542,"context_line":"        mock_ipdb_enter \u003d mock_ipdb_instance.__enter__.return_value"},{"line_number":1543,"context_line":"        mock_ipdb_enter.interfaces \u003d self.ipdb_interfaces"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_8d26d566","line":1540,"range":{"start_line":1540,"start_character":49,"end_line":1540,"end_character":53},"in_reply_to":"5a74a57a_603a6938","updated":"2016-11-23 15:15:57.000000000","message":"Will do.","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b4c8459f10f8dbc6dae46f3927af5ee880fdf887","unresolved":false,"context_lines":[{"line_number":1557,"context_line":"                     \u0027nexthop\u0027: \u002710.0.0.2\u0027,"},{"line_number":1558,"context_line":"                     \u0027device\u0027: \u0027tap-1\u0027,"},{"line_number":1559,"context_line":"                     \u0027scope\u0027: \u0027universe\u0027}]"},{"line_number":1560,"context_line":"        self._test_get_routing_table(4, self.ipdb_routes_4, expected)"},{"line_number":1561,"context_line":""},{"line_number":1562,"context_line":"    def test_get_routing_table_6(self):"},{"line_number":1563,"context_line":"        expected \u003d [{\u0027destination\u0027: \u00271111:1111:1111:1111::/64\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_a0ce4158","line":1560,"range":{"start_line":1560,"start_character":40,"end_line":1560,"end_character":58},"updated":"2016-11-23 13:08:04.000000000","message":"As per code in the priviledge ip_lib, we filter based on inet family, we should merge ipdb_routes_4 and ipdb_routes_6","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9f57c2f6f95c54d06dc3a18d98913b559840253c","unresolved":false,"context_lines":[{"line_number":1557,"context_line":"                     \u0027nexthop\u0027: \u002710.0.0.2\u0027,"},{"line_number":1558,"context_line":"                     \u0027device\u0027: \u0027tap-1\u0027,"},{"line_number":1559,"context_line":"                     \u0027scope\u0027: \u0027universe\u0027}]"},{"line_number":1560,"context_line":"        self._test_get_routing_table(4, self.ipdb_routes_4, expected)"},{"line_number":1561,"context_line":""},{"line_number":1562,"context_line":"    def test_get_routing_table_6(self):"},{"line_number":1563,"context_line":"        expected \u003d [{\u0027destination\u0027: \u00271111:1111:1111:1111::/64\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_4dd3dd38","line":1560,"range":{"start_line":1560,"start_character":40,"end_line":1560,"end_character":58},"in_reply_to":"5a74a57a_a0ce4158","updated":"2016-11-23 15:15:57.000000000","message":"Sure. Would make the test more elegant too.","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b4c8459f10f8dbc6dae46f3927af5ee880fdf887","unresolved":false,"context_lines":[{"line_number":1569,"context_line":"                     \u0027device\u0027: \u0027tap-1\u0027,"},{"line_number":1570,"context_line":"                     \u0027scope\u0027: \u0027universe\u0027}]"},{"line_number":1571,"context_line":"        self._test_get_routing_table(6, self.ipdb_routes_6, expected)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":""},{"line_number":1574,"context_line":"class TestIpNeighCommand(TestIPCmdBase):"},{"line_number":1575,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_e074b9fe","line":1572,"updated":"2016-11-23 13:08:04.000000000","message":"Missing test where NetNS raises an OSError that has errno different than ENOENT","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9f57c2f6f95c54d06dc3a18d98913b559840253c","unresolved":false,"context_lines":[{"line_number":1569,"context_line":"                     \u0027device\u0027: \u0027tap-1\u0027,"},{"line_number":1570,"context_line":"                     \u0027scope\u0027: \u0027universe\u0027}]"},{"line_number":1571,"context_line":"        self._test_get_routing_table(6, self.ipdb_routes_6, expected)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":""},{"line_number":1574,"context_line":"class TestIpNeighCommand(TestIPCmdBase):"},{"line_number":1575,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_6dd89954","line":1572,"in_reply_to":"5a74a57a_e074b9fe","updated":"2016-11-23 15:15:57.000000000","message":"Will add.","commit_id":"b4a6dccbcac6baa5b85378cf2c86d40435c10207"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2b6cf844d4bd28920e1844bcf3bb5d7a6c780992","unresolved":false,"context_lines":[{"line_number":1533,"context_line":"    @mock.patch.object(pyroute2, \u0027IPDB\u0027)"},{"line_number":1534,"context_line":"    @mock.patch.object(pyroute2, \u0027NetNS\u0027)"},{"line_number":1535,"context_line":"    def test_get_routing_table_other_error(self, mock_netns, mock_ip_db):"},{"line_number":1536,"context_line":"        other_error \u003d Exception"},{"line_number":1537,"context_line":"        mock_netns.side_effect \u003d other_error"},{"line_number":1538,"context_line":"        with testtools.ExpectedException(Exception):"},{"line_number":1539,"context_line":"            ip_lib.get_routing_table(4, \u0027ns\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_e2583359","line":1536,"range":{"start_line":1536,"start_character":22,"end_line":1536,"end_character":31},"updated":"2016-11-23 16:34:40.000000000","message":"I meant exactly OSError but not ENOENT errno, to cover the \u0027if branch\u0027 in production code","commit_id":"4f3710ea9b627028186bd34d10d9f80223e3994b"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cd62a3fa0a8f1574faef24a151a57a07d1c22f67","unresolved":false,"context_lines":[{"line_number":1533,"context_line":"    @mock.patch.object(pyroute2, \u0027IPDB\u0027)"},{"line_number":1534,"context_line":"    @mock.patch.object(pyroute2, \u0027NetNS\u0027)"},{"line_number":1535,"context_line":"    def test_get_routing_table_other_error(self, mock_netns, mock_ip_db):"},{"line_number":1536,"context_line":"        other_error \u003d Exception"},{"line_number":1537,"context_line":"        mock_netns.side_effect \u003d other_error"},{"line_number":1538,"context_line":"        with testtools.ExpectedException(Exception):"},{"line_number":1539,"context_line":"            ip_lib.get_routing_table(4, \u0027ns\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_057539f8","line":1536,"range":{"start_line":1536,"start_character":22,"end_line":1536,"end_character":31},"in_reply_to":"5a74a57a_e2583359","updated":"2016-11-23 17:05:48.000000000","message":"Done","commit_id":"4f3710ea9b627028186bd34d10d9f80223e3994b"}],"releasenotes/notes/use-pyroute2-in-ip-lib-558bfea8f14d1fea.yaml":[{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"dee991a77d304a74580200fc3c7c3d3f82d1fa9e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    ``/etc/neutron/neutron.conf``::"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"      [privsep]"},{"line_number":16,"context_line":"      helper_command \u003d sudo neutron-rootwrap /etc/neutron/rootwrap.conf privsep-helper --config-file /etc/neutron/neutron.conf"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    Importantly, any ``--config-file`` arguments should match the"},{"line_number":19,"context_line":"    arguments actually used to start the server process being"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"5a74a57a_e30d553f","line":16,"updated":"2016-11-25 02:32:06.000000000","message":"Rather than this, you\u0027re better off taking advantage of I3ea73e16b07a870629e7d69e897f2524d7068ae8 and calling priv_context.init() at the top of each main() function that might end up using one of the privsep functions contained here.  See I3a52f762deb176fe9201b2a0f0da363057f8aaec for the corresponding change in nova.","commit_id":"614df6b11283d1f9bcab63e4536a4eb316643ab4"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0fbaae83e02e80dfdfb5205279c30e5863ab0e9b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Initial support for oslo.privsep has been added. A usage example,"},{"line_number":4,"context_line":"    including unit tests, exists with ip_lib.get_routing_table."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"1a6eadb0_c14e5a6e","line":4,"updated":"2016-12-15 12:38:38.000000000","message":"depending on discussion in the commit message, we may need to add some more meat here, like upgrade: section.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"186fe5838470494fb9d09f41a33b32ae80a9624f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Initial support for oslo.privsep has been added. A usage example,"},{"line_number":4,"context_line":"    including unit tests, exists with ip_lib.get_routing_table."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"1a6eadb0_c808dbdc","line":4,"in_reply_to":"1a6eadb0_c14e5a6e","updated":"2016-12-18 12:09:10.000000000","message":"I hope I understood your meaning. I took the UpgradeImpact from the original patch.","commit_id":"74135df704fb7e455af97ec653c3e9bc3f4440eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8570658f353371e60a34920032e14118adf9eaf1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    including unit tests, exists with ip_lib.get_routing_table."},{"line_number":5,"context_line":"upgrade:"},{"line_number":6,"context_line":"  - |"},{"line_number":7,"context_line":"    The neutron agents now use ``oslo.privsep`` and the ``pyroute2``"},{"line_number":8,"context_line":"    library to interact with the kernel rather than rootwrap and"},{"line_number":9,"context_line":"    ``iproute``.  ``oslo.privsep`` requires a way to start the"},{"line_number":10,"context_line":"    companion ``privsep-helper`` command as root.  To use rootwrap for"},{"line_number":11,"context_line":"    this, you need to ensure ``etc/neutron/rootwrap.d/privsep.filters``"},{"line_number":12,"context_line":"    is installed appropriately and set the following in"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"1a6eadb0_54aec685","line":9,"range":{"start_line":7,"start_character":4,"end_line":9,"end_character":15},"updated":"2016-12-20 15:34:50.000000000","message":"do they? I think we learned that the code is not used in any agent, but tests only. At which point, it may make no sense to have a release note at all.","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f08e551af5f0404a83a7529eb97ebb0fbb69f19c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    including unit tests, exists with ip_lib.get_routing_table."},{"line_number":5,"context_line":"upgrade:"},{"line_number":6,"context_line":"  - |"},{"line_number":7,"context_line":"    The neutron agents now use ``oslo.privsep`` and the ``pyroute2``"},{"line_number":8,"context_line":"    library to interact with the kernel rather than rootwrap and"},{"line_number":9,"context_line":"    ``iproute``.  ``oslo.privsep`` requires a way to start the"},{"line_number":10,"context_line":"    companion ``privsep-helper`` command as root.  To use rootwrap for"},{"line_number":11,"context_line":"    this, you need to ensure ``etc/neutron/rootwrap.d/privsep.filters``"},{"line_number":12,"context_line":"    is installed appropriately and set the following in"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"1a6eadb0_7eb9dcca","line":9,"range":{"start_line":7,"start_character":4,"end_line":9,"end_character":15},"in_reply_to":"1a6eadb0_54aec685","updated":"2016-12-20 16:22:36.000000000","message":"I\u0027ll reword to make it more accurate. \n\nYou say we don\u0027t need it, and @kevinbenton says we do, and I don\u0027t know how to write a Heisenberg release note. What to do?","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"205990c13bc0957a66153d2a29acbfd5f870dcba","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    ``oslo.privsep`` and the ``pyroute2`` library are available for use by"},{"line_number":8,"context_line":"    neutron agents. ``pyroute2`` allows configuring the network without"},{"line_number":9,"context_line":"    calling ``iproute``, and ``oslo.privsep`` allows privilege escalation"},{"line_number":10,"context_line":"    for python code, optionally using rootwrap only to to start its companion"},{"line_number":11,"context_line":"    daemon."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"    ``oslo.privsep`` requires a way to start the companion"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"1a6eadb0_c4de7a6c","line":10,"range":{"start_line":10,"start_character":8,"end_line":10,"end_character":9},"updated":"2016-12-21 12:29:27.000000000","message":"P","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"205990c13bc0957a66153d2a29acbfd5f870dcba","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    ``oslo.privsep`` and the ``pyroute2`` library are available for use by"},{"line_number":8,"context_line":"    neutron agents. ``pyroute2`` allows configuring the network without"},{"line_number":9,"context_line":"    calling ``iproute``, and ``oslo.privsep`` allows privilege escalation"},{"line_number":10,"context_line":"    for python code, optionally using rootwrap only to to start its companion"},{"line_number":11,"context_line":"    daemon."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"    ``oslo.privsep`` requires a way to start the companion"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"1a6eadb0_24e2ce2f","line":10,"range":{"start_line":10,"start_character":52,"end_line":10,"end_character":57},"updated":"2016-12-21 12:29:27.000000000","message":"dup","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3066d780f620ad4dd79cab115ca4806b2d94152c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    ``oslo.privsep`` and the ``pyroute2`` library are available for use by"},{"line_number":8,"context_line":"    neutron agents. ``pyroute2`` allows configuring the network without"},{"line_number":9,"context_line":"    calling ``iproute``, and ``oslo.privsep`` allows privilege escalation"},{"line_number":10,"context_line":"    for python code, optionally using rootwrap only to to start its companion"},{"line_number":11,"context_line":"    daemon."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"    ``oslo.privsep`` requires a way to start the companion"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"1a6eadb0_4a27d1b5","line":10,"range":{"start_line":10,"start_character":8,"end_line":10,"end_character":9},"in_reply_to":"1a6eadb0_c4de7a6c","updated":"2016-12-21 12:57:50.000000000","message":"Done","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"}],"requirements.txt":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8570658f353371e60a34920032e14118adf9eaf1","unresolved":false,"context_lines":[{"line_number":21,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":22,"context_line":"tenacity\u003e\u003d3.2.1 # Apache-2.0"},{"line_number":23,"context_line":"ryu\u003e\u003d4.9 # Apache-2.0"},{"line_number":24,"context_line":"pyroute2\u003e\u003d0.4.3  # Apache-2.0 (+ dual licensed GPL2)"},{"line_number":25,"context_line":"SQLAlchemy\u003c1.1.0,\u003e\u003d1.0.10 # MIT"},{"line_number":26,"context_line":"WebOb\u003e\u003d1.6.0 # MIT"},{"line_number":27,"context_line":"keystoneauth1\u003e\u003d2.16.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":19,"id":"1a6eadb0_547886f2","line":24,"updated":"2016-12-20 15:34:50.000000000","message":"why is this dep here but the privsep one is test only? I believe atm both are test only.","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f08e551af5f0404a83a7529eb97ebb0fbb69f19c","unresolved":false,"context_lines":[{"line_number":21,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":22,"context_line":"tenacity\u003e\u003d3.2.1 # Apache-2.0"},{"line_number":23,"context_line":"ryu\u003e\u003d4.9 # Apache-2.0"},{"line_number":24,"context_line":"pyroute2\u003e\u003d0.4.3  # Apache-2.0 (+ dual licensed GPL2)"},{"line_number":25,"context_line":"SQLAlchemy\u003c1.1.0,\u003e\u003d1.0.10 # MIT"},{"line_number":26,"context_line":"WebOb\u003e\u003d1.6.0 # MIT"},{"line_number":27,"context_line":"keystoneauth1\u003e\u003d2.16.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":19,"id":"1a6eadb0_7ee0fccc","line":24,"in_reply_to":"1a6eadb0_547886f2","updated":"2016-12-20 16:22:36.000000000","message":"Yes. Will fix.","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"}],"setup.cfg":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8570658f353371e60a34920032e14118adf9eaf1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        etc/neutron/rootwrap.d/l3.filters"},{"line_number":38,"context_line":"        etc/neutron/rootwrap.d/linuxbridge-plugin.filters"},{"line_number":39,"context_line":"        etc/neutron/rootwrap.d/openvswitch-plugin.filters"},{"line_number":40,"context_line":"        etc/neutron/rootwrap.d/privsep.filters"},{"line_number":41,"context_line":"scripts \u003d"},{"line_number":42,"context_line":"    bin/neutron-rootwrap-xen-dom0"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-ttcn-cfg","patch_set":19,"id":"1a6eadb0_34222a02","line":40,"updated":"2016-12-20 15:34:50.000000000","message":"since we learned that it\u0027s needed for functional tests only, we may actually want to avoid installing the file on production, yet.\n\nWhich may also require to deploy the filters file as part of tools/configure_for_func_tests.sh.","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f08e551af5f0404a83a7529eb97ebb0fbb69f19c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        etc/neutron/rootwrap.d/l3.filters"},{"line_number":38,"context_line":"        etc/neutron/rootwrap.d/linuxbridge-plugin.filters"},{"line_number":39,"context_line":"        etc/neutron/rootwrap.d/openvswitch-plugin.filters"},{"line_number":40,"context_line":"        etc/neutron/rootwrap.d/privsep.filters"},{"line_number":41,"context_line":"scripts \u003d"},{"line_number":42,"context_line":"    bin/neutron-rootwrap-xen-dom0"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-ttcn-cfg","patch_set":19,"id":"1a6eadb0_1ef3889f","line":40,"in_reply_to":"1a6eadb0_34222a02","updated":"2016-12-20 16:22:36.000000000","message":"I\u0027ll move it there.","commit_id":"b79a2bde4a999031411bb985d74c6d946c76e4a8"}],"tools/configure_for_func_testing.sh":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"205990c13bc0957a66153d2a29acbfd5f870dcba","unresolved":false,"context_lines":[{"line_number":214,"context_line":"}"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"function _install_testing_rootwrap_filters {"},{"line_number":218,"context_line":"    echo_summary \"Installing rootwrap filters for tests\""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    sudo cp $REPO_BSAE/$PROJECT_NAME/etc/neutron/rootwrap.d/privsep.filters /etc/neutron/rootwrap.d/privsep.filters"}],"source_content_type":"text/x-sh","patch_set":20,"id":"1a6eadb0_e4f7f6d0","line":217,"updated":"2016-12-21 12:29:27.000000000","message":"I think you should instead update tools/deploy_rootwrap.sh to install the file. Sorry for wrong initial direction.","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"71b6c6eea50fdfbf1ef27b8d318246127461048f","unresolved":false,"context_lines":[{"line_number":214,"context_line":"}"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"function _install_testing_rootwrap_filters {"},{"line_number":218,"context_line":"    echo_summary \"Installing rootwrap filters for tests\""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    sudo cp $REPO_BSAE/$PROJECT_NAME/etc/neutron/rootwrap.d/privsep.filters /etc/neutron/rootwrap.d/privsep.filters"}],"source_content_type":"text/x-sh","patch_set":20,"id":"1a6eadb0_1edc3a72","line":217,"in_reply_to":"1a6eadb0_64c206eb","updated":"2016-12-21 13:16:42.000000000","message":"I was also looking into this. I can\u0027t find where do we trigger devstack to deploy all other rootwrap filters, like ovs-vsctl etc.\n\ndevstack installs all rootwrap filters from rootwrap.d directory","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3066d780f620ad4dd79cab115ca4806b2d94152c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"}"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"function _install_testing_rootwrap_filters {"},{"line_number":218,"context_line":"    echo_summary \"Installing rootwrap filters for tests\""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    sudo cp $REPO_BSAE/$PROJECT_NAME/etc/neutron/rootwrap.d/privsep.filters /etc/neutron/rootwrap.d/privsep.filters"}],"source_content_type":"text/x-sh","patch_set":20,"id":"1a6eadb0_64c206eb","line":217,"in_reply_to":"1a6eadb0_e4f7f6d0","updated":"2016-12-21 12:57:50.000000000","message":"It looks like deploy_rootwrap.sh does it automatically. It automatically takes all rootwrap files.\n\nReverted this change.","commit_id":"cd0853ace07d87121d99a4c714987fa8b37f702d"}]}
