Project

General

Profile

Actions

Refactor #37194

open

Update Hard Coded rhsm url to use an env setting

Added by Partha Aji 2 months ago. Updated 2 months ago.

Status:
Ready For Testing
Priority:
Normal
Assignee:
Category:
Subscriptions
Target version:
Branch:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

https://github.com/Katello/katello/blob/master/app/lib/katello/resources/candlepin/upstream_job.rb#L7 hard codes the rhsm url. This makes it impossible to run this operation in a stage environment without changing the url in this file.
Better alternative will be something along having an env variable like RHSM_REDHAT_API_URL. The user then set its value the service file similar to

# cat /etc/systemd/system/foreman.service.d/override.conf
[Service]
Environment=RHSM_REDHAT_API_URL=https://<stage rhsm>/subscription

and the default being the present default.
RH Cloud has a similar strategy to help with the qe env

https://github.com/theforeman/foreman_rh_cloud/blob/foreman_3_9/lib/foreman_inventory_upload.rb#L54-L57

Actions #1

Updated by Samir Jha 2 months ago

  • Tracker changed from Support to Refactor
  • Target version set to Katello 4.13.0
  • Triaged changed from No to Yes
Actions #2

Updated by The Foreman Bot 2 months ago

  • Status changed from New to Ready For Testing
  • Assignee set to Partha Aji
  • Pull request https://github.com/Katello/katello/pull/10902 added
Actions

Also available in: Atom PDF