Project

General

Profile

Actions

Refactor #37194

closed

Update Hard Coded rhsm url to use an env setting

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

Status:
Closed
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 10 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 10 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 #3

Updated by Partha Aji 6 months ago

  • Target version changed from Katello 4.13.0 to Katello 4.14.0
Actions #4

Updated by The Foreman Bot 5 months ago

  • Fixed in Releases Katello 4.14.0 added
Actions #5

Updated by Partha Aji 5 months ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF