Bug 783329 - System Templates - update package check to use elastic search
Summary: System Templates - update package check to use elastic search
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.1
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2012-01-20 01:19 UTC by Brad Buckingham
Modified: 2019-09-26 13:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:21:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Brad Buckingham 2012-01-20 01:19:20 UTC
Description of problem:

In the System Templates UI, when a user selects a package (e.g. [product-X] => Packages => [package-Y]) to add to a template, the UI will send an 'auto_complete_locker' request to Katello to retrieve/validate the package.  In the current implementation, the UI packages_controller will use the pulp API (Pulp::Package.name_search) to retrieve the details; however, for efficiency, we'd like to use elastic search to perform this (e.g. Glue::Pulp::Package.name_search).  

Unfortunately, the API using elastic search does not return the correct result.  In many cases, the package is not found which will result in the behavior described by bug 773454.  

After initial investigation, it appears that this may be related to the indexing of packages not occurring properly.  The indexing occurs after a repo sync completes (app/models/repository.rb - index_packages).

For example, 

- sync a repo (e.g. rhel-6)

- from rails console, query all packages:
 
  irb(main):025:0> s = Tire.search('katello_package') {query {all}}

  irb(main):024:0> s.results.length
  => 10

  Given the above search, we should see several thousand packages returned.

Version-Release number of selected component (if applicable):
git master

How reproducible:
always

Comment 1 Brad Buckingham 2012-01-24 17:20:23 UTC
commit - e4f68e7f04bad063476be2d27db0912e59f73184

Updated the indexing of packages to support an ngram filter.  This allows us to support 'auto-complete' for package names as well as queries of the complete package name.  Updated the system-templates UI to use elastic search.

Comment 2 Mike McCune 2012-01-26 19:07:08 UTC
mass ON_QA move

Comment 4 Corey Welton 2012-02-07 18:21:39 UTC
QA Verified.

Comment 6 Mike McCune 2013-08-16 17:51:54 UTC
getting rid of 6.0.0 version since that doesn't exist


Note You need to log in before you can comment on or make changes to this bug.