Project

General

Profile

Actions

Bug #21438

closed

Can't register content host

Added by John Mitsch over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

2017-10-23T18:26:18 6628d969 [app] [I] Started GET "/rhsm/owners/Default_Organization/environments?name=Library" for 127.0.0.1 at 2017-10-23 18:26:18 +0000
2017-10-23T18:26:18 6628d969 [app] [I] Processing by Katello::Api::Rhsm::CandlepinProxiesController#rhsm_index as JSON
2017-10-23T18:26:18 6628d969 [app] [I] Parameters: {"name"=>"Library", "organization_id"=>"Default_Organization"}
2017-10-23T18:26:18 6628d969 [app] [I] Current user: foreman_admin (administrator)
2017-10-23T18:26:18 6628d969 [app] [D] Setting current user thread-local variable to foreman_admin
2017-10-23T18:26:18 6628d969 [app] [D] Setting current user thread-local variable to nil
2017-10-23T18:26:18 6628d969 [katello/cp_proxy] [I] Authorized user admin(Admin User)
2017-10-23T18:26:18 6628d969 [app] [I] Current user: admin (administrator)
2017-10-23T18:26:18 6628d969 [app] [D] Setting current user thread-local variable to admin
2017-10-23T18:26:19 6628d969 [app] [I] Filter chain halted as :authorize rendered or redirected
2017-10-23T18:26:19 6628d969 [app] [I] Completed 404 Not Found in 1128ms (Views: 0.6ms | ActiveRecord: 6.0ms)
2017-10-23T18:26:19 6628d969 [app] [D] With body: {"message"=>"Organization with id Default_Organization not found", "displayMessage"=>"Organization with id Default_Organization not found"} |

git bisect narrows down the issue to foreman commit f17c9611cb16f949fb178fe3de2aabd231e0de5b


Related issues 1 (0 open1 closed)

Related to Katello - Bug #21357: Change the way how default taxonomy is derivedClosedMarek Hulán10/17/2017Actions
Actions #2

Updated by Marek Hulán over 6 years ago

John, this seems to be log from the developer setup, are you sure you have https://github.com/Katello/katello/commit/1832568fa5178376fb8f08b1a1ed0886bff5fb78 (https://github.com/Katello/katello/pull/7008) applied?

Actions #3

Updated by Marek Hulán over 6 years ago

I was able to reproduce, will continue investigating.

Actions #4

Updated by Marek Hulán over 6 years ago

  • Related to Bug #21357: Change the way how default taxonomy is derived added
Actions #5

Updated by Marek Hulán over 6 years ago

  • Assignee set to Marek Hulán
  • Target version set to 1.16.0-RC1

The issue is that after user login we call set_taxonomy directly since we want to set the proper context. The skip_before_action works but it fails even before that. The problem cause is that in this controller, organization_id parameter is organization label. I suppose we won't change subscription manager so the best solution I could think of is adding new before action that executes before any other action and converts the label to id and saves it into params. That way set_taxonomy can still be used and later in this controller actions we can rely on Organization.current. The conversion should be done by existing #find_organization Katello method.

There's also another hack, that overrides params[:organization_id] with params[:owner], that does not need to be changed since that happens after set_taxonomy is called. I'm not entirely sure what that's needed.

Actions #6

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7026 added
Actions #7

Updated by Marek Hulán over 6 years ago

  • Bugzilla link set to 1505639
Actions #8

Updated by Justin Sherrill over 6 years ago

  • translation missing: en.field_release set to 284
Actions #9

Updated by Marek Hulán over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF