Project

General

Profile

Actions

Bug #25628

closed

Could not enable redhat repository using hammer cli

Added by Andrew Kofink over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
easy
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1655239

Description of problem:

Trying to enable repository using cli gives error

  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"
    Could not enable repository:
    One of parameters [ organization_id ] required but not specified.

Version-Release number of selected component (if applicable):
nightly/3.10

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:

Actions #1

Updated by Andrew Kofink over 5 years ago

  • Subject changed from Could not enable redhat repository using hammer cli to Could not enable redhat repository using hammer cli
  • Target version set to Katello 3.10.1
  • Difficulty set to easy
Actions #2

Updated by The Foreman Bot over 5 years ago

  • Assignee set to Andrew Kofink
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/606 added
Actions #3

Updated by Andrew Kofink over 5 years ago

  • Triaged changed from No to Yes
Actions #4

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
Actions #5

Updated by Anonymous about 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by Jonathon Turel almost 5 years ago

  • Target version changed from Katello 3.10.1 to Katello 3.11.0
  • Fixed in Releases Katello 3.11.0 added
  • Found in Releases Katello 3.10.0 added
Actions

Also available in: Atom PDF