No routing defined for deleting subnet (and port)

Bug #1588540 reported by Steve McLellan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Searchlight
Fix Released
Critical
Steve McLellan

Bug Description

This may be an elasticsearch 2.x only problem since it enforces rules more strictly.

On deleting subnets (and, i will presume, ports):

  2016-06-02 21:32:02.939 20039 ERROR searchlight.elasticsearch.plugins.neutron.notification_handlers [-] Error deleting subnet ae4c815e-07ee-4ebb-b28c-c3b8add42af5 from index: (u'2 document(s) failed to index.', [{u'delete': {u'status': 400, u'_type': u'OS::Neutron::Subnet', u'_id': u'ae4c815e-07ee-4ebb-b28c-c3b8add42af5_ADMIN', u'_index': u'searchlight-2016_06_02_21_10_46', u'error': {u'index': u'searchlight-2016_06_02_21_10_46', u'reason': u'routing is required for [searchlight-2016_06_02_21_10_46]/[OS::Neutron::Subnet]/[ae4c815e-07ee-4ebb-b28c-c3b8add42af5_ADMIN]', u'type': u'routing_missing_exception'}}}, {u'delete': {u'status': 400, u'_type': u'OS::Neutron::Subnet', u'_id': u'ae4c815e-07ee-4ebb-b28c-c3b8add42af5_USER', u'_index': u'searchlight-2016_06_02_21_10_46', u'error': {u'index': u'searchlight-2016_06_02_21_10_46', u'reason': u'routing is required for [searchlight-2016_06_02_21_10_46]/[OS::Neutron::Subnet]/[ae4c815e-07ee-4ebb-b28c-c3b8add42af5_USER]', u'type': u'routing_missing_exception'}}}])

We need to provide routing for all operations for parent/child plugins.

Revision history for this message
Steve McLellan (sjmc7) wrote :

This does also affect ports. In ES1.x the DELETE would be broadcast to all nodes, but this isn't the case in 2.x.

tags: added: elasticsearch-2
Steve McLellan (sjmc7)
Changed in searchlight:
assignee: nobody → Steve McLellan (sjmc7)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to searchlight (master)

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

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

Reviewed: https://review.openstack.org/325698
Committed: https://git.openstack.org/cgit/openstack/searchlight/commit/?id=a15e3e615af1181ebee02485d1390047e43b9b5a
Submitter: Jenkins
Branch: master

commit a15e3e615af1181ebee02485d1390047e43b9b5a
Author: Steve McLellan <email address hidden>
Date: Fri Jun 3 21:52:55 2016 -0500

    Determine routing before delete on neutron events

    Since delete notifications don't contain the parent network_id, we can't
    determine a routing id in these cases. project_id would be an
    alternative choice for routing but doesn't cover cases where subnets can
    be attached to another tenant's network (and thus routing by project_id
    would leave unpredictable results).

    Patch runs a search request to get the parent (and routing) id for
    subnet and port deletes. Upstream patch
    https://review.openstack.org/#/c/289050 will make this unnecessary if it
    ever merges; at that point we can get the network_id from the payload.

    Additionally fixes some issues in the index helper code related to
    accessing metafields (_routing, _parent) in searches that changed
    between ES 1.x and 2.x.

    Closes-Bug: #1588540
    Change-Id: I6d6ccfe47d50a489d0c8e6eff8fbd7a792687b25

Changed in searchlight:
status: In Progress → Fix Released
Changed in searchlight:
milestone: none → newton-2
tags: added: mitaka-backport-potential
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/searchlight 1.0.0.0b2

This issue was fixed in the openstack/searchlight 1.0.0.0b2 development milestone.

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.