local_ip should be validated when ovs-agent starts

Bug #1284684 reported by Darragh O'Reilly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Jakub Libosvar
oslo-incubator
Fix Released
Wishlist
Jakub Libosvar

Bug Description

https://github.com/openstack/neutron/blob/2702baed390d094b0eac07d0ae167ed236868d00/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py#L1327

The ovs agent will currently accepts anything for local_ip, and sends it to the plugin with the sync_tunnels rpc, and then all other agents will try to make tunnel ports using it as the remote_ip. Then the only way to get rid of it is to manually delete the row in the DB.

If tunneling is enabled, netaddr.IPAddress() could be used to validate that local_ip is a proper IP address. Only IPv4 tunnels are currently supported for GRE - not sure about VxLAN. Maybe a check that local_ip actually exists on the host too.

tags: added: low-hanging-fruit ovs
Daniel Gollub (d-gollub)
Changed in neutron:
assignee: nobody → Daniel Gollub (d-gollub)
status: New → In Progress
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/77100

Changed in neutron:
importance: Undecided → Medium
milestone: none → icehouse-3
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-3 → icehouse-rc1
Changed in neutron:
status: In Progress → Triaged
milestone: icehouse-rc1 → none
Changed in neutron:
status: Triaged → In Progress
Mark McLoughlin (markmc)
Changed in oslo:
status: New → Triaged
importance: Undecided → Wishlist
assignee: nobody → Jakub Libosvar (libosvar)
status: Triaged → In Progress
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :
tags: added: config
Changed in oslo:
status: In Progress → Fix Committed
Revision history for this message
Sudhakar Gariganti (sudhakar-gariganti) wrote :

Now that we have the config value itself typechecked with oslo side enhancement, should we close the defect ?

Revision history for this message
Jakub Libosvar (libosvar) wrote :

I think not. Once new version of oslo.config is released we should change the type in Neutron.

Changed in oslo:
milestone: none → juno-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in neutron:
assignee: Daniel Gollub (d-gollub) → Jakub Libosvar (libosvar)
Changed in neutron:
milestone: none → kilo-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit be6ab2449d8daeabec124c3c601f1aa2d3b5c6ec
Author: Jakub Libosvar <email address hidden>
Date: Tue Jul 29 10:50:12 2014 +0200

    Validate local_ip for OVS agent is actual ip address

    tunnel_sync() writes this value into ovsdb and value is not validated. In
    case non-ip value is written into ovsdb row must be deleted manually.

    Change-Id: I57eee81e6821eb2cb26b3d07a39bc94b81243570
    Closes-bug: #1284684

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Kyle Mestery (<email address hidden>) on branch: master
Review: https://review.openstack.org/77100
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-1 → 2015.1.0
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.