l2pop raising exceptions when host has no tunneling_ip or agent

Bug #1672564 reported by Kevin Benton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Kevin Benton

Bug Description

Similar to https://bugs.launchpad.net/neutron/+bug/1533013, l2pop can puke out exceptions when a port is deleted that has a host corresponding to either no agent or an agent without a tunneling_ip.

2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers [req-510f740d-06f7-4021-a966-09cee40214b8 3bf25c0ae26d43b3850b456393c12c60 7
23aab91248340919c7eb815f20a52cc - - -] Mechanism driver 'l2population' failed in delete_port_postcommit
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers Traceback (most recent call last):
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers File "/openstack/venvs/neutron-14.0.5/lib/python2.7/site-packages/neutron/
plugins/ml2/managers.py", line 433, in _call_on_drivers
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers getattr(driver.obj, method_name)(context)
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers File "/openstack/venvs/neutron-14.0.5/lib/python2.7/site-packages/neutron/
plugins/ml2/drivers/l2pop/mech_driver.py", line 74, in delete_port_postcommit
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers port, agent_host)
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers File "/openstack/venvs/neutron-14.0.5/lib/python2.7/site-packages/neutron/
plugins/ml2/drivers/l2pop/mech_driver.py", line 312, in _get_agent_fdb
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers if not self._validate_segment(segment, port['id'], agent):
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers File "/openstack/venvs/neutron-14.0.5/lib/python2.7/site-packages/neutron/
plugins/ml2/drivers/l2pop/mech_driver.py", line 190, in _validate_segment
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers network_types = l2pop_db.get_agent_l2pop_network_types(agent)
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers File "/openstack/venvs/neutron-14.0.5/lib/python2.7/site-packages/neutron/
plugins/ml2/drivers/l2pop/db.py", line 52, in get_agent_l2pop_network_types
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers configuration = jsonutils.loads(agent.configurations)
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers AttributeError: 'NoneType' object has no attribute 'configurations'
2017-03-09 01:34:17.432 42625 ERROR neutron.plugins.ml2.managers
2017-03-09 01:34:17.433 42625 ERROR neutron.plugins.ml2.plugin [req-510f740d-06f7-4021-a966-09cee40214b8 3bf25c0ae26d43b3850b456393c12c60 723
aab91248340919c7eb815f20a52cc - - -] mechanism_manager.delete_port_postcommit failed for port e0c420ee-dd08-4aa8-9743-e1ae18638551
2017-03-09 01:34:17.455 42625 INFO neutron.wsgi [req-510f740d-06f7-4021-a966-09cee40214b8 3bf25c0ae26d43b3850b456393c12c60 723aab91248340919c7eb815f20a52cc - - -] 10.146.200.46,10 tel:10.146.200.46,10 .146.200.9 - - [09/Mar/2017 01:34:17] "DELETE /v2.0/ports/e0c420ee-dd08-4aa8-9743-e1ae18638551.json HTTP/1.1" 204 168 0.727523
```

Changed in neutron:
assignee: nobody → Kevin Benton (kevinbenton)
importance: Undecided → Medium
importance: Medium → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/445253

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/445253
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c7fb24b3cb9cda1cc78e834a0153d219995ce97f
Submitter: Jenkins
Branch: master

commit c7fb24b3cb9cda1cc78e834a0153d219995ce97f
Author: Kevin Benton <email address hidden>
Date: Mon Mar 13 15:06:22 2017 -0700

    Check for None in _get_agent_fdb for agent

    get_agent_by_host can return None in the l2pop
    driver so we need to check for that case before
    we blindly try to decode configuration values on
    the result.

    There are a couple of cases that can lead to this.
    * The deployment can be misconfigured and is missing
      either a tunneling_ip option for the agent on a
      host or is missing an L2 agent with that host_id
      entirely.
    * Multiple mech drivers are in use and a port is being
      deleted from an agentless host.

    Related-Bug: #1533013
    Closes-Bug: #1672564
    Change-Id: I1e79f600172edad1e31e8231a0a6a2c55f46804c

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.0.0b1

This issue was fixed in the openstack/neutron 11.0.0.0b1 development milestone.

Revision history for this message
Esha Seth (eshaseth) wrote :

I am facing the same issue in ocata, I tried this defect fix and that solved the issue. <email address hidden> could you cherrypick and backport this to ocata also?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/460867

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ocata)

Reviewed: https://review.openstack.org/460867
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=f15031f406b61f12e809e15d1b83bb24cdafd494
Submitter: Jenkins
Branch: stable/ocata

commit f15031f406b61f12e809e15d1b83bb24cdafd494
Author: Kevin Benton <email address hidden>
Date: Mon Mar 13 15:06:22 2017 -0700

    Check for None in _get_agent_fdb for agent

    get_agent_by_host can return None in the l2pop
    driver so we need to check for that case before
    we blindly try to decode configuration values on
    the result.

    There are a couple of cases that can lead to this.
    * The deployment can be misconfigured and is missing
      either a tunneling_ip option for the agent on a
      host or is missing an L2 agent with that host_id
      entirely.
    * Multiple mech drivers are in use and a port is being
      deleted from an agentless host.

    Related-Bug: #1533013
    Closes-Bug: #1672564
    Change-Id: I1e79f600172edad1e31e8231a0a6a2c55f46804c
    (cherry picked from commit c7fb24b3cb9cda1cc78e834a0153d219995ce97f)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 10.0.2

This issue was fixed in the openstack/neutron 10.0.2 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.