Bug #38723
closedAttempts to set cdn_configuration on downstream SAT organization fails due to RH Cloud controller overwrites
Description
Attempts to set cdn_configuration on downstream organization fails with 500 ISE.
The foreman_rh_cloud plugin overwrites the list of methods that run local_find_taxonomy as a before_action in the Organizations controller: https://github.com/theforeman/foreman_rh_cloud/pull/1003/files#diff-d703d9179cea9d0d9bb78f9d6a1028620c7d4270479ebed553223bf4826ddc3dR227
As such, the cdn_configuration method fails because the organization is never looked up. There are other methods in the organizations controller that are broken as well, like cancel_repo_discover.
Steps to reproduce
- Start katello with foreman rh cloud
- run this hammer command
hammer organization configure-cdn --id 1 --type redhat_cdn --url "https://cdn.redhat.com"
Expected:
CDN Configuration Updated
Actual:
Could not update CDN configuration.: 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.
Updated by The Foreman Bot 10 months ago
- Status changed from New to Ready For Testing
- Assignee set to Partha Aji
- Pull request https://github.com/Katello/katello/pull/11490 added
Updated by The Foreman Bot 10 months ago
- Pull request https://github.com/theforeman/foreman_rh_cloud/pull/1085 added
Updated by Ian Ballou 9 months ago
- Target version changed from Katello 4.20.0 to Katello 4.18.1
- Triaged changed from No to Yes
Updated by Ian Ballou 9 months ago
The RH cloud change here depends on the Katello change, but not the other way around.
Updated by Ian Ballou 9 months ago
- Target version changed from Katello 4.18.1 to Katello 4.18.0
Updated by Partha Aji 9 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|9f72db7ef32906dded988d1837e27d39d406278e.
Updated by The Foreman Bot 9 months ago
- Pull request https://github.com/theforeman/foreman_rh_cloud/pull/1095 added
Updated by The Foreman Bot 8 months ago
- Pull request https://github.com/Katello/katello/pull/11551 added
Updated by Nadja Heitmann 7 months ago
ยท Edited
I am on Katello 4.18.1 and on foreman_rh_cloud 12.2.12 and I still can reproduce the issue when running:
hammer organization list --organization-id 1 (the key is passing the optional organization-id parameter although I don't really understand why you would want to do that).
Logs:
2025-11-11T12:17:35 [I|app|d5670b7b] Started GET "/katello/api/organizations?organization_id=1&page=1&per_page=1000" for 127.0.0.1 at 2025-11-11 12:17:35 +0000
2025-11-11T12:17:35 [I|app|d5670b7b] Processing by Katello::Api::V2::OrganizationsController#index as JSON
2025-11-11T12:17:35 [I|app|d5670b7b] Parameters: {"organization_id"=>"1", "page"=>"1", "per_page"=>"1000", "api_version"=>"v2", "organization"=>{}}
2025-11-11T12:17:35 [W|app|d5670b7b] Action failed
2025-11-11T12:17:35 [I|app|d5670b7b] Backtrace for 'Action failed' error (NoMethodError): undefined method `admin?' for nil:NilClass
d5670b7b | /usr/share/foreman/app/controllers/api/base_controller.rb:428:in `parent_resource_details'
The error also occurs when you use FAM or call the API directly. The error does NOT occur for the `show` command in the API.
Updated by The Foreman Bot 4 months ago
- Pull request https://github.com/theforeman/foreman_rh_cloud/pull/1152 added