)]}'
{"neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py":[{"author":{"_account_id":12909,"name":"Mark Wu","email":"wudx05@gmail.com","username":"markw"},"change_message_id":"998c64297b517265a0830d8ea16169c6c7a37ea4","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def get_bridge_for_tap_device(self, tap_device_name):"},{"line_number":139,"context_line":"        try:"},{"line_number":140,"context_line":"            bridge_port_path \u003d BRIDGE_FS_FOR_DEVICE.replace("},{"line_number":141,"context_line":"                DEVICE_NAME_PLACEHOLDER, tap_device_name)"},{"line_number":142,"context_line":"            return os.path.basename(os.readlink(bridge_port_path))"},{"line_number":143,"context_line":"        except OSError:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_6d38acee","line":140,"updated":"2014-11-24 13:47:33.000000000","message":"this path points to bridge, not a bridge port,  so I think it makes more sense to call it \"bridge_path\"","commit_id":"30028807de1b5fe43c87e0459e6a37e87e8d1245"},{"author":{"_account_id":12697,"name":"Miroslav Los","email":"mirlos@cisco.com","username":"mirlos"},"change_message_id":"7dcf67bf6b55b4486586e3898ff19a699c7c8364","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def get_bridge_for_tap_device(self, tap_device_name):"},{"line_number":139,"context_line":"        try:"},{"line_number":140,"context_line":"            bridge_port_path \u003d BRIDGE_FS_FOR_DEVICE.replace("},{"line_number":141,"context_line":"                DEVICE_NAME_PLACEHOLDER, tap_device_name)"},{"line_number":142,"context_line":"            return os.path.basename(os.readlink(bridge_port_path))"},{"line_number":143,"context_line":"        except OSError:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_6096f33f","line":140,"in_reply_to":"5a890539_6d38acee","updated":"2014-11-24 14:07:30.000000000","message":"I intended to indicate that the path value is under the device\u0027s tree, not the bridges. Would \u0027bridge_link_path\u0027 be a good compromise?","commit_id":"30028807de1b5fe43c87e0459e6a37e87e8d1245"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"9fea2e93bc2ed513161b4723fc460e7241b44f31","unresolved":false,"context_lines":[{"line_number":56,"context_line":"BRIDGE_INTERFACES_FS \u003d BRIDGE_FS + BRIDGE_NAME_PLACEHOLDER + \"/brif/\""},{"line_number":57,"context_line":"DEVICE_NAME_PLACEHOLDER \u003d \"device_name\""},{"line_number":58,"context_line":"BRIDGE_PORT_FS_FOR_DEVICE \u003d BRIDGE_FS + DEVICE_NAME_PLACEHOLDER + \"/brport\""},{"line_number":59,"context_line":"BRIDGE_FS_FOR_DEVICE \u003d BRIDGE_PORT_FS_FOR_DEVICE + \"/bridge\""},{"line_number":60,"context_line":"VXLAN_INTERFACE_PREFIX \u003d \"vxlan-\""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_7f19fb86","line":59,"updated":"2014-12-04 11:24:39.000000000","message":"AFAIK, physical device like ethX, emX, etc doesn\u0027t locate under this directory.\n\nAs a result, \u0027bridge addif\u0027 is always executed when we re-attach the physical device to bridge.\n\nUnder such circumstance, an exception will be thrown:\n2014-12-04 18:47:46.210 9680 ERROR neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent [req-0b93c16e-ffa3-4c54-b6e4-94bba524110c None] Unable to add eth2 to brq34c0722d-c6! Exception:\nCommand: [\u0027sudo\u0027, \u0027brctl\u0027, \u0027addif\u0027, \u0027brq34c0722d-c6\u0027, \u0027eth2\u0027]\nExit code: 1\nStdout: \u0027\u0027\nStderr: \"device eth2 is already a member of a bridge; can\u0027t enslave it to bridge brq34c0722d-c6.\\n\"\n\nThen bad things will happen.\n\nThis situation happened when I merged this patch to my test environment.","commit_id":"7833fce436b3caa4596b23070c9fb870ef4ca0e4"},{"author":{"_account_id":12697,"name":"Miroslav Los","email":"mirlos@cisco.com","username":"mirlos"},"change_message_id":"4daa94e7bb01621793517be049d99c604e244a0a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"BRIDGE_INTERFACES_FS \u003d BRIDGE_FS + BRIDGE_NAME_PLACEHOLDER + \"/brif/\""},{"line_number":57,"context_line":"DEVICE_NAME_PLACEHOLDER \u003d \"device_name\""},{"line_number":58,"context_line":"BRIDGE_PORT_FS_FOR_DEVICE \u003d BRIDGE_FS + DEVICE_NAME_PLACEHOLDER + \"/brport\""},{"line_number":59,"context_line":"BRIDGE_FS_FOR_DEVICE \u003d BRIDGE_PORT_FS_FOR_DEVICE + \"/bridge\""},{"line_number":60,"context_line":"VXLAN_INTERFACE_PREFIX \u003d \"vxlan-\""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_ade179d1","line":59,"in_reply_to":"5a890539_7f19fb86","updated":"2014-12-04 12:14:17.000000000","message":"Hi, may I know the system you\u0027re trying this under (e.g. uname -a output)?\n\nOn my systems, the symlink does exist:\n\n$ ls -l /sys/class/net/eth2/brport/bridge\nlrwxrwxrwx 1 root root 0 Dec  4 11:58 /sys/class/net/eth2/brport/bridge -\u003e ../../../../../../virtual/net/brq1a8c7486-2f\n\nplease report on which bridge the eth2 interface was at the moment of the failure, e.g. via:\n$ ip link show eth2\n4: eth2: \u003cBROADCAST,MULTICAST,PROMISC,UP,LOWER_UP\u003e mtu 1500 qdisc pfifo_fast master brq1a8c7486-2f state UP mode DEFAULT group default qlen 1000\n\nFinally, if the original symlink is indeed missing in your system, does an alternative symlink exist which we could use instead:\n\n~$ ls -l /sys/class/net/eth2/master\nlrwxrwxrwx 1 root root 0 Dec  4 11:57 /sys/class/net/eth2/master -\u003e ../../../../../virtual/net/brq1a8c7486-2f","commit_id":"7833fce436b3caa4596b23070c9fb870ef4ca0e4"},{"author":{"_account_id":12697,"name":"Miroslav Los","email":"mirlos@cisco.com","username":"mirlos"},"change_message_id":"ebb7ebed001a01cd096d9fd566ab8ed86cc5b2c8","unresolved":false,"context_lines":[{"line_number":56,"context_line":"BRIDGE_INTERFACES_FS \u003d BRIDGE_FS + BRIDGE_NAME_PLACEHOLDER + \"/brif/\""},{"line_number":57,"context_line":"DEVICE_NAME_PLACEHOLDER \u003d \"device_name\""},{"line_number":58,"context_line":"BRIDGE_PORT_FS_FOR_DEVICE \u003d BRIDGE_FS + DEVICE_NAME_PLACEHOLDER + \"/brport\""},{"line_number":59,"context_line":"BRIDGE_FS_FOR_DEVICE \u003d BRIDGE_PORT_FS_FOR_DEVICE + \"/bridge\""},{"line_number":60,"context_line":"VXLAN_INTERFACE_PREFIX \u003d \"vxlan-\""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_f37c4473","line":59,"in_reply_to":"5a890539_ade179d1","updated":"2014-12-04 13:01:43.000000000","message":"Please ignore the previous comment","commit_id":"7833fce436b3caa4596b23070c9fb870ef4ca0e4"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"e9d4c7ed9b0d95c4ce62c1ab245bbb5ce0ceb7bc","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                DEVICE_NAME_PLACEHOLDER, tap_device_name)"},{"line_number":143,"context_line":"            return os.path.basename(os.readlink(bridge_link_path))"},{"line_number":144,"context_line":"        except OSError:"},{"line_number":145,"context_line":"            return None"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def is_device_on_bridge(self, device_name):"},{"line_number":148,"context_line":"        if not device_name:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_a547a976","line":145,"updated":"2014-11-26 23:41:29.000000000","message":"pass\n\nA method that gets to the end automatically returns None.","commit_id":"7833fce436b3caa4596b23070c9fb870ef4ca0e4"},{"author":{"_account_id":12697,"name":"Miroslav Los","email":"mirlos@cisco.com","username":"mirlos"},"change_message_id":"fa24cf4e113ee5ef233e1e9835f547c26ee1a1a8","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                DEVICE_NAME_PLACEHOLDER, tap_device_name)"},{"line_number":143,"context_line":"            return os.path.basename(os.readlink(bridge_link_path))"},{"line_number":144,"context_line":"        except OSError:"},{"line_number":145,"context_line":"            return None"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def is_device_on_bridge(self, device_name):"},{"line_number":148,"context_line":"        if not device_name:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_f3488d30","line":145,"in_reply_to":"5a890539_a547a976","updated":"2014-11-27 11:58:12.000000000","message":"An explicit return None signifies that None shall be the correct value returned (which happens when the link does not exist, i.e. the device has no master bridge).\n\nThis pattern is used at various places throughout the codebase, and indeed was used in the previous version of this method as well. I see no reason for a change here.","commit_id":"7833fce436b3caa4596b23070c9fb870ef4ca0e4"}]}
