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

/etc/systemd/system/rhcd.service.d/proxy.conf uses network protocol for NO_PROXY declaration

XMLWordPrintable

    • None
    • None
    • None
    • To Do

      After the cloud-connector job is executed, When satellite is configured with proxy, The /etc/systemd/system/rhcd.service.d/proxy.conf has NO_PROXY defined as
      Environment=NO_PROXY=https://satellite.example.com

      Ideally NO_PROXY is defined as IP or FQDN or a subnet without the network protocol https

      This may in some cases cause failures as below where the satellite is not allowed to connect to itself via proxy and rhc still makes that call:

      worker.go:111: [/usr/libexec/rhc/foreman-rh-cloud-worker] 2025/05/16 17:37:54 Post "https://satellite.example.com/api/v2/rh_cloud/cloud_request": tls: failed to verify certificate: x509: certificate signed by unknown authority

       

      Source: https://github.com/RedHatSatellite/satellite-operations-collection/blob/master/roles/cloud_connector/templates/proxy.conf.j2#L3 

      Possible fix: 

       

      diff --git a/roles/cloud_connector/templates/proxy.conf.j2 b/roles/cloud_connector/templates/proxy.conf.j2
      index 2965c4b..39edfef 100644
      --- a/roles/cloud_connector/templates/proxy.conf.j2
      +++ b/roles/cloud_connector/templates/proxy.conf.j2
      @@ -1,3 +1,3 @@
       [Service]
       Environment=HTTPS_PROXY={{ satellite_cloud_connector_http_proxy }}
      -Environment=NO_PROXY={{ satellite_cloud_connector_url }}
      +Environment=NO_PROXY={{ satellite_cloud_connector_url | regex_replace('^https?://', '') }}

       

              rhn-support-saydas Sayan Das
              rhn-support-smajumdar Soham Majumdar
              Sayan Das
              Jameer Pathan Jameer Pathan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: