-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
6.18.1
-
False
-
Important
-
sat-endeavour
-
None
-
None
-
None
-
None
-
Yes
Description of problem:
The hammer defaults add --param-name organization_id --param-value 1 command works successfully on Satellite 6.17, but it fails on Satellite 6.18 when using the organization_id default option with the value 1.
How reproducible:
Is this issue a regression from an earlier version:
Yes, the same hammer command executes successfully on Satellite 6.17, but it fails on Satellite 6.18.
Steps to Reproduce:
*Reproducer*
*On 6.17*
# hammer organization list
---|--------|--------|-------------|-------
ID | TITLE | NAME | DESCRIPTION | LABEL
---|--------|--------|-------------|-------
1 | RedHat | RedHat | | RedHat
---|--------|--------|-------------|-------
# hammer defaults add --param-name organization_id --param-value 1
Added organization_id default-option with value 1.
# hammer organization list
---|--------|--------|-------------|-------
ID | TITLE | NAME | DESCRIPTION | LABEL
---|--------|--------|-------------|-------
1 | RedHat | RedHat | | RedHat
---|--------|--------|-------------|-------
*After Upgrade to 6.18*
Upgrade finished.
# hammer organization list Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.
Workaround
Renaming the config file or deleting the default parameter resolves the issue and allows the `hammer organization list` command to work again.
# hammer defaults delete --param-name organization_id organization_id was deleted successfully. # hammer organization list ---|--------|--------|-------------|------- ID | TITLE | NAME | DESCRIPTION | LABEL ---|--------|--------|-------------|------- 1 | RedHat | RedHat | | RedHat ---|--------|--------|-------------|------- # mv ~/.hammer/defaults.yml ~/.hammer/defaults.yml.bkp
Actual behavior:
[Describe the issue in detail, including what is happening and where]
Expected behavior:
[Describe what should be happening instead]
Business Impact / Additional info:
2025-12-23T10:56:58 [I|app|b70cbb51] Started GET "/katello/api/organizations?organization_id=1&page=1&per_page=1000" for 127.0.0.1 at 2025-12-23 10:56:58 -0800 2025-12-23T10:56:58 [I|app|b70cbb51] Processing by Katello::Api::V2::OrganizationsController#index as JSON 2025-12-23T10:56:58 [I|app|b70cbb51] Parameters: {"organization_id"=>"1", "page"=>"1", "per_page"=>"1000", "api_version"=>"v2", "organization"=>{}} 2025-12-23T10:56:58 [W|app|b70cbb51] Action failed 2025-12-23T10:56:58 [I|app|b70cbb51] Backtrace for 'Action failed' error (NoMethodError): undefined method `admin?' for nil:NilClass b70cbb51 | /usr/share/foreman/app/controllers/api/base_controller.rb:428:in `parent_resource_details' b70cbb51 | /usr/share/foreman/app/controllers/api/base_controller.rb:341:in `find_nested_object' b70cbb51 | /usr/share/foreman/app/controllers/api/base_controller.rb:335:in `find_optional_nested_object'