Patch as-is resulted in traceback:
2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent Traceback (most recent call last): 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 1014, in daemon_loop 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent sync = self.process_network_devices(device_info) 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 870, in process_network_devices 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent resync_a = self.treat_devices_added_updated(devices_added_updated) 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 910, in treat_devices_added_updated 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent device_details['port_id']): 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 435, in add_interface 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent tap_device_name) 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 401, in add_tap_interface 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent self.ensure_tap_mtu(tap_device_name, phy_dev_name) 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 425, in ensure_tap_mtu 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent ip_lib.IPDevice(tap_dev_name).link.set_mtu(phy_dev_mtu) 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent File "/usr/local/lib/python2.7/dist-packages/neutron/agent/linux/ip_lib.py", line 258, in set_mtu 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent self._as_root('set', self.name, 'mtu', mtu_size) 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent File "/usr/local/lib/python2.7/dist-packages/neutron/agent/linux/ip_lib.py", line 242, in _as_root 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent kwargs.get('use_root_namespace', False)) 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent File "/usr/local/lib/python2.7/dist-packages/neutron/agent/linux/ip_lib.py", line 65, in _as_root 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent raise exceptions.SudoRequired() 2015-04-16 19:16:24.496 58732 TRACE neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent SudoRequired: Sudo privilege is required to run this command.
Changing line 416 to include root helper allowed it to work as expected:
>> ip_lib.IPDevice(tap_dev_name).link.set_mtu(phy_dev_mtu)
def ensure_tap_mtu(self, tap_dev_name, phy_dev_name): """Ensure the MTU on the tap is the same as the physical device.""" phy_dev_mtu = ip_lib.IPDevice(phy_dev_name).link.mtu ip_lib.IPDevice(tap_dev_name, self.root_helper).link.set_mtu(phy_dev_mtu)
Patch as-is resulted in traceback:
2015-04-16 19:16:24.496 58732 TRACE neutron. plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent Traceback (most recent call last): plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent File "/usr/local/ lib/python2. 7/dist- packages/ neutron/ plugins/ linuxbridge/ agent/linuxbrid ge_neutron_ agent.py" , line 1014, in daemon_loop plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent sync = self.process_ network_ devices( device_ info) plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent File "/usr/local/ lib/python2. 7/dist- packages/ neutron/ plugins/ linuxbridge/ agent/linuxbrid ge_neutron_ agent.py" , line 870, in process_ network_ devices plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent resync_a = self.treat_ devices_ added_updated( devices_ added_updated) plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent File "/usr/local/ lib/python2. 7/dist- packages/ neutron/ plugins/ linuxbridge/ agent/linuxbrid ge_neutron_ agent.py" , line 910, in treat_devices_ added_updated plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent device_ details[ 'port_id' ]): plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent File "/usr/local/ lib/python2. 7/dist- packages/ neutron/ plugins/ linuxbridge/ agent/linuxbrid ge_neutron_ agent.py" , line 435, in add_interface plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent tap_device_name) plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent File "/usr/local/ lib/python2. 7/dist- packages/ neutron/ plugins/ linuxbridge/ agent/linuxbrid ge_neutron_ agent.py" , line 401, in add_tap_interface plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent self.ensure_ tap_mtu( tap_device_ name, phy_dev_name) plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent File "/usr/local/ lib/python2. 7/dist- packages/ neutron/ plugins/ linuxbridge/ agent/linuxbrid ge_neutron_ agent.py" , line 425, in ensure_tap_mtu plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent ip_lib. IPDevice( tap_dev_ name).link. set_mtu( phy_dev_ mtu) plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent File "/usr/local/ lib/python2. 7/dist- packages/ neutron/ agent/linux/ ip_lib. py", line 258, in set_mtu plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent self._as_ root('set' , self.name, 'mtu', mtu_size) plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent File "/usr/local/ lib/python2. 7/dist- packages/ neutron/ agent/linux/ ip_lib. py", line 242, in _as_root plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent kwargs. get('use_ root_namespace' , False)) plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent File "/usr/local/ lib/python2. 7/dist- packages/ neutron/ agent/linux/ ip_lib. py", line 65, in _as_root plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent raise exceptions. SudoRequired( ) plugins. linuxbridge. agent.linuxbrid ge_neutron_ agent SudoRequired: Sudo privilege is required to run this command.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
2015-04-16 19:16:24.496 58732 TRACE neutron.
Changing line 416 to include root helper allowed it to work as expected:
>> ip_lib. IPDevice( tap_dev_ name).link. set_mtu( phy_dev_ mtu)
def ensure_ tap_mtu( self, tap_dev_name, phy_dev_name): IPDevice( phy_dev_ name).link. mtu
ip_lib. IPDevice( tap_dev_ name, self.root_ helper) .link.set_ mtu(phy_ dev_mtu)
"""Ensure the MTU on the tap is the same as the physical device."""
phy_dev_mtu = ip_lib.