Bug 754021
Summary: | Package filters are not working while promoting the product to next env, | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> |
Component: | API | Assignee: | Ivan Necas <inecas> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.0.1 | CC: | inecas |
Target Milestone: | Unspecified | ||
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-08-22 18:06:36 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 747354, 755097 |
Description
Sachin Ghai
2011-11-15 07:11:29 UTC
I tried to test this from cli too and found same result. Logs are: ============ pulp.log after perfroming operations from CLI: ================================================ package is added to defined filter: ================================== 2011-11-15 12:16:33,675 26183:139930319689472: pulp.server.api.filter:INFO: filter:98 Successfully added packages ['6b5c9357-ae6c-4aff-adc2-fdb5bd1ec053'] to filter pulp_fil logs after product promotion: ============================ 2011-11-15 12:23:22,539 26183:139930135148288: pulp.server.api.repo_sync:INFO: repo_sync:120 Creating [parent] feed repo [ACME_Corporation-test-pulp-pulp_x86_64] cloned from [ACME_Corporation-pulp-pulp_x86_64] with relative_path [ACME_Corporation/test/pulp/pulp_x86_64] 2011-11-15 12:23:22,563 26183:139930135148288: pulp.server.util:INFO: util:450 started repo metadata update: ['createrepo', '--database', '--checksum', 'sha256', '--update', '/var/lib/pulp//repos/ACME_Corporation/test/pulp/pulp_x86_64'] 2011-11-15 12:23:23,724 26183:139930135148288: pulp.server.util:INFO: util:500 createrepo on /var/lib/pulp//repos/ACME_Corporation/test/pulp/pulp_x86_64 finished 2011-11-15 12:23:23,724 26183:139930135148288: pulp.server.util:INFO: util:502 Nothing further to check; we got our fresh metadata 2011-11-15 12:23:23,810 26183:139930135148288: pulp.server.api.repo_sync:INFO: repo_sync:242 Sync invoked for repo <ACME_Corporation-test-pulp-pulp_x86_64> 2011-11-15 12:23:23,811 26183:139930135148288: pulp.server.api.repo_sync:INFO: repo_sync:256 Sync of ACME_Corporation-test-pulp-pulp_x86_64 starting, skip_dict = {} 2011-11-15 12:23:23,814 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:982 sync of /var/lib/pulp//repos/ACME_Corporation/Locker/pulp/pulp_x86_64 for repo ACME_Corporation-test-pulp-pulp_x86_64 2011-11-15 12:23:23,815 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:678 Found 18 packages in /var/lib/pulp//repos/ACME_Corporation/Locker/pulp/pulp_x86_64 2011-11-15 12:23:23,816 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:690 Found 0 delta rpm packages in /var/lib/pulp//repos/ACME_Corporation/Locker/pulp/pulp_x86_64 2011-11-15 12:23:23,817 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:678 Found 18 packages in /var/lib/pulp//repos/ACME_Corporation/Locker/pulp/pulp_x86_64 2011-11-15 12:23:23,817 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:789 Working on 0/18 2011-11-15 12:23:23,950 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:817 Finished copying 18 packages 2011-11-15 12:23:23,951 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:690 Found 0 delta rpm packages in /var/lib/pulp//repos/ACME_Corporation/Locker/pulp/pulp_x86_64 2011-11-15 12:23:23,952 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:884 No image files to import 2011-11-15 12:23:24,072 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:303 No image files to import to repo.. 2011-11-15 12:23:24,075 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:283 No metadata for 'File Sync' present; no files to import to repo.. 2011-11-15 12:23:24,078 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:669 Running createrepo, this may take a few minutes to complete. 2011-11-15 12:23:24,078 26183:139930135148288: pulp.server.util:INFO: util:467 metadata found; taking backup. 2011-11-15 12:23:24,082 26183:139930135148288: pulp.server.util:INFO: util:441 Checking what metadata types are available: ['filelists', 'primary', 'other', 'filelists_db', 'primary_db', 'other_db'] 2011-11-15 12:23:24,084 26183:139930135148288: pulp.server.util:INFO: util:450 started repo metadata update: ['createrepo', '--database', '--checksum', 'sha256', '--update', '/var/lib/pulp//repos/ACME_Corporation/test/pulp/pulp_x86_64'] 2011-11-15 12:23:25,639 26183:139930135148288: pulp.server.util:INFO: util:500 createrepo on /var/lib/pulp//repos/ACME_Corporation/test/pulp/pulp_x86_64 finished 2011-11-15 12:23:25,641 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:673 Createrepo finished in 1.56261301041 seconds 2011-11-15 12:23:25,643 26183:139930135148288: pulp.server.api.synchronizers:INFO: synchronizers:275 Skipping errata imports from sync process 2011-11-15 12:23:25,645 26183:139930135148288: pulp.server.api.repo_sync:INFO: repo_sync:263 Sync returned 18 packages, 0 errata in 1.83323192596 seconds 2011-11-15 12:23:25,646 26183:139930135148288: pulp.server.api.repo_sync:INFO: repo_sync:274 0 old packages to process, 18 new packages to process 2011-11-15 12:23:25,650 26183:139930135148288: pulp.server.api.repo_sync:INFO: repo_sync:289 Examining 0 errata from repo ACME_Corporation-test-pulp-pulp_x86_64 2011-11-15 12:23:25,652 26183:139930135148288: pulp.server.api.repo_sync:INFO: repo_sync:293 Removing 0 old errata from repo ACME_Corporation-test-pulp-pulp_x86_64 2011-11-15 12:23:25,656 26183:139930135148288: pulp.server.api.repo_sync:INFO: repo_sync:302 Adding 0 new errata to repo ACME_Corporation-test-pulp-pulp_x86_64 2011-11-15 12:23:25,750 26183:139930135148288: pulp.server.api.repo:INFO: repo:1495 repository (ACME_Corporation-test-pulp-pulp_x86_64), added keys: [] 2011-11-15 12:23:25,754 26183:139930135148288: pulp.server.api.repo:INFO: repo:1721 Successfully added files [] to repo ACME_Corporation-test-pulp-pulp_x86_64 2011-11-15 12:23:25,755 26183:139930135148288: pulp.server.tasking.task:INFO: task:440 Task succeeded: Task 82462de3-0f56-11e1-a0ca-525400a08495: _clone(ACME_Corporation-test-pulp-pulp_x86_64, feed=parent, progress_callback=<bound method RepoCloneTask.progress_callback of <pulp.server.api.repo_clone_task.RepoCloneTask object at 0x7f43fc041090>>, clone_name=pulp_x86_64, relative_path=ACME_Corporation/test/pulp/pulp_x86_64, synchronizer=<pulp.server.api.synchronizers.YumSynchronizer object at 0x7f43fc041d50>, filters=[], id=ACME_Corporation-pulp-pulp_x86_64, groupid=['product:1321338662273', 'env:81', 'org:43', 'content:1321340002100']) Tried to verify with latest build but still package filters are not working. The complete product is getting promoted to next env without blacklisted the selected packages. [root@dhcp201-152 ~]# rpm -qa | grep katello katello-common-0.1.106-1.git.0.8edef25.fc15.noarch katello-cli-common-0.1.12-1.git.0.183b350.fc15.noarch katello-configure-0.1.14-1.git.0.e4109d9.fc15.noarch katello-cli-0.1.12-1.git.0.183b350.fc15.noarch katello-glue-candlepin-0.1.106-1.git.0.8edef25.fc15.x86_64 katello-all-0.1.106-1.git.0.8edef25.fc15.x86_64 katello-glue-pulp-0.1.106-1.git.0.8edef25.fc15.x86_64 katello-0.1.106-1.git.0.8edef25.fc15.x86_64 katello-glue-foreman-0.1.106-1.git.0.8edef25.fc15.x86_64 katello-repos-0.1.3-1.git.0.db2bd1d.fc15.noarch Using the following steps (CLI), the filters should work (in this case cheetah package not in promoted environment: environment create --org ACME_Corporation --name Dev --prior Locker provider create --org ACME_Corporation --name katello --type custom product create --org ACME_Corporation --provider katello --name zoo repo create --org ACME_Corporation --product zoo --name base-one --url http://lzap.fedorapeople.org/fakerepos/zoo/ filter create --name cheetah --packages cheetah product add_filter --name zoo --filter cheetah repo synchronize --org ACME_Corporation --product zoo --name base-one changeset create --org ACME_Corporation --name Promotezoo --environment Dev changeset update --org ACME_Corporation --name Promotezoo --environment Dev --add_product zoo changeset promote --org ACME_Corporation --name Promotezoo --environment Dev Unfortunately there is a bug [1] in pulp 0.0.244 that doesn't apply the filters properly and it's API still shows the blacklisted packages in the new environment. But when looking into /var/lib/pulp/repos (/var/lib/pulp/repos/ACME_Corporation/Dev/zoo/base-one/) showes the filtered package is not there, which indicates Katello propagated this filter correctly. [1] - https://bugzilla.redhat.com/show_bug.cgi?id=754807 Thank you inecas. The bug in pulp 0.244 has been fixed in pulp build 0.251. Since the 0.251 is not available in brew [1], so I verified this defect by using testing[2] repo of pulp on f15. [1] http://download.devel.redhat.com/brewroot/repos/se-rhel-6-build/latest/x86_64/ [2] http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-15/x86_64/ Now I package filters are working as expected with following steps: --- [root@dhcp201-152 repos]# katello -u admin -p admin shell katello> environment create --org ACME_Corporation --name test --prior Locker Successfully created environment [ test ] katello> provider create --org ACME_Corporation --name fedora --type custom Successfully created provider [ fedora ] katello> product create --org ACME_Corporation --provider fedora --name pulp Successfully created product [ pulp ] katello> repo create --org=ACME_Corporation --product pulp --name pulp_x86_64 --url http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-15/x86_64/ Successfully created repository [ pulp_x86_64 ] katello> filter create --name pulp_fil --packages grinder --org=ACME_Corporation Successfully created filter [ pulp_fil ] katello> product add_filter --name pulp --filter pulp_fil --org=ACME_Corporation Added filter [ pulp_fil ] to product [ pulp ] katello> repo synchronize --org ACME_Corporation --product pulp --name pulp_x86_64 Repo [ pulp_x86_64 ] synced katello> changeset create --org ACME_Corporation --name pulp_promo --env test Successfully created changeset [ pulp_promo ] for environment [ test ] katello> changeset update --org ACME_Corporation --name=pulp_promo --env test --add_product pulp Successfully updated changeset [ pulp_promo ] katello> changeset promote --org ACME_Corporation --name pulp_promo --env test Changeset [ pulp_promo ] promoted katello> --- I filtered the grinder package here.. This is the repo under "Locker" env. Grinder package is listed here. [root@dhcp201-152 pulp]# cd /var/lib/pulp/repos/ACME_Corporation/Locker/pulp/pulp_x86_64/ [root@dhcp201-152 pulp_x86_64]# ls gofer-0.60-1.fc15.noarch.rpm gofer-package-0.60-1.fc15.noarch.rpm grinder-0.0.130-1.fc15.noarch.rpm m2crypto-0.21.1.pulp-5.fc15.x86_64.rpm m2crypto-debuginfo-0.21.1.pulp-5.fc15.x86_64.rpm mod_wsgi-3.2-6.pulp.fc15.x86_64.rpm mod_wsgi-debuginfo-3.2-6.pulp.fc15.x86_64.rpm pulp-0.0.251-1.fc15.noarch.rpm pulp-admin-0.0.251-1.fc15.noarch.rpm pulp-cds-0.0.251-1.fc15.noarch.rpm pulp-client-lib-0.0.251-1.fc15.noarch.rpm pulp-common-0.0.251-1.fc15.noarch.rpm pulp-consumer-0.0.251-1.fc15.noarch.rpm python-gofer-0.60-1.fc15.noarch.rpm python-isodate-0.4.4-2.fc15.noarch.rpm python-qpid-0.7.946106-1.fc15.noarch.rpm python-rhsm-0.96.4-1.fc15.noarch.rpm python-webpy-0.32-8.fc15.noarch.rpm repodata [root@dhcp201-152 pulp_x86_64]# After applying filters and promoting the product to next env (test). Here 'grinder' is filtered out. [root@dhcp201-152 pulp_x86_64]# cd /var/lib/pulp/repos/ACME_Corporation/test/pulp/pulp_x86_64/ [root@dhcp201-152 pulp_x86_64]# ls drpms gofer-0.60-1.fc15.noarch.rpm gofer-package-0.60-1.fc15.noarch.rpm m2crypto-0.21.1.pulp-5.fc15.x86_64.rpm m2crypto-debuginfo-0.21.1.pulp-5.fc15.x86_64.rpm mod_wsgi-3.2-6.pulp.fc15.x86_64.rpm mod_wsgi-debuginfo-3.2-6.pulp.fc15.x86_64.rpm pulp-0.0.251-1.fc15.noarch.rpm pulp-admin-0.0.251-1.fc15.noarch.rpm pulp-cds-0.0.251-1.fc15.noarch.rpm pulp-client-lib-0.0.251-1.fc15.noarch.rpm pulp-common-0.0.251-1.fc15.noarch.rpm pulp-consumer-0.0.251-1.fc15.noarch.rpm python-gofer-0.60-1.fc15.noarch.rpm python-isodate-0.4.4-2.fc15.noarch.rpm python-qpid-0.7.946106-1.fc15.noarch.rpm python-rhsm-0.96.4-1.fc15.noarch.rpm python-webpy-0.32-8.fc15.noarch.rpm repodata [root@dhcp201-152 pulp_x86_64]# Verified with following katello build: [root@dhcp201-197 ~]# rpm -qa | grep katello katello-glue-pulp-0.1.155-1.el6.noarch katello-configure-0.1.48-1.el6.noarch katello-trusted-ssl-cert-1.0-1.noarch katello-cli-common-0.1.31-1.el6.noarch katello-glue-foreman-0.1.155-1.el6.noarch katello-common-0.1.155-1.el6.noarch katello-httpd-ssl-key-pair-1.0-1.noarch katello-0.1.155-1.el6.noarch katello-qpid-broker-key-pair-1.0-1.noarch katello-repos-0.1.4-1.el6.noarch katello-cli-0.1.31-1.el6.noarch katello-glue-candlepin-0.1.155-1.el6.noarch katello-all-0.1.155-1.el6.noarch katello-certs-tools-1.0.1-1.el6.noarch [root@dhcp201-197 ~]# [root@dhcp201-197 ~]# katello -u admin -p admin shell katello> product create --org ACME_Corporation --provider fedora --name pulp Successfully created product [ pulp ] katello> repo create --org=ACME_Corporation --product pulp --name pulp_x86_64 --url http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-15/x86_64/ Successfully created repository [ pulp_x86_64 ] katello> repo synchronize --org ACME_Corporation --product pulp --name pulp_x86_64 Repo [ pulp_x86_64 ] synced Create filters and blacklist 'grinder' package: =================== katello> filter create --name pulp_fil1 --packages grinder --org=ACME_Corporation Successfully created filter [ pulp_fil1 ] katello> product add_filter --name pulp --filter pulp_fil1 --org=ACME_Corporation Added filter [ pulp_fil1 ] to product [ pulp ] Create changeset and promote: ============================== katello> changeset create --org ACME_Corporation --name pulp_promo1 --env test Successfully created changeset [ pulp_promo1 ] for environment [ test ] katello> changeset update --org ACME_Corporation --name=pulp_promo1 --env test --add_product pulp Successfully updated changeset [ pulp_promo1 ] katello> changeset promote --org ACME_Corporation --name pulp_promo1 --env test Changeset [ pulp_promo1 ] promoted katello> exit Packages in Locker env and before applying filters: ===================================================== [root@dhcp201-197 ~]# cd /var/lib/pulp/repos/ACME_Corporation/Locker/custom/pulp/pulp_x86_64/ [root@dhcp201-197 pulp_x86_64]# ls gofer-0.63-1.fc15.noarch.rpm pulp-0.0.255-1.fc15.noarch.rpm python-gofer-0.63-1.fc15.noarch.rpm gofer-package-0.63-1.fc15.noarch.rpm pulp-admin-0.0.255-1.fc15.noarch.rpm python-isodate-0.4.4-4.pulp.fc15.noarch.rpm grinder-0.0.134-1.fc15.noarch.rpm pulp-cds-0.0.255-1.fc15.noarch.rpm python-oauth2-1.5.170-2.pulp.fc15.noarch.rpm m2crypto-0.21.1.pulp-5.fc15.x86_64.rpm pulp-client-lib-0.0.255-1.fc15.noarch.rpm python-qpid-0.7.946106-1.fc15.noarch.rpm m2crypto-debuginfo-0.21.1.pulp-5.fc15.x86_64.rpm pulp-common-0.0.255-1.fc15.noarch.rpm python-rhsm-0.96.4-1.fc15.noarch.rpm mod_wsgi-3.2-6.pulp.fc15.x86_64.rpm pulp-consumer-0.0.255-1.fc15.noarch.rpm python-webpy-0.32-8.fc15.noarch.rpm mod_wsgi-debuginfo-3.2-6.pulp.fc15.x86_64.rpm pulp-selinux-server-0.0.255-1.fc15.noarch.rpm repodata Packages in test env and after applying filters: ================================================ Here "grinder" pkg is blacklisted. [root@dhcp201-197 pulp_x86_64]# cd /var/lib/pulp/repos/ACME_Corporation/test/custom/pulp/pulp_x86_64/ [root@dhcp201-197 pulp_x86_64]# ls drpms pulp-0.0.255-1.fc15.noarch.rpm python-gofer-0.63-1.fc15.noarch.rpm gofer-0.63-1.fc15.noarch.rpm pulp-admin-0.0.255-1.fc15.noarch.rpm python-isodate-0.4.4-4.pulp.fc15.noarch.rpm gofer-package-0.63-1.fc15.noarch.rpm pulp-cds-0.0.255-1.fc15.noarch.rpm python-oauth2-1.5.170-2.pulp.fc15.noarch.rpm m2crypto-0.21.1.pulp-5.fc15.x86_64.rpm pulp-client-lib-0.0.255-1.fc15.noarch.rpm python-qpid-0.7.946106-1.fc15.noarch.rpm m2crypto-debuginfo-0.21.1.pulp-5.fc15.x86_64.rpm pulp-common-0.0.255-1.fc15.noarch.rpm python-rhsm-0.96.4-1.fc15.noarch.rpm mod_wsgi-3.2-6.pulp.fc15.x86_64.rpm pulp-consumer-0.0.255-1.fc15.noarch.rpm python-webpy-0.32-8.fc15.noarch.rpm mod_wsgi-debuginfo-3.2-6.pulp.fc15.x86_64.rpm pulp-selinux-server-0.0.255-1.fc15.noarch.rpm repodata [root@dhcp201-197 pulp_x86_64]# getting rid of 6.0.0 version since that doesn't exist |