Project

General

Profile

Actions

Bug #38723

closed

Attempts to set cdn_configuration on downstream SAT organization fails due to RH Cloud controller overwrites

Added by Partha Aji 10 months ago. Updated 4 months ago.


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.

Actions #1

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
Actions #2

Updated by The Foreman Bot 10 months ago

  • Pull request https://github.com/theforeman/foreman_rh_cloud/pull/1085 added
Actions #3

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
Actions #4

Updated by Ian Ballou 9 months ago

The RH cloud change here depends on the Katello change, but not the other way around.

Actions #5

Updated by Ian Ballou 9 months ago

  • Target version changed from Katello 4.18.1 to Katello 4.18.0
Actions #6

Updated by The Foreman Bot 9 months ago

  • Fixed in Releases Katello 4.19.0 added
Actions #7

Updated by Partha Aji 9 months ago

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

Updated by The Foreman Bot 9 months ago

  • Fixed in Releases Katello 4.18.1 added
Actions #9

Updated by The Foreman Bot 9 months ago

  • Pull request https://github.com/theforeman/foreman_rh_cloud/pull/1095 added
Actions #10

Updated by The Foreman Bot 8 months ago

  • Pull request https://github.com/Katello/katello/pull/11551 added
Actions #11

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.

Actions #12

Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/theforeman/foreman_rh_cloud/pull/1152 added
Actions

Also available in: Atom PDF