Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-38105

Calls to upstream Candlepin consumer fail when using stage manifest

XMLWordPrintable

    • None
    • None
    • None
    • None

      Katello provides 3 ways to give a url to contact Hosted Candlepin, in order:
      1. You can use the environment variable REDHAT_RHSM_API_URL. (Using env vars is for devel environments only.)
      2. If your organization's upstream consumer has a value for 'apiUrl', it uses that.
      3. Finally, it falls back to hard-coded URLs.

      We can see the format of the expected URL by looking at the hard-coded ones:

      In Glue::Provider:
      API_URL = 'https://subscription.rhsm.redhat.com/subscription/consumers/'.freeze

      But in Katello::Resources::Candlepin::UpstreamJob it doesn't append '/consumers/':
      API_URL = 'https://subscription.rhsm.redhat.com/subscription'.freeze

      To make things worse, UpstreamJob does not allow you use the url from the manifest:

       
      url = ENV['REDHAT_RHSM_API_URL'] ||  API_URL
       
      The result is that if the upstream consumer in your manifest has an apiUrl that appends the '/consumers/' path, calls from Glue::Provider will succeed but calls to UpstreamJob will fail. So two things are needed:

      1. Katello needs to allow UpstreamJob to use the apiUrl from the manifest, and thus poll manifest refreshes correctly even when not using the hard-coded API_URL.

      2. Katello needs to handle adding or subtracting the '/consumers/' as needed.

              rhn-engineering-jlenz Jeremy Lenz
              rhn-engineering-jlenz Jeremy Lenz
              Danny Synk Danny Synk
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: