Glance images not searchable after update notification

Bug #1486781 reported by Travis Tripp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Searchlight
Fix Released
Critical
Travis Tripp

Bug Description

After an update notification, Glance images do not seem to be searchable. If you filter by the name of the updated image it will not show up. However, if you re-index, it will be searchable.

If I change the code to be the same as what was done in this patch, it works:

https://review.openstack.org/#/c/206756/

However, when going back to the follow on patch (current master) it doesn't work:

https://review.openstack.org/#/c/207719/

It appears the index function is not making the document immediately searchable.

Revision history for this message
Travis Tripp (travis-tripp) wrote :

 A bit more details:

10:31 TravT: lakhsmiS: I see them in match all, but not in filters.
10:31 lakshmiS: no. just listing all results. any specific filter your tried?
10:31 TravT: let me give example.
10:31 TravT: i created an image with a name of listener-image
10:32 TravT: notification received
10:32 TravT: and is in unfiltered results
10:32 TravT: If I do a query like this:
10:32 TravT: {
10:32 TravT: "index": "glance",
10:32 TravT: "type": "image",
10:32 TravT: "query": {
10:32 TravT: "query_string": {
10:32 TravT: "fuzziness": "AUTO",
10:32 TravT: "query": "name:listener-image"
10:32 TravT: }
10:32 TravT: }
10:32 TravT: }
10:32 TravT: no results
10:32 TravT: if i re-run searchlight-manage index sync
10:32 lakshmiS: ok let me try that
10:32 TravT: and re-execute above, i get the result

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

If you're able to repro this, can you get the elaticsearch payload after initial indexing, after notification and after the second indexing? curl localhost:9200/glance/image/<imageid>

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

Looking at the change that was made, we're using:

          body = {
              "doc": payload
          }

The index API doesn't take a script or partial doc structure; the body should be the document on its own. I'll test and file a patch later.

Changed in searchlight:
importance: Undecided → Critical
assignee: nobody → Steve McLellan (sjmc7)
Steve McLellan (sjmc7)
Changed in searchlight:
assignee: Steve McLellan (sjmc7) → Travis Tripp (travis-tripp)
Steve McLellan (sjmc7)
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/219331
Committed: https://git.openstack.org/cgit/openstack/searchlight/commit/?id=45e27d11e6f9b19b129429d2d5f483ac58fb359e
Submitter: Jenkins
Branch: master

commit 45e27d11e6f9b19b129429d2d5f483ac58fb359e
Author: Travis Tripp <email address hidden>
Date: Tue Sep 1 10:13:12 2015 -0600

    Fix Glance Indexing after Notification

    After an update notification, Glance images do not seem
    to be searchable. If you filter by the name of the updated
    image it will not show up. However, if you re-index, it
    will be searchable.

    This is due to the code currently indexing a wrapper "doc"
    object around the actual doc. This was inadvertantly left
    in when switching from doc as upsert.

    Change-Id: I782e04fea81ba4b9a52781fadd174d51a1aa7624
    Closes-Bug: #1486781

Changed in searchlight:
status: In Progress → Fix Committed
Changed in searchlight:
milestone: none → liberty-rc1
Changed in searchlight:
status: Fix Committed → Fix Released
Changed in searchlight:
milestone: liberty-rc1 → 0.1.0.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.