Unable to add repositories to the content view using a hammer on Red Hat Satellite 6.
Environment
- Red Hat Satellite 6.x
Issue
- Failing to enable specify repository with the below command on the Red Hat Satellite CLI
# hammer content-view create --organization ExampleCorp --name "RHEL content view" --product 'Red Hat Enterprise Linux Server' --repositories "Red Hat Enterprise Linux 5 Server RPMs x86_64 5Server"
Resolution
Extend the per page value on the Red Hat Satellite WebUI to add the repositories using Hammer.
- Navigate to
Administer->Settings->General->Entries per page-> Increase the value as required(30).
Rerun the hammer command on the Red Hat Satellite CLI.
For more KB articles/solutions related to Red Hat Satellite 6.x hammer Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x hammer-related Issues
For more KB articles/solutions related to Red Hat Satellite 6.x Content View Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Content View Issues
Root Cause
- By default, the Red Hat Satellite configuration for per page list is set to 20.
- As the synchronised repositories were greater than 20, enabling the repository failed.
[DEBUG 2018-04-01 04:32:06 API] Response: {
"total" => 25,
"subtotal" => 25,
"page" => 1,
"per_page" => 20,
"error" => nil,
"search" => nil,
"sort" => {
"by" => nil,
"order" => nil
},
Diagnostic Steps
- Run hammer command with -d option.
# hammer -d -u admin -p changeme content-view create --organization-id 1 --name testcontentview --product "Red Hat Enterprise Linux Server" --repositories "Red Hat Enterprise Linux 5 Server RPMs x86_64 5Server"
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.