Bug 1202050
| Summary: | hammer puppet-module list and filter list only shows 20 entries | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Magnus Glantz <sudo> |
| Component: | Hammer | Assignee: | Adam Price <adprice> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Tazim Kolhar <tkolhar> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.8 | CC: | Axel.Thimm, bkearney, cwelton, dlobatog, mlinden, mmccune, pmoravec, tkolhar, tstrachota |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/10934 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-08-12 16:05:30 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. It's OK to request more detailed info via Case 01383469, such as logs and foreman-debug, etc. api/v2/content_view_puppet_modules_controller.rb doesn't list the 'per_page' parameter in api docs. When it's specified, hammer will automatically create '--per-page' option and also respect the value from config files. We should check other katello controllers' index actions too to avoid similar problems on other places. Another more trivial reproducer: hammer content-view list For >20 content views, just 20 are listed. Again due to --per-page / --full-results option missing there. Pavel, That sounds like a separate bug altogether. Would you please check Bugzilla for a pre-existing bug describing `hammer content-view list` missing --per-page and --full-results and create a new bug if one does not exist? Thanks! (In reply to Adam Price from comment #7) > Pavel, > > That sounds like a separate bug altogether. Would you please check Bugzilla > for a pre-existing bug describing `hammer content-view list` missing > --per-page and --full-results and create a new bug if one does not exist? > Thanks! OK, I thought all the "list limitted to 20 entries only" issues can be resolved altogether, but no problem in rasing separate BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1235532 Created redmine issue http://projects.theforeman.org/issues/10934 from this bug VERIFIED: # rpm -qa | grep foreman foreman-compute-1.7.2.32-1.el6_6sat.noarch ruby193-rubygem-foreman_discovery-2.0.0.17-1.el6_6sat.noarch rubygem-hammer_cli_foreman_docker-0.0.3.9-1.el6_6sat.noarch foreman-debug-1.7.2.32-1.el6_6sat.noarch ruby193-rubygem-foreman_docker-1.2.0.18-1.el6_6sat.noarch ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch foreman-postgresql-1.7.2.32-1.el6_6sat.noarch rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el6_6sat.noarch foreman-gce-1.7.2.32-1.el6_6sat.noarch ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el6_6sat.noarch rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el6_6sat.noarch foreman-selinux-1.7.2.13-1.el6_6sat.noarch foreman-libvirt-1.7.2.32-1.el6_6sat.noarch foreman-ovirt-1.7.2.32-1.el6_6sat.noarch ruby193-rubygem-foreman-tasks-0.6.15.4-1.el6_6sat.noarch foreman-proxy-1.7.2.5-1.el6_6sat.noarch rubygem-hammer_cli_foreman-0.1.4.14-1.el6_6sat.noarch intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch foreman-vmware-1.7.2.32-1.el6_6sat.noarch intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el6_6sat.noarch intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch foreman-1.7.2.32-1.el6_6sat.noarch ruby193-rubygem-foreman-redhat_access-0.2.1-1.el6_6sat.noarch steps: 1. Create content view 2. Add 200 filters and 80 puppet-modules (or perhaps it's enough to add more than 20) 3. Run hammer content-view puppet-module list and hammer content-view filter list I had tried this and it worked for me moving it to verified thanks This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015. |
Description of problem: Output from 'hammer content-view puppet-module list' and 'hammer content-view filter list' (and possibly other commands) are limited to 20 lines of output. This means that you can't use hammer to script against content-views with more than 20 filters or puppet-modules attached. Please note that noticed that this is also a limitation of the Satellite 6 GUI, so perhaps this an limitation in the API or elsewhere. Version-Release number of selected component (if applicable): hammer (0.1.1) * hammer_cli_katello (0.0.4) * hammer_cli_foreman (0.1.1) * hammer_cli_import (0.10.4) How reproducible: 100% of the time. Steps to Reproduce: 1. Create content view 2. Add 200 filters and 80 puppet-modules (or perhaps it's enough to add more than 20) 3. Run hammer content-view puppet-module list and hammer content-view filter list Actual results: [sudo@itseelm-lx6099 ~]$ hammer -u user -p pass content-view puppet-module list --content-view-id 8 --organization Default_Organization ---|------|------------------|--------|------------------------ ID | UUID | NAME | AUTHOR | VERSION ---|------|------------------|--------|------------------------ 3 | | app_directories | ASDF | Latest(Currently 0.1.2) 6 | | audit | ASDF | Latest(Currently 0.1.2) 9 | | acpid | ASDF | Latest(Currently 0.1.1) 10 | | appqcime | ASDF | Latest(Currently 0.1.1) 13 | | cgconfig | ASDF | Latest(Currently 0.1.1) 16 | | hal | ASDF | Latest(Currently 0.1.1) 19 | | issue | ASDF | Latest(Currently 0.1.2) 20 | | keyboard | ASDF | Latest(Currently 0.1.1) 23 | | some_rhn_stuff | ASDF | Latest(Currently 0.1.3) 26 | | logrotate | ASDF | Latest(Currently 0.1.2) 29 | | multipath | ASDF | Latest(Currently 0.1.2) 30 | | nsswitch | ASDF | Latest(Currently 0.1.1) 33 | | oddjob | ASDF | Latest(Currently 0.1.1) 36 | | patrol | ASDF | Latest(Currently 0.1.1) 39 | | rsyslog | ASDF | Latest(Currently 0.1.1) 40 | | securetty | ASDF | Latest(Currently 0.1.2) 43 | | ssh | ASDF | Latest(Currently 0.1.1) 46 | | sysstat | ASDF | Latest(Currently 0.1.2) 49 | | user_root | ASDF | Latest(Currently 0.1.2) 50 | | kdump | ASDF | Latest(Currently 0.1.1) ---|------|------------------|--------|------------------------ Expected results: Full list of puppet modules (and filters). Additional info: Total number of modules we have attached to the content view are 81 and total number of filters we tried out where around 300 (we had to remove them due to other issues). When running hammer with debug it seems that Hammer does see that there are more Puppet modules to show. [ INFO 2015-03-14 18:36:09 Init] Initialization of Hammer CLI (0.1.1) has started... [DEBUG 2015-03-14 18:36:09 Init] Running at ruby 1.8.7-p374 [ INFO 2015-03-14 18:36:09 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded [ INFO 2015-03-14 18:36:09 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded [ INFO 2015-03-14 18:36:09 Init] Configuration from the file /etc/hammer/cli.modules.d/import.yml has been loaded [ INFO 2015-03-14 18:36:09 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded [DEBUG 2015-03-14 18:36:10 Connection] Registered: foreman [DEBUG 2015-03-14 18:36:10 API] Global headers: { "Accept-Language" => "en", :accept => "application/json;version=2", :content_type => "application/json" } [ INFO 2015-03-14 18:36:10 Modules] Extension module hammer_cli_foreman (0.1.1) loaded [ INFO 2015-03-14 18:36:10 Modules] Extension module hammer_cli_import (0.10.4) loaded [ INFO 2015-03-14 18:36:10 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed. [ INFO 2015-03-14 18:36:10 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created. [ INFO 2015-03-14 18:36:11 Modules] Extension module hammer_cli_katello (0.0.4) loaded [DEBUG 2015-03-14 18:36:11 Init] Using locale 'en' [DEBUG 2015-03-14 18:36:11 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/locale' [DEBUG 2015-03-14 18:36:11 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/locale' [DEBUG 2015-03-14 18:36:11 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.4/locale' [ INFO 2015-03-14 18:36:11 HammerCLI::MainCommand] Called with options: {"option_password"=>"***", "option_username"=>"user", "option_debug"=>true} [ INFO 2015-03-14 18:36:11 HammerCLIKatello::ContentView] Called with options: {} [ INFO 2015-03-14 18:36:11 HammerCLIKatello::ContentViewPuppetModule] Called with options: {} [ INFO 2015-03-14 18:36:11 HammerCLIKatello::ContentViewPuppetModule::ListCommand] Called with options: {"option_content_view_id"=>"8", "option_organization_name"=>"Default_Organization"} [ INFO 2015-03-14 18:36:11 API] GET /katello/api/content_views/8/content_view_puppet_modules [DEBUG 2015-03-14 18:36:11 API] Params: {} [DEBUG 2015-03-14 18:36:11 API] Headers: { :params => {} } [DEBUG 2015-03-14 18:36:13 API] Response { "sort" => { "by" => nil, "order" => nil }, "subtotal" => 81, "search" => nil, "page" => 1, "per_page" => 20, "results" => [ [ 0] { "name" => "app_directories", "uuid" => nil, "computed_version" => "0.1.2", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-02-26T09:18:56Z", "created_at" => "2015-02-26T09:18:56Z", "id" => 3 }, [ 1] { "name" => "audit", "uuid" => nil, "computed_version" => "0.1.2", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-02-26T09:20:53Z", "created_at" => "2015-02-26T09:20:53Z", "id" => 6 }, [ 2] { "name" => "acpid", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:29:57Z", "created_at" => "2015-03-02T13:29:57Z", "id" => 9 }, [ 3] { "name" => "appqcime", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:30:24Z", "created_at" => "2015-03-02T13:30:24Z", "id" => 10 }, [ 4] { "name" => "cgconfig", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:31:50Z", "created_at" => "2015-03-02T13:31:50Z", "id" => 13 }, [ 5] { "name" => "hal", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:33:54Z", "created_at" => "2015-03-02T13:33:54Z", "id" => 16 }, [ 6] { "name" => "issue", "uuid" => nil, "computed_version" => "0.1.2", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:35:48Z", "created_at" => "2015-03-02T13:35:48Z", "id" => 19 }, [ 7] { "name" => "keyboard", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:36:17Z", "created_at" => "2015-03-02T13:36:17Z", "id" => 20 }, [ 8] { "name" => "some_rhn_stuff", "uuid" => nil, "computed_version" => "0.1.3", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:38:17Z", "created_at" => "2015-03-02T13:38:17Z", "id" => 23 }, [ 9] { "name" => "logrotate", "uuid" => nil, "computed_version" => "0.1.2", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:39:50Z", "created_at" => "2015-03-02T13:39:50Z", "id" => 26 }, [10] { "name" => "multipath", "uuid" => nil, "computed_version" => "0.1.2", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:41:26Z", "created_at" => "2015-03-02T13:41:26Z", "id" => 29 }, [11] { "name" => "nsswitch", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:42:18Z", "created_at" => "2015-03-02T13:42:18Z", "id" => 30 }, [12] { "name" => "oddjob", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:43:53Z", "created_at" => "2015-03-02T13:43:53Z", "id" => 33 }, [13] { "name" => "patrol", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:45:04Z", "created_at" => "2015-03-02T13:45:04Z", "id" => 36 }, [14] { "name" => "rsyslog", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:48:27Z", "created_at" => "2015-03-02T13:48:27Z", "id" => 39 }, [15] { "name" => "securetty", "uuid" => nil, "computed_version" => "0.1.2", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:48:51Z", "created_at" => "2015-03-02T13:48:51Z", "id" => 40 }, [16] { "name" => "ssh", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:50:28Z", "created_at" => "2015-03-02T13:50:28Z", "id" => 43 }, [17] { "name" => "sysstat", "uuid" => nil, "computed_version" => "0.1.2", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:51:46Z", "created_at" => "2015-03-02T13:51:46Z", "id" => 46 }, [18] { "name" => "user_root", "uuid" => nil, "computed_version" => "0.1.2", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:53:30Z", "created_at" => "2015-03-02T13:53:30Z", "id" => 49 }, [19] { "name" => "kdump", "uuid" => nil, "computed_version" => "0.1.1", "author" => "ASDF", "puppet_module" => nil, "updated_at" => "2015-03-02T13:55:40Z", "created_at" => "2015-03-02T13:55:40Z", "id" => 50 } ], "total" => 81 } ---|------|------------------|--------|------------------------ ID | UUID | NAME | AUTHOR | VERSION ---|------|------------------|--------|------------------------ 3 | | app_directories | ASDF | Latest(Currently 0.1.2) 6 | | audit | ASDF | Latest(Currently 0.1.2) 9 | | acpid | ASDF | Latest(Currently 0.1.1) 10 | | appqcime | ASDF | Latest(Currently 0.1.1) 13 | | cgconfig | ASDF | Latest(Currently 0.1.1) 16 | | hal | ASDF | Latest(Currently 0.1.1) 19 | | issue | ASDF | Latest(Currently 0.1.2) 20 | | keyboard | ASDF | Latest(Currently 0.1.1) 23 | | some_rhn_stuff | ASDF | Latest(Currently 0.1.3) 26 | | logrotate | ASDF | Latest(Currently 0.1.2) 29 | | multipath | ASDF | Latest(Currently 0.1.2) 30 | | nsswitch | ASDF | Latest(Currently 0.1.1) 33 | | oddjob | ASDF | Latest(Currently 0.1.1) 36 | | patrol | ASDF | Latest(Currently 0.1.1) 39 | | rsyslog | ASDF | Latest(Currently 0.1.1) 40 | | securetty | ASDF | Latest(Currently 0.1.2) 43 | | ssh | ASDF | Latest(Currently 0.1.1) 46 | | sysstat | ASDF | Latest(Currently 0.1.2) 49 | | user_root | ASDF | Latest(Currently 0.1.2) 50 | | kdump | ASDF | Latest(Currently 0.1.1) ---|------|------------------|--------|------------------------ [user@thehostname ~]$ rubygem-hammer_cli-0.1.1-12.el6sat.noarch rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch rubygem-hammer_cli_import-0.10.4-1.3.el6sat.noarch rubygem-hammer_cli_foreman-0.1.1-16.el6sat.noarch rubygem-hammer_cli_foreman_tasks-0.0.3-3.el6sat.noarch candlepin-0.9.23.1-1.el6.noarch candlepin-common-1.0.1-1.el6_5.noarch candlepin-scl-1-5.el6_4.noarch candlepin-scl-quartz-2.1.5-5.el6_4.noarch candlepin-scl-rhino-1.7R3-1.el6_4.noarch candlepin-scl-runtime-1-5.el6_4.noarch candlepin-selinux-0.9.23.1-1.el6.noarch candlepin-tomcat6-0.9.23.1-1.el6.noarch elasticsearch-0.90.10-6.el6sat.noarch itseelm-lx6099.ikea.com-qpid-broker-1.0-1.noarch itseelm-lx6099.ikea.com-qpid-client-cert-1.0-1.noarch katello-1.5.0-30.el6sat.noarch katello-certs-tools-1.5.6-1.el6sat.noarch katello-default-ca-1.0-1.noarch katello-installer-0.0.67-1.el6sat.noarch katello-server-ca-1.0-3.noarch mod_wsgi-3.4-1.pulp.el6sat.x86_64 pulp-admin-client-2.4.4-1.el6sat.noarch pulp-katello-0.3-4.el6sat.noarch pulp-nodes-common-2.4.4-1.el6sat.noarch pulp-nodes-parent-2.4.4-1.el6sat.noarch pulp-puppet-plugins-2.4.4-1.el6sat.noarch pulp-puppet-tools-2.4.4-1.el6sat.noarch pulp-rpm-plugins-2.4.4-1.1.el6sat.noarch pulp-selinux-2.4.4-1.el6sat.noarch pulp-server-2.4.4-1.el6sat.noarch python-gofer-qpid-1.3.0-1.el6sat.noarch python-isodate-0.5.0-1.pulp.el6sat.noarch python-kombu-3.0.15-12.pulp.el6sat.noarch python-pulp-bindings-2.4.4-1.el6sat.noarch python-pulp-client-lib-2.4.4-1.el6sat.noarch python-pulp-common-2.4.4-1.el6sat.noarch python-pulp-puppet-common-2.4.4-1.el6sat.noarch python-pulp-rpm-common-2.4.4-1.1.el6sat.noarch python-qpid-0.22-14.el6sat.noarch python-qpid-qmf-0.22-37.el6.x86_64 qpid-cpp-client-0.22-42.el6.x86_64 qpid-cpp-server-0.22-42.el6.x86_64 qpid-cpp-server-linearstore-0.22-42.el6.x86_64 qpid-java-client-0.22-6.el6.noarch qpid-java-common-0.22-6.el6.noarch qpid-proton-c-0.7-1.el6.x86_64 qpid-qmf-0.22-37.el6.x86_64 qpid-tools-0.22-12.el6.noarch ruby193-rubygem-katello-1.5.0-98.el6sat.noarch rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch rubygem-smart_proxy_pulp-1.0.1-1.1.el6sat.noarch