Bug 976400 - Excluded RHEL package is available to install.
Excluded RHEL package is available to install.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
6.0.1
Unspecified Unspecified
high Severity high (vote)
: Unspecified
: --
Assigned To: Partha Aji
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-20 09:48 EDT by Hayk Hovsepyan
Modified: 2014-04-24 13:08 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-24 13:08:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hayk Hovsepyan 2013-06-20 09:48:25 EDT
Description of problem:
RHEL repo package which was excluded by content definition filter and promoted is still available to install on client.


Version-Release number of selected component (if applicable):
Katello-Katello-Installation-RegisterRHNClassic-1.1-4.noarch
foreman-installer-puppet-tftp-0-5.ea6c5e5.el6sat.noarch
foreman-1.1.10011-1.noarch
openldap-2.4.23-31.el6.x86_64
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
katello-glue-elasticsearch-1.4.2-14.el6sat.noarch
katello-1.4.2-14.el6sat.noarch
candlepin-tomcat6-0.8.9-1.el6_4.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
candlepin-cert-consumer-cfseserver3.usersys.redhat.com-1.0-1.noarch
signo-0.0.18-1.el6sat.noarch
apr-util-ldap-1.3.9-3.el6_0.1.x86_64
Katello-Katello-Installation-Satellite6Latest-1.0-8.noarch
foreman-installer-puppet-concat-0-2.d776701.git.0.21ef926.el6sat.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-qpid-client-key-pair-1.0-1.noarch
pulp-rpm-handlers-2.1.2-0.3.beta.el6sat.noarch
foreman-installer-puppet-foreman-0-6.568c5c4.el6sat.noarch
foreman-installer-puppet-puppet-0-3.ab46748.el6sat.noarch
katello-cli-1.4.2-7.el6sat.noarch
python-ldap-2.3.10-1.el6.x86_64
katello-certs-tools-1.4.2-2.el6sat.noarch
pulp-server-2.1.2-0.3.beta.el6sat.noarch
katello-configure-1.4.3-16.el6sat.noarch
pulp-selinux-2.1.2-0.3.beta.el6sat.noarch
ruby193-rubygem-ldap_fluff-0.2.2-1.el6sat.noarch
foreman-proxy-1.1.10003-1.el6sat.noarch
candlepin-scl-1-5.el6_4.noarch
elasticsearch-0.19.9-8.el6sat.noarch
katello-common-1.4.2-14.el6sat.noarch
katello-glue-candlepin-1.4.2-14.el6sat.noarch
katello-selinux-1.4.3-3.el6sat.noarch
candlepin-selinux-0.8.9-1.el6_4.noarch
katello-all-1.4.2-14.el6sat.noarch
katello-agent-1.4.2-4.el6sat.noarch
foreman-installer-puppet-xinetd-0-50a267b8.git.0.44aca6a.el6sat.noarch
foreman-installer-puppet-dhcp-0-5.3a4a13c.el6sat.noarch
katello-cli-common-1.4.2-7.el6sat.noarch
foreman-postgresql-1.1.10011-1.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
ruby193-rubygem-net-ldap-0.3.1-2.el6sat.noarch
pulp-rpm-plugins-2.1.2-0.3.beta.el6sat.noarch
foreman-proxy-installer-1.0.1-10.f5ae2cd.el6sat.noarch
signo-katello-0.0.18-1.el6sat.noarch
katello-glue-pulp-1.4.2-14.el6sat.noarch
katello-configure-foreman-1.4.3-16.el6sat.noarch
candlepin-0.8.9-1.el6_4.noarch
katello-foreman-all-1.4.2-14.el6sat.noarch
Katello-Katello-Configuration-KatelloClient-1.1-49.noarch
foreman-installer-puppet-foreman_proxy-0-8.bd1e35d.el6sat.noarch
foreman-installer-puppet-dns-0-7.fcae203.el6sat.noarch
Katello-Katello-Sanity-ImportKeys-1.2-1.noarch

How reproducible:
always

Steps to Reproduce:
1. Import valid manifest, enable RHEL repo and sync it.
2. Create some environments (dev, test, prod ...)
3. Create content definition, add RHEL repo into it, and create a filter there to exclude some package (for example "zsh"). Publish content definition.
4. Create changeset to promote content view to "prod" environment. Apply that changeset.
5. In content search you will see that filtered errata is not available.
6. Create activation key with RHEL repo pool and promoted content view. Register client by that activation key.
7. On client side try to install excluded package by yum or by system install, you will see that it installs, which is bug.

Actual results:
excluded package is available to install on client. "yum install -y zsh"

Expected results:
it should not be available to install

Additional info:
however that package is not available in content search
Comment 2 Brad Buckingham 2013-06-20 13:12:57 EDT
Based on some testing (using dev env), it appears that this issue might be related to the elasticsearch indexing (associated with the repo sync) not being completed before the content view is published.  

For example, I observed the following:

1. create RHEL provider/product/repo
2. sync RHEL repo
3. as soon as 2, showed 'sync completed', created content view definition, added rhel repo, added filter to exclude a few package
4. published view (Note: the filtering logic uses the information in elasticsearch.)
5. promoted view to dev

At this point, I noticed via content search that the published view included all packages.

6. I then went back and refreshed the view.  Once that completed, observed in content search that the packages were correctly excluded.
7. I then published another view off that same definition (to confirm it wasn't a publish vs refresh issue).  Once that completed, observed in content search that the packages were correctly excluded.

Discussed with Justin the package/errata indexing that occurs during a repo sync and based on that discussion, it was confirmed that the 'sync completed' which is shown on Sync Status does not indicate that all 'work' associated with the sync is finished.  It effectively indicates that the pulp task associated with the sync has completed; however, it does not account for additional processing that needs to be done, such as the pulp publishing of the repo or the indexing of the content in elasticsearch.  From the discussion, it sounds like there may not be a quick fix as katello is monitoring the pulp task associated with the repo sync; however, once that pulp task is completed, it becomes 'history' and can no longer be monitored.
Comment 3 Justin Sherrill 2013-06-20 13:23:05 EDT
To clarify, if you wait long enough after the sync is completed (and katello correctly indexes the packages), everything should work fine.  

Also with some of the recent changes we've made indexing should now take about half the time it used to when this bug was discovered (1-2 minutes from ~4 minutes).
Comment 4 Mike McCune 2013-06-20 13:29:50 EDT
this will have to be a known issue for MDP1.  moving to 602
Comment 5 Partha Aji 2013-06-20 16:42:58 EDT
Responding to Hayk's orginal issue which is slightly different from brads.

I am unable to reproduce this issue. I tested on Sat 6.0.1 MDP1 install.
I noticed that my client provisioned through beaker had zsh available, BUT that zsh instance came from a different repo. 

[root@h ~]# yum info zsh
...
Repo        : beaker-Client
...

I disabled that, did a yum clean all and redid yum search zsh . The zsh package didnot show up.

I also did a 

ls /var/lib/pulp/published/https/repos/<org>/<env>/<cv>/content/dist/rhel/server/6/6Server/x86_64/os/zs* and found no zsh files there.. Please reverify and fail if this recurs


Brad's issue is more along filters not working at all in the first place.
Comment 6 Partha Aji 2013-09-18 15:23:26 EDT
Should be fixed.  Changing to "post" instead of ON_QA because changes to the publish process were made in this build.
Comment 7 Partha Aji 2013-09-18 15:24:43 EDT
as of https://github.com/Katello/katello/pull/2907
Comment 9 Hayk Hovsepyan 2013-09-30 04:22:22 EDT
Verified on revision:
Katello-Katello-Installation-RegisterRHNClassic-1.1-4.noarch
foreman-postgresql-1.3.0-6.el6sat.noarch
openldap-2.4.23-31.el6.x86_64
katello-configure-foreman-proxy-1.4.5-8.el6sat.noarch
pulp-puppet-plugins-2.3.0-0.14.alpha.el6sat.noarch
signo-katello-0.0.20-3.el6sat.noarch
katello-selinux-1.4.4-4.el6sat.noarch
katello-configure-foreman-1.4.5-8.el6sat.noarch
candlepin-selinux-0.8.25-1.el6sam.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-agent-1.4.4-2.el6sat.noarch
candlepin-cert-consumer-aphrodite.usersys.redhat.com-1.0-1.noarch
signo-0.0.20-3.el6sat.noarch
Katello-Katello-Installation-Satellite6Latest-1.0-9.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
apr-util-ldap-1.3.9-3.el6_0.1.x86_64
katello-qpid-broker-key-pair-1.0-1.noarch
Katello-Katello-Configuration-KatelloClient-1.1-50.noarch
foreman-1.3.0-6.el6sat.noarch
katello-cli-1.4.3-15.el6sat.noarch
katello-configure-1.4.5-8.el6sat.noarch
pulp-selinux-2.3.0-0.14.alpha.el6sat.noarch
pulp-rpm-plugins-2.3.0-0.14.alpha.el6sat.noarch
pulp-katello-plugins-0.2-1.el6sat.noarch
pulp-nodes-parent-2.3.0-0.14.alpha.el6sat.noarch
candlepin-scl-1-5.el6_4.noarch
elasticsearch-0.19.9-8.el6sat.noarch
katello-common-1.4.6-13.el6sat.noarch
katello-glue-pulp-1.4.6-13.el6sat.noarch
katello-glue-candlepin-1.4.6-13.el6sat.noarch
ruby193-rubygem-ldap_fluff-0.2.2-2.el6sat.noarch
candlepin-tomcat6-0.8.25-1.el6sam.noarch
katello-all-1.4.6-13.el6sat.noarch
foreman-proxy-1.3.0-1.el6sat.noarch
katello-cli-common-1.4.3-15.el6sat.noarch
python-ldap-2.3.10-1.el6.x86_64
katello-certs-tools-1.4.4-1.el6sat.noarch
pulp-server-2.3.0-0.14.alpha.el6sat.noarch
pulp-nodes-common-2.3.0-0.14.alpha.el6sat.noarch
ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
katello-glue-elasticsearch-1.4.6-13.el6sat.noarch
katello-1.4.6-13.el6sat.noarch
candlepin-0.8.25-1.el6sam.noarch
katello-foreman-all-1.4.6-13.el6sat.noarch
katello-qpid-client-key-pair-1.0-1.noarch
pulp-rpm-handlers-2.3.0-0.14.alpha.el6sat.noarch
Katello-Katello-Sanity-ImportKeys-1.2-1.noarch

Now filtered packages are not available to install.
Comment 10 Bryan Kearney 2014-04-24 13:08:27 EDT
This was verified and delivered with MDP2. Closing it out.

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