Bug 1655239
| Summary: | Could not enable redhat repository using hammer cli | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Nikhil Kathole <nkathole> |
| Component: | Repositories | Assignee: | Andrew Kofink <akofink> |
| Status: | CLOSED ERRATA | QA Contact: | Nikhil Kathole <nkathole> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.5.0 | CC: | dlezzoum, egolov, jhutar, nkathole, paji, vijsingh, zhunting |
| Target Milestone: | 6.5.0 | Keywords: | PrioBumpQA, Regression, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | tfm-rubygem-hammer_cli_katello-0.16.0.2-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-05-14 12:39:19 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: | |||
*** Bug 1655970 has been marked as a duplicate of this bug. *** I am unable to reproduce this on my instance Question for for Nikhil I see that while your hammer call asked for -> "Red Hat Enterprise Linux 7 Server (Kickstart)" hammer repository-set enable --name="Red Hat Enterprise Linux 7 Server (Kickstart)" --basearch="x86_64" --releasever="7.5" --product "Red Hat Enterprise Linux Server" --organization-id="1" I see that the error showed up for "Red Hat Enterprise Linux 7 Server (RPMs)" 2018-12-01T14:24:25 [I|app|] Started GET "/katello/api/repository_sets?name=Red+Hat+Enterprise+Linux+7+Server+%28RPMs%29" for IP at 2018-12-01 14:24:25 -0500 Wondering the log pasted corresponded to this hammer call. Can you also provide us the output of hammer -vd repository-set enable --name="Red Hat Enterprise Linux 7 Server (Kickstart)" --basearch="x86_64" --releasever="7.5" --product "Red Hat Enterprise Linux Server" --organization-id="1" If you have the machine where this is reproducible that would be great too. Created redmine issue https://projects.theforeman.org/issues/25628 from this bug Verified: @Satellite 6.5.0 Snap 12.0 Steps: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ [root@satellite6 ~]# rpm -qa satellite katello foreman pulp-server tfm-rubygem-hammer_cli_foreman tfm-rubygem-hammer_cli_foreman-0.15.1-1.el7sat.noarch pulp-server-2.18.0-0.1.rc.el7sat.noarch foreman-1.20.1.7-1.el7sat.noarch satellite-6.5.0-5.beta.el7sat.noarch katello-3.10.0-0.6.rc1.el7sat.noarch [root@satellite6 ~]# hammer repository-set enable --name="Red Hat Enterprise Linux 7 Server (Kickstart)" --basearch="x86_64" --releasever="7.5" --product "Red Hat Enterprise Linux Server" --organization-id="1" Repository enabled. [root@satellite6 ~]# hammer repository-set list --enabled yes --organization-id="1" -----|-----------|---------------------------------------------- ID | TYPE | NAME -----|-----------|---------------------------------------------- 2455 | kickstart | Red Hat Enterprise Linux 7 Server (Kickstart) -----|-----------|---------------------------------------------- [root@satellite6 ~]# hammer repository-set disable --name="Red Hat Enterprise Linux 7 Server (Kickstart)" --basearch="x86_64" --releasever="7.5" --product "Red Hat Enterprise Linux Server" --organization-id="1" Repository disabled. [root@satellite6 ~]# hammer repository-set list --enabled yes --organization-id="1" ---|------|----- ID | TYPE | NAME ---|------|----- [root@satellite6 ~]# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Observation: - Able to enable the repository using hammer repository-set. - Able to disable the repository using hammer repository-set. 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/RHSA-2019:1222 |
Description of problem: Trying to enable repository using cli gives error # hammer repository-set enable --name="Red Hat Enterprise Linux 7 Server (Kickstart)" --basearch="x86_64" --releasever="7.5" --product "Red Hat Enterprise Linux Server" --organization-id="1" Could not enable repository: One of parameters [ organization_id ] required but not specified. Version-Release number of selected component (if applicable): Satellite 6.5 snap 6 How reproducible: always Steps to Reproduce: 1. hammer repository-set enable --name="Red Hat Enterprise Linux 7 Server (Kickstart)" --basearch="x86_64" --releasever="7.5" --product "Red Hat Enterprise Linux Server" --organization-id="1" Actual results: Error Could not enable repository: One of parameters [ organization_id ] required but not specified. though organization-id is passed and production.log showed 2018-12-01T14:24:25 [I|app|] Started GET "/katello/api/organizations/1/products?name=Red+Hat+Enterprise+Linux+Server" for IP at 2018-12-01 14:24:25 -0500 2018-12-01T14:24:25 [I|app|1f209] Processing by Katello::Api::V2::ProductsController#index as JSON 2018-12-01T14:24:25 [I|app|1f209] Parameters: {"name"=>"Red Hat Enterprise Linux Server", "api_version"=>"v2", "organization_id"=>"1", "product"=>{}} 2018-12-01T14:24:25 [I|app|1f209] Authorized user admin(Admin User) 2018-12-01T14:24:25 [I|app|1f209] Current user set to admin (admin) 2018-12-01T14:24:25 [I|app|1f209] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.rc1/app/views/katello/api/v2/products/index.json.rabl within katello/api/v2/layouts/collection 2018-12-01T14:24:25 [I|app|1f209] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.rc1/app/views/katello/api/v2/products/index.json.rabl within katello/api/v2/layouts/collection (47.6ms) 2018-12-01T14:24:25 [I|app|1f209] Completed 200 OK in 83ms (Views: 43.3ms | ActiveRecord: 15.9ms) 2018-12-01T14:24:25 [I|app|] Started GET "/katello/api/repository_sets?name=Red+Hat+Enterprise+Linux+7+Server+%28RPMs%29" for IP at 2018-12-01 14:24:25 -0500 2018-12-01T14:24:25 [I|app|f7910] Processing by Katello::Api::V2::RepositorySetsController#index as JSON 2018-12-01T14:24:25 [I|app|f7910] Parameters: {"name"=>"Red Hat Enterprise Linux 7 Server (RPMs)", "api_version"=>"v2", "repository_set"=>{}} 2018-12-01T14:24:25 [I|app|f7910] Authorized user admin(Admin User) 2018-12-01T14:24:25 [I|app|f7910] Current user set to admin (admin) 2018-12-01T14:24:25 [E|app|f7910] Katello::HttpErrors::NotFound: One of parameters [ organization_id ] required but not specified. /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.rc1/app/controllers/katello/api/v2/api_controller.rb:135:in `find_organization' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.rc1/app/controllers/katello/api/v2/repository_sets_controller.rb:138:in `find_product_or_organization' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:426:in `block in make_lambda' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:199:in `block in halting' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:513:in `block in invoke_before' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:513:in `each' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:513:in `invoke_before' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:107:in `block in run_callbacks' /usr/share/foreman/app/controllers/api/v2/base_controller.rb:163:in `disable_json_root' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks' /usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone' Expected results: repository should enable. Additional info: