Description of problem: When asking API for listing the repository's puppet modules it returns more than the number of added puppet modules. The filtering is broken. Version-Release number of selected component (if applicable): S4C2 How reproducible: Aways Steps to Reproduce: 1. Create a product and add a puppet repository and upload the ntp puppet module found at https://forge.puppetlabs.com/puppetlabs/ntp 2. Create another product and add a puppet repository with the following URL https://davidd.fedorapeople.org/repos/random_puppet and sync it. 3. Ask for the listing of repository created on step 2 puppet modules via the following api path /katello/api/repositories/<repo_step_2_id>/puppet_modules Actual results: The list includes the uploaded ntp puppet module from repo step 1 in the listing of puppet modules of repo step 2. Expected results: The list includes just puppet modules of repo step 2. Additional info: The results shown via CLI contains wrong results too because this issue.
Looks like /katello/api/repositories/:repo_id>/puppet_modules is returning the total number of unique (by name) modules, regardless of organization or repository.
Confirmed that manually importing a puppet module is not a requirement. The API is returning all puppet modules by its unique name: * Create a custom repo and sync https://davidd.fedorapeople.org/repos/random_puppet * GET /katello/api/repositories/:repo_id_1>/puppet_modules should return 4 total modules * Create a second custom repo and sync https://omaciel.fedorapeople.org/random_puppet/ * GET /katello/api/repositories/:repo_id_1>/puppet_modules should return 4 total modules but instead you'll get 5 total modules * GET /katello/api/repositories/:repo_id_2>/puppet_modules should return 1 total modules but instead you'll get 5 total modules
I also have this issue. For me it is a blocker as it breaks our Sat6 provision setup as i cannot use this list to compare the modules of the repository with the modules assigned to the content view anymore. This is a regression over 6.0.8
The affecting line is the repository filtering is disabled for puppet-type repositories. Removing this limitation fixes this issue. Below is the patch: --- repository_content_controller.rb.150713-1 2015-06-16 03:31:57.000000000 +0000 +++ repository_content_controller.rb 2015-07-13 14:30:27.999291503 +0000 @@ -40,7 +40,7 @@ options[:filters] = [] options = filter_by_repo_ids(Repository.readable.map(&:pulp_id), options) - options = filter_by_repo_ids([@repo.pulp_id], options) if @repo && !@repo.puppet? + options = filter_by_repo_ids([@repo.pulp_id], options) if @repo options = filter_by_content_view_version(@version, options) if @version options = filter_by_environment(@environment, options) if @environment options = filter_by_content_view_filter(@filter, options) if @filter
VERIFIED: # rpm -qa | grep foreman dell-pe1950-05.rhts.eng.brq.redhat.com-foreman-client-1.0-1.noarch dell-pe1950-05.rhts.eng.brq.redhat.com-foreman-proxy-1.0-1.noarch ruby193-rubygem-foreman_hooks-0.3.7-2.el7sat.noarch puppet-foreman_scap_client-0.3.3-10.el7sat.noarch foreman-vmware-1.7.2.50-1.el7sat.noarch rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el7sat.noarch foreman-ovirt-1.7.2.50-1.el7sat.noarch ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el7sat.noarch foreman-1.7.2.50-1.el7sat.noarch ruby193-rubygem-foreman_docker-1.2.0.24-1.el7sat.noarch ruby193-rubygem-foreman-tasks-0.6.15.7-1.el7sat.noarch rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch rubygem-hammer_cli_foreman_docker-0.0.3.10-1.el7sat.noarch foreman-debug-1.7.2.50-1.el7sat.noarch foreman-proxy-1.7.2.8-1.el7sat.noarch dell-pe1950-05.rhts.eng.brq.redhat.com-foreman-proxy-client-1.0-1.noarch foreman-discovery-image-3.0.5-3.el7sat.noarch foreman-libvirt-1.7.2.50-1.el7sat.noarch ruby193-rubygem-foreman_openscap-0.3.2.10-1.el7sat.noarch foreman-gce-1.7.2.50-1.el7sat.noarch rubygem-hammer_cli_foreman-0.1.4.15-1.el7sat.noarch ruby193-rubygem-foreman_discovery-2.0.0.23-1.el7sat.noarch foreman-selinux-1.7.2.17-1.el7sat.noarch foreman-postgresql-1.7.2.50-1.el7sat.noarch foreman-compute-1.7.2.50-1.el7sat.noarch ruby193-rubygem-foreman-redhat_access-0.2.4-1.el7sat.noarch rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el7sat.noarch ruby193-rubygem-foreman_bootdisk-4.0.2.14-1.el7sat.noarch steps: # curl -i -k -u admin:changeme -H "Accept: application/json" -X GET 'https://dell-pe1950-05.rhts.eng.brq.redhat.com/katello/api/v2/repositories/2/puppet_modules' HTTP/1.1 200 OK Date: Tue, 05 Jan 2016 11:19:18 GMT Server: Apache/2.4.6 (Red Hat Enterprise Linux) Foreman_version: 1.7.2 Foreman_api_version: 2 Apipie-Checksum: 7ebc0d19c7cfbc9534d629e6ce3270cc X-UA-Compatible: IE=Edge,chrome=1 Cache-Control: must-revalidate, private, max-age=0 X-Request-Id: e2976a487cfc3ffa44a44aaff49c14b1 X-Runtime: 0.485617 X-Rack-Cache: miss X-Powered-By: Phusion Passenger 4.0.18 Set-Cookie: _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTE4ZWJiYWUwYjQ0NmZmMTkxZTdjNWQ4MTkzMWQyMWE3BjsAVEkiC2xvY2FsZQY7AEZJIgdlbgY7AEY%3D--bdab712af4f3156149a025dfe05f9aa373725d84; path=/; secure; HttpOnly ETag: "04eb66e89435032c16c62921e501373e" Status: 200 OK Transfer-Encoding: chunked Content-Type: application/json; charset=utf-8 {"total":4,"subtotal":4,"page":1,"per_page":20,"search":null,"sort":{"by":null,"order":null},"results":[{"id":"8d3c7036-1cc0-4fbc-9dd7-ba81130648ab","name":"cron","version":"0.0.1","author":"5UbZ3r0","summary":"Puppet module that manages scheduling of task trough cron","description":"This puppet module manages the scheduling of task trough cron.\nIt has shortcuts classes for hourly (/etc/cron.hourly), daily (/etc/cron.daily), weekly (/etc/cron.daily) and monthly (/etc/cron.monthly) schedulation.\n\nIt has been tested only ...\n\nTested on CentOS 6.2, RHEL 6.2, CentOS 5.8.\n\nRequirements:\n\n * [Facter](http://www.puppetlabs.com/puppet/related-projects/facter/) 1.6.1 or greater (versions that support the osfamily fact)\n * [puppetlabs/stdlib] for the validate_absolute_path statement\n\nTodo:\n- Set up and install cron in the - very unlikely - case that it's not installed;\n- Make cron::task work with windows.","license":"GPL v3","project_page":"https://github.com/5Ub-Z3r0/puppet-cron","source":"https://github.com/5Ub-Z3r0/puppet-cron.git","dependencies":[{"name":"puppetlabs/stdlib","version_requirement":">=3.0.0"}],"checksums":[["manifests/daily.pp","96ffd0e592de3f5dd054de3755a8bcff"],["spec/spec.opts","a600ded995d948e393fbe2320ba8e51c"],["manifests/monthly.pp","b9900f6e2db0854f34c66930287db700"],["manifests/task.pp","4cb4aa49df8c90619d9039992a516c07"],["spec/spec_helper.rb","ca19ec4f451ebc7fdb035b52eae6e909"],["tests/init.pp","4bcb7e03aced8bb468351a45e8e9bc76"],["manifests/params.pp","d5924918fc059daa47aa355534a4b434"],["manifests/weekly.pp","7d34a00d629575ee2e4f4bd58eab1d40"],["Modulefile","18c9208e77a3c43b4df65ae8bb3bf804"],["manifests/init.pp","8c3e10bc3e2465908436f1aa771f039b"],["manifests/hourly.pp","7a17621a731750c40c872e7a5b6f4442"],["README","491e63a9cf75f825369528983caae87a"]],"tag_list":null,"repoids":["Default_Organization-prod1-prod1_repo"],"repositories":[{"id":2,"name":"prod1_repo"}]},{"id":"76290ffb-ab74-439f-9f3b-614afa0246d1","name":"httpd","version":"0.2.0","author":"5UbZ3r0","summary":"This module handles a standard httpd installation.","description":"This module handles a standard httpd installation.\n\nIt has optional classes if you want to install and configure mod_ssl, php, mod_spdy or httpd-dev.\n\nIt has been tested on CentOS 6.2 and CentOS 5.8.\nIt could work also on debian, but that needs to be tested.","license":"GPL v3","project_page":"","source":"","dependencies":[],"checksums":[["files/spdy/mod-spdy-beta_current_i386.rpm","4abdee35392c1c6d329def2017393403"],["manifests/params.pp","d02eb87a3ed69ff638ca028b67001621"],["manifests/ssl.pp","6d8a9caf1a13132b6cd2464da606281b"],["manifests/init.pp","fcd8c8f976710eac6532adc2f28bfa44"],["manifests/dev.pp","13e0564d366f27694b115f8112406429"],["manifests/vhost.pp","6eac84201d239436c386fe2adf4c4252"],["templates/httpd.conf.RHEL.erb","4cbcc29765356aeb9a01beece6738fe8"],["files/spdy/mod-spdy-beta_current_x86_64.rpm","6d25d03bfb8249f7c6dcd9906909c995"],["templates/localized-error-pages.Debian.erb","578dfd537911a7b8ddcd485640452ac3"],["files/deflate.conf","1fc678aa967f4fd3c8238c9111019a1d"],["manifests/spdy.pp","ef792b41408236aeda7f57a427f574eb"],["templates/vhost-default.conf.erb","ed64a53af0d7bad762176a98c9ea3e62"],["README","4c9b436e48a447d634eb821c06fff6fc"],["spec/spec.opts","a600ded995d948e393fbe2320ba8e51c"],["templates/ssl.conf.RHEL.erb","f116618fb85ffdda3cef1fcf5a8210c8"],["templates/php.ini.RHEL.erb","25cbb760e5fcf81165fbc33ce98fe6d9"],["lib/puppet/provider/a2mod/modfix.rb","f4536cdca68d15a235cbb1e0b67e4406"],["files/error/error.html","3af8411c82a0725c0ba6ba0fa681bd08"],["files/spdy/mod-spdy-beta_current_i386.deb","7d72474e3983f390daf89f1289e08521"],["lib/puppet/provider/a2mod/a2mod.rb","0acf42d3d670a9915c5a3f46ae7335f1"],["manifests/php.pp","56ea7f297aaacdde001d3529051b3c0e"],["files/spdy/mod-spdy-beta_current_amd64.deb","834c85038ae50260da3a070cfa0cdbdf"],["Modulefile","ea33e2d7fe4d97eafa07172c92c130db"],["spec/spec_helper.rb","ca19ec4f451ebc7fdb035b52eae6e909"],["templates/php.ini.Debian.erb","180a39ca262e132c6d431973986d7e39"],["lib/puppet/type/a2mod.rb","adcf754a076153442eac2beb42736547"]],"tag_list":null,"repoids":["Default_Organization-prod1-prod1_repo"],"repositories":[{"id":2,"name":"prod1_repo"}]},{"id":"15c15564-16c0-4281-b79f-386803851a9d","name":"pureftpd","version":"1.0.2","author":"5UbZ3r0","summary":"","description":"Manage Pure-FTPd via Puppet","license":"Apache License, Version 2.0","project_page":"https://github.com/saz/puppet-pureftpd","source":"","dependencies":[],"checksums":[["spec\\unit\\puppet\\type\\README.markdown","de26a7643813abd6c2e7e28071b1ef94"],["spec\\unit\\puppet\\provider\\README.markdown","e52668944ee6af2fb5d5b9e798342645"],["tests\\init.pp","5d6e84bd06e23c4d565782db67e333ec"],["files\\debian\\PAMAuthentication","eb4585ad9fe0426781ed7c49252f8225"],["files\\debian\\ChrootEveryone","eb4585ad9fe0426781ed7c49252f8225"],["manifests\\service.pp","722d62651e6c61da4330332b6382f5a9"],["spec\\spec.opts","a600ded995d948e393fbe2320ba8e51c"],["manifests\\install.pp","51caa25f90a479cd501824362b9bdba1"],["files\\debian\\MaxClientsNumber","2a52a5e65fc3c43f409550dfad1f904f"],["files\\debian\\DontResolve","eb4585ad9fe0426781ed7c49252f8225"],["files\\debian\\NoAnonymous","eb4585ad9fe0426781ed7c49252f8225"],["spec\\README.markdown","32a1fc0121c28aff554ef5d422b8b51e"],["files\\debian\\AltLog","a3d7f89dc916062234237acf75bde97d"],["README.md","9cbb945c6ce73031b00b1c5269cbb638"],["manifests\\params.pp","e7b3cf3a6115e96a6f76d3ff2c545625"],["templates\\default_config.erb","222945189c5b8d4efa9fe2c3cc01f435"],["files\\debian\\VerboseLog","7fa3b767c460b54a2be4d49030b349c7"],["files\\debian\\PureDB","6db5965698527e1f140dfc73ed40d47c"],["manifests\\config.pp","b12d6331349d217bbba684a0c5652620"],["files\\debian\\UnixAuthentication","eb4585ad9fe0426781ed7c49252f8225"],["manifests\\init.pp","61675a905c40641e70d6f74985fda8c8"],["Modulefile","decaaab32a9931c3565a6fc47f26a740"],["files\\debian\\MinUID","4fbafd6948b6529caa2b78e476359875"],["spec\\spec_helper.rb","ca19ec4f451ebc7fdb035b52eae6e909"]],"tag_list":null,"repoids":["Default_Organization-prod1-prod1_repo"],"repositories":[{"id":2,"name":"prod1_repo"}]},{"id":"4ecd41f3-8667-4673-a3c1-a903325e4826","name":"samba","version":"0.2.0","author":"5UbZ3r0","summary":"A puppet module that manages samba","description":"This puppet module manages samba configuration.\n\nIt has been tested only for samba managing shares, tough it does not care about the content of your config file.\n\nTested on CentOS 6.2, RHEL 6.2, CentOS 5.8.","license":"GPL v3","project_page":"https://github.com/5Ub-Z3r0/puppet-samba","source":"https://github.com/5Ub-Z3r0/puppet-samba","dependencies":[],"checksums":[["manifests/service.pp","192c819791e2042703891e51a61d314a"],["manifests/params.pp","f41d11e7dbbde67a2cf4d29cf6783a55"],["spec/spec.opts","a600ded995d948e393fbe2320ba8e51c"],["tests/init.pp","4dcc2868cb9740c32eb68f345a7b7194"],["spec/spec_helper.rb","ca19ec4f451ebc7fdb035b52eae6e909"],["manifests/conf.pp","ad4b285a6736aebebb6fa59e38ddded1"],["Modulefile","d309ee315176ea3f923480c286e3a55b"],["manifests/install.pp","c929e13f546bcdb3f02efede9db1af9b"],["manifests/init.pp","f658b594ac88da9026c675bfe0310d57"],["README","627fbb57eb8d94308f01a11430418fb6"]],"tag_list":null,"repoids":["Default_
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. https://access.redhat.com/errata/RHBA-2016:0052