Bug 805202 - Unable to add needed packages to system template
Unable to add needed packages to system template
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: --
Assigned To: Justin Sherrill
Garik Khachikyan
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-20 12:34 EDT by Steve Reichard
Modified: 2015-01-04 16:59 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-15 14:57:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
movie (3.11 MB, video/ogg)
2012-03-20 12:34 EDT, Steve Reichard
no flags Details
4 packages in template. (57.19 KB, image/png)
2012-04-02 10:03 EDT, Garik Khachikyan
no flags Details

  None (edit)
Description Steve Reichard 2012-03-20 12:34:19 EDT
Created attachment 571471 [details]
movie

Description of problem:

In beta 5, I attempted to make a system template to use for my target_content.xml. For this I need 4 packages: aeolus-audrey-agent, katello-agent, open-vm-tools, and rhev-agent.   I could only add rhev-agent and katello-agent.  The search for the other two did not find the packages.  The process of adding them by searching on the right side is left side is very time consuming and annoying.


I confirmed that the packages are available.


[root@cf-se1 ~]# ls /var/lib/pulp/packages/open-vm-tools/8.8.0/4.el6/x86_64/afc/open-vm-tools-8.8.0-4.el6.x86_64.rpm 
/var/lib/pulp/packages/open-vm-tools/8.8.0/4.el6/x86_64/afc/open-vm-tools-8.8.0-4.el6.x86_64.rpm
[root@cf-se1 ~]# ls /var/lib/pulp/packages/aeolus-audrey-agent/0.4.4/
2.el6/ 4.el6/ 
[root@cf-se1 ~]# ls /var/lib/pulp/packages/aeolus-audrey-agent/0.4.4/
2.el6/ 4.el6/ 
[root@cf-se1 ~]# ls /var/lib/pulp/packages/aeolus-audrey-agent/0.4.4/4.el6/noarch/0a6/aeolus-audrey-agent-0.4.4-4.el6.noarch.rpm 
/var/lib/pulp/packages/aeolus-audrey-agent/0.4.4/4.el6/noarch/0a6/aeolus-audrey-agent-0.4.4-4.el6.noarch.rpm
[root@cf-se1 ~]# 




See video of problem


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


[root@cf-se1 ~]# /pub/scripts/post_install_configuration_scripts/cf-se-versions 
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Linux cf-se1.cloud.lab.eng.bos.redhat.com 2.6.32-220.7.1.el6.x86_64 #1 SMP Fri Feb 10 15:22:22 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
PyYAML-3.09-14.el6_1.x86_64
facter-1.5.9-1.el6.noarch
js-1.8.5-6.el6.x86_64
mongodb-1.8.2-3.el6.x86_64
mongodb-server-1.8.2-3.el6.x86_64
puppet-2.6.14-1.el6.noarch
pymongo-1.9-8.el6_1.x86_64
tomcat6-6.0.24-35.el6_1.noarch
ruby-1.8.7.352-6.el6.x86_64
grinder-0.0.139-1.el6.noarch
postgresql-server-8.4.9-1.el6_1.1.x86_64
postgresql-8.4.9-1.el6_1.1.x86_64
candlepin-0.5.26-1.el6.noarch
pulp-1.0.0-4.el6.noarch
katello-0.1.304-1.el6.noarch
katello-all-0.1.304-1.el6.noarch
katello-cli-0.1.104-1.el6.noarch
katello-configure-0.1.104-1.el6.noarch
[root@cf-se1 ~]# 


How reproducible:

was able to recreate for video,  even attempted a new template.


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Hugh Brock 2012-03-20 14:28:58 EDT
Is this a real bug? If so it's clearly a beta 6 blocker. Set appropriate flags.
Comment 2 Mike McCune 2012-03-20 19:59:19 EDT
still investigating.  will ack this ASAP as we know for sure
Comment 4 Brad Buckingham 2012-03-21 13:17:40 EDT
After debugging on the environment that is showing the problem, found that the build did not include a couple of commits that recently went in under a bug for 'search consistency'.  That was bug 790063.  Refer to the bug for details on the commits.

Temporarily monkey patched a few files on the environment and confirmed that with those changes adding the packages mentioned (e.g. open-vm-tools and aeolus-audrey-agent) worked correctly.  The files included in the patch were app/controllers/repositories_controller.rb, app/models/glue/pulp/package.rb and lib/util/search.rb.  (Note: the monkey patch has since been backed out.)
Comment 5 Garik Khachikyan 2012-03-22 06:51:45 EDT
# COMMENT

For QE please - could you share the scenario: what repos to sync/promote. What is the final goal - what repos/packages should contain the exported template?

btw: template could be exported only when it has 1 distribution and at least one repo there.
Comment 6 scollier 2012-03-22 10:30:40 EDT
Based on Steve's opening comment, there are 4 packages he needs:

aeolus-audrey-agent - DID NOT WORK
katello-agent - WORKED
open-vm-tools - DID NOT WORK
rhev-agent - WORKED

Steve was sync'ing from RH QA CDN, here is the repo he was syncing:

"Red Hat CloudForms Tools for RHEL 6 Beta RPMs x86_64 6Server"

The packages that did not work, come from that repo.
Comment 10 Justin Sherrill 2012-03-27 13:40:39 EDT
Reopening.   I believe the root cause of this is due to a couple of reasons:

1. In order to validate that the package exists, we're just using the existing auto-complete search.
2. The auto complete uses a custom analyzer that only considers the first 10 characters of the name.

as a results adding something like "aeolus-confserver"  would do a search that would be the equivalent of searching for 'aeolus-con'.  Since it is doing an autocomplete search, only the first 5 or so results are returned.  If there are more than 5 that start with those 10 characters its not deterministic whether or not you'll actually get the single packages you need.  

Couple of ways to solve this issue in the short term:

1. Increase the max_gram to 20 or 30.  Could still cause a problem when packages have more than 30 characters in the name for example.

2. Use a different type of search to find a package with that exact name.  Should completely solve the issue. 


Long term i think we should see if it makes sense to validate at add time (versus save time).
Comment 11 Justin Sherrill 2012-03-27 16:42:47 EDT
Went for option 2.

katello master  237ba85cc6187e13c58c33f9576b05c54703409b
Comment 15 Garik Khachikyan 2012-04-02 10:03:03 EDT
Created attachment 574514 [details]
4 packages in template.
Comment 16 errata-xmlrpc 2012-05-15 14:57:38 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0665.html

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