Bug 1122924
| Summary: | hammer do not show subscriptions I want to add to activation key | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Jan Hutař <jhutar> |
| Component: | Hammer | Assignee: | Dustin Tsang <dtsang> |
| Status: | CLOSED ERRATA | QA Contact: | jcallaha |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.3 | CC: | bbuckingham, bkearney, dtsang, jaudet, jmontleo, mmccune, sthirugn, tlestach |
| Target Milestone: | Unspecified | Keywords: | Reopened, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/6942 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-02-20 18:31:59 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: | |||
Tested using sat6-beta-post-compose2: Custom products display in `hammer subscription list` immediately after creating a custom yum product in the organization. please re-open if this is an issue in newer releases. Hello, I have tried with Satellite-6.0.4-RHEL-6-20140730.0 and for some reason I do not see the product: # hammer --username <user> --password <pass> subscription list --organization-id 1 -----|----------|---------|---------|-----------|----------|------------|----------------------------------|---------|-----------|--------- NAME | CONTRACT | ACCOUNT | SUPPORT | QUANTITY | CONSUMED | END DATE | ID | PRODUCT | QUANTITY | ATTACHED -----|----------|---------|---------|-----------|----------|------------|----------------------------------|---------|-----------|--------- sat6 | | | | Unlimited | 0 | 2044-07-27 | 8a90c13647a0294c0147a24ad62701c4 | sat6 | Unlimited | 0 -----|----------|---------|---------|-----------|----------|------------|----------------------------------|---------|-----------|--------- # hammer --username <user> --password <pass> product create --name FooBarBaz --organization-id 1 Product created # hammer --username <user> --password <pass> subscription list --organization-id 1 -----|----------|---------|---------|-----------|----------|------------|----------------------------------|---------|-----------|--------- NAME | CONTRACT | ACCOUNT | SUPPORT | QUANTITY | CONSUMED | END DATE | ID | PRODUCT | QUANTITY | ATTACHED -----|----------|---------|---------|-----------|----------|------------|----------------------------------|---------|-----------|--------- sat6 | | | | Unlimited | 0 | 2044-07-27 | 8a90c13647a0294c0147a24ad62701c4 | sat6 | Unlimited | 0 -----|----------|---------|---------|-----------|----------|------------|----------------------------------|---------|-----------|--------- Any idea on what am I doing wrong? Created redmine issue http://projects.theforeman.org/issues/6942 from this bug Sorry Jan for missing it the first time. Subscriptions aren't being reindexed when subscriptions are being listed in the cli. I'm sure it worked some time ago. I have filled this because some automated test started to fail. Any progress here please? This blocks our libvirt compute resource automated testing. *** This bug is verified in upstream. This fix should eventually land in future downstream builds *** Verified in RHEL6/RHEL7 * candlepin-0.9.32-1.el7.noarch * candlepin-common-1.0.8-1.el7.noarch * candlepin-selinux-0.9.32-1.el7.noarch * candlepin-tomcat-0.9.32-1.el7.noarch * elasticsearch-0.90.10-7.el7.noarch * foreman-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch * foreman-compute-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch * foreman-gce-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch * foreman-libvirt-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch * foreman-ovirt-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch * foreman-postgresql-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch * foreman-proxy-1.7.0-0.develop.201410081229git52f0bac.el7.noarch * foreman-release-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch * foreman-selinux-1.7.0-0.develop.201409301113git2f345de.el7.noarch * foreman-vmware-1.7.0-0.develop.201410091913git35b6fb9.el7.noarch * katello-2.1.0-1.201410091752gitc9c45c1.el7.noarch * katello-certs-tools-2.0.1-1.el7.noarch * katello-default-ca-1.0-1.noarch * katello-installer-2.1.0-1.201410021645git304e036.el7.noarch * katello-repos-2.1.1-1.el7.noarch * katello-server-ca-1.0-1.noarch * openldap-2.4.39-3.el7.x86_64 * pulp-docker-plugins-0.2.1-0.2.beta.el7.noarch * pulp-katello-0.3-3.el7.noarch * pulp-nodes-common-2.5.0-0.7.beta.el7.noarch * pulp-nodes-parent-2.5.0-0.7.beta.el7.noarch * pulp-puppet-plugins-2.5.0-0.7.beta.el7.noarch * pulp-puppet-tools-2.5.0-0.7.beta.el7.noarch * pulp-rpm-plugins-2.5.0-0.7.beta.el7.noarch * pulp-selinux-2.5.0-0.7.beta.el7.noarch * pulp-server-2.5.0-0.7.beta.el7.noarch * python-ldap-2.4.6-6.el7.x86_64 * ruby193-rubygem-ldap_fluff-0.3.1-1.el7.noarch * ruby193-rubygem-net-ldap-0.3.1-2.el7.noarch * ruby193-rubygem-runcible-1.2.0-1.el7.noarch * rubygem-hammer_cli-0.1.3-1.201409240954gitf3c47c7.el7.noarch * rubygem-hammer_cli_foreman-0.1.3-1.201409191432gitc38f9c8.el7.noarch * rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410git163c264.git.0.988ca80.el7.noarch * rubygem-hammer_cli_import-0.10.4-1.el7.noarch * rubygem-hammer_cli_katello-0.0.6-1.201410091836gitf7ca881.git.0.4d3b99d.el7.noarch Verified according to the procedure outlined in Comment 0. Verified against four Satellite 6.0.8 applications, two of which are running on RHEL 6.6, and two of which are running on RHEL 7.0. 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-2015:0247 |
Description of problem: hammer do not show subscriptions I want to add to my activation key. Says "no Data" although I see these in webUI with "Default_Organization" selected. Version-Release number of selected component (if applicable): Satellite-6.0.4-RHEL-6-20140723.0 How reproducible: Hammer do not show subscriptions I want to add to activation key Steps to Reproduce: 1. I have satellite with 2 custom products created 2. I have created new activation key: # hammer --username <user> --password <pass> \ activation-key create --content-view-id MyContentView \ --name MyActivationKey --organization "Default_Organization" 3. List all the subscriptions you can attach to the activation key # hammer --username <user> --password <pass> \ subscription list --organization-id 1 Actual results: No data. When I add these product subscriptions via webUI (where I can see them: Content -> Activation Keys -> MyActivationKey -> Subscriptions -> Add) hammer then lists them: # hammer --username <user> --password <pass> activation-key subscriptions --id 1 ---------------------------------|----- ID | NAME ---------------------------------|----- 8a90c1364765d6fc014767fa3df10012 | RHEL 8a90c1364765d6fc014767f98fe6000b | Sat6 ---------------------------------|----- Expected results: Should list subscriptions for mine 2 products. Additional info: # hammer --debug --username <user> --password <pass> subscription list --organization-id 1 [ INFO 2014-07-24 07:45:19 Init] Initialization of Hammer CLI (0.1.1) has started... [DEBUG 2014-07-24 07:45:19 Init] Running at ruby 1.8.7-p352 [ INFO 2014-07-24 07:45:19 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded [ INFO 2014-07-24 07:45:19 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded [ INFO 2014-07-24 07:45:19 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded [DEBUG 2014-07-24 07:45:19 Connection] Registered: foreman [DEBUG 2014-07-24 07:45:19 API] Global headers: { "Accept-Language" => "en", :content_type => "application/json", :accept => "application/json;version=2" } [ INFO 2014-07-24 07:45:21 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed. [ INFO 2014-07-24 07:45:21 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created. [ INFO 2014-07-24 07:45:22 Modules] Extension module hammer_cli_katello (0.0.4) loaded [ INFO 2014-07-24 07:45:22 Modules] Extension module hammer_cli_foreman (0.1.1) loaded [DEBUG 2014-07-24 07:45:22 Init] Using locale 'en' [DEBUG 2014-07-24 07:45:22 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/locale' [DEBUG 2014-07-24 07:45:22 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 2014-07-24 07:45:22 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 2014-07-24 07:45:22 HammerCLI::MainCommand] Called with options: {"option_password"=>"***", "option_debug"=>true, "option_username"=>"admin"} [ INFO 2014-07-24 07:45:22 HammerCLIKatello::SubscriptionCommand] Called with options: {} [ INFO 2014-07-24 07:45:22 HammerCLIKatello::SubscriptionCommand::ListCommand] Called with options: {"option_organization_id"=>"1"} [ INFO 2014-07-24 07:45:22 API] GET /katello/api/organizations/1/subscriptions [DEBUG 2014-07-24 07:45:22 API] Params: {} [DEBUG 2014-07-24 07:45:22 API] Headers: { :params => {} } [DEBUG 2014-07-24 07:45:22 API] Response { "total" => 0, "page" => 1, "per_page" => 20, "sort" => { "order" => nil, "by" => nil }, "search" => nil, "results" => [], "subtotal" => 0 } No data.