← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1291915] Re: neutron-netns-cleanup script doesn't work in icehouse/havana, code is broken

 

Reviewed:  https://review.openstack.org/85503
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5417220fc50fb31218ed1ed2aba6b926591c5f81
Submitter: Jenkins
Branch:    milestone-proposed

commit 5417220fc50fb31218ed1ed2aba6b926591c5f81
Author: Miguel Angel Ajo <mangelajo@xxxxxxxxxx>
Date:   Tue Mar 18 13:33:19 2014 +0100

    fixes broken neutron-netns-cleanup
    
    Some configuration parameters used in neutron.agent.linux.utils
    were missing. The namespace attribute in the FakeNetwork object
    was missing, and used in neutron.agent.linux.dhcp. Also, the
    plugin object was missing for release_dhcp_port operation.
    
    We provide a fake plugin object to accept current and any future
    plugin calls as this is meant to be an standalone tool that
    should work without any RPC connectivity.
    
    FakeNetwork was switched for neutron.agent.linux.dhcp.NetModel
    to follow any future changes in NetModel.
    
    Two wrong called_once_with_args calls without assert were fixed.
    
    Change-Id: Ia51ea9bd4c8eea6b250858964ad5286c933702e0
    Closes-Bug: #1291915
    Partial-Bug: #1297875
    (cherry picked from commit 907bf41afbdb9f565c45a535f637c8928d0be52a)


** Changed in: neutron
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1291915

Title:
  neutron-netns-cleanup script doesn't work in icehouse/havana, code is
  broken

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  1st) Some configuration options are not registered on the tool, but
  they're used in neutron.agent.linux.dhcp  during execution

  $ neutron-netns-cleanup --debug --force --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --config-file  /etc/neutron/plugins/ml2/ml2_conf.ini
  2014-03-12 14:55:44.791 INFO neutron.common.config [-] Logging enabled!
  2014-03-12 14:55:44.792 DEBUG neutron.agent.linux.utils [-] Running command: ['sudo', '/usr/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'list'] from (pid=1785) create_process /opt/stack/neutron/neutron/agent/linux/utils.py:48
  2014-03-12 14:55:45.001 DEBUG neutron.agent.linux.utils [-]
  Command: ['sudo', '/usr/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'list']
  Exit code: 0
  Stdout: 'qdhcp-65cb66de-82d0-407c-aa23-2c544528f0d2\nqrouter-acc5f724-a169-4ffc-9e81-f00d43954509\nqrouter-5ed23337-9538-4994-823f-c64720506e54\n'
  Stderr: '' from (pid=1785) execute /opt/stack/neutron/neutron/agent/linux/utils.py:74
  2014-03-12 14:55:47.006 ERROR neutron.agent.linux.dhcp [-] Error importing interface driver 'neutron.agent.linux.interface.OVSInterfaceDriver': no such option: ovs_use_veth
  Error importing interface driver 'neutron.agent.linux.interface.OVSInterfaceDriver': no such option: ovs_use_veth

  2nd) When we try to destroy a network, there's a dependency on the
  .namespace attribute of the network, that wasn't before.

  Stderr: '' from (pid=1969) execute /opt/stack/neutron/neutron/agent/linux/utils.py:74
  2014-03-12 15:08:53.048 ERROR neutron.agent.netns_cleanup_util [-] Error unable to destroy namespace: qdhcp-65cb66de-82d0-407c-aa23-2c544528f0d2
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util Traceback (most recent call last):
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util   File "/opt/stack/neutron/neutron/agent/netns_cleanup_util.py", line 131, in destroy_namespace
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util     kill_dhcp(conf, namespace)
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util   File "/opt/stack/neutron/neutron/agent/netns_cleanup_util.py", line 86, in kill_dhcp
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util     dhcp_driver.disable()
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util   File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 181, in disable
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util     self.device_manager.destroy(self.network, self.interface_name)
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util   File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 814, in destroy
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util     self.driver.unplug(device_name, namespace=network.namespace)
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util AttributeError: 'FakeNetwork' object has no attribute 'namespace'
  2014-03-12 15:08:53.048 TRACE neutron.agent.netns_cleanup_util

  3rd) This error will happen because no plugin rpc connection is provided, 
  and that's used in /opt/stack/neutron/neutron/agent/linux/dhcp.py as self.plugin.release_dhcp_port

  2014-03-13 12:00:07.880 ERROR neutron.agent.netns_cleanup_util [-] Error unable to destroy namespace: qdhcp-388a37af-556d-4f4c-98b4-0ba41f944e32
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util Traceback (most recent call last):
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util   File "/opt/stack/neutron/neutron/agent/netns_cleanup_util.py", line 132, in destroy_namespace
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util     kill_dhcp(conf, namespace)
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util   File "/opt/stack/neutron/neutron/agent/netns_cleanup_util.py", line 87, in kill_dhcp
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util     dhcp_driver.disable()
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util   File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 181, in disable
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util     self.device_manager.destroy(self.network, self.interface_name)
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util   File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 816, in destroy
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util     self.plugin.release_dhcp_port(network.id,
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util AttributeError: 'NoneType' object has no attribute 'release_dhcp_port'
  2014-03-13 12:00:07.880 TRACE neutron.agent.netns_cleanup_util

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1291915/+subscriptions


References