Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-153441

rhsm.service does not use proxy env. vars. specified in systemd conf. when client uses dbus

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-10.2
    • subscription-manager
    • None
    • None
    • Low
    • subs-client-tools-2
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • x86_64
    • None

      I'm trying to configure global proxy settings for the rhc system role tests so that they work in Testing Farm.  I am doing this by adding

      export http_proxy=http://squid....
      export https_proxy=http://squid....
      

      to /root/.bashrc, and adding

      [Service]
      Environment=http_proxy=http://squid....
      Environment=https_proxy=http://squid....
      

      to /etc/systemd/system/rhsm.service.d/proxy.conf

      This makes everything work EXCEPT when the subman client uses dbus to connect to rhsm.service.  I think the problem is here: https://github.com/candlepin/subscription-manager/blame/main/src/rhsm/connection.py#L250

      For some reason, the proxy_hostname et. al. parameters from the client are passed as the empty string "" instead of None, and the condition expects only the value of None to mean "parameter not passed from client".  I think the condition should be `if proxy_hostname:` instead.

      The problem is that I will need to change every rhc system role test to optionally add the "rhc_proxy" parameters if a global proxy is specified.  This is a lot of work that I would like to avoid. Unfortunately, since this fix is unlikely to be backported to every platform the rhc role supports, I will need to find some workaround regardless.

              csi-client-tools-bugs CSI Client Tools Bugs Bot
              rmeggins@redhat.com Richard Megginson
              CSI Client Tools Bugs Bot CSI Client Tools Bugs Bot
              CSI Client Tools Bugs Bot CSI Client Tools Bugs Bot
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: