Bug 1576423 - proxy_port from rhsm.conf not used
Summary: proxy_port from rhsm.conf not used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.5
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
Marie Dolezelova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-09 12:30 UTC by Oskar Wycislak
Modified: 2018-10-30 10:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
Subscription manager now respects `proxy_port` settings from `rhsm.conf` Previously, subscription manager did not respect changes to the default `proxy_port` configuration from the `/etc/rhsm/rhsm.conf` file. Consequently, the default value of 3128 was used even after the user had changed the value of `proxy_port`. With this update, the underlying source code has been fixed, and subscription manager now respects changes to the default `proxy_port` configuration. However, making any change to the `proxy_port` value in `/etc/rhsm/rhsm.conf` requires an selinux policy change. To avoid selinux denials when changing the default `proxy_port`, run this command for the benefit of the `rhsmcertd` daemon process: semanage port -a -t squid_port_t -p tcp <new_proxy_port>
Clone Of:
Environment:
Last Closed: 2018-10-30 10:36:12 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3153 None None None 2018-10-30 10:37:43 UTC
Github candlepin subscription-manager pull 1816 None None None 2018-05-11 08:31:28 UTC
Github candlepin subscription-manager pull 1829 None None None 2018-06-08 14:34:22 UTC
Red Hat Bugzilla 1623376 None CLOSED selinux denials for rhsmcertd process when the system is configured with a proxy port (other than default 3128) 2019-04-15 06:36:31 UTC
Red Hat Bugzilla 1625571 None NEW Man page of rhsm.conf needs to be updated on proxy_port section 2019-04-15 06:36:31 UTC

Internal Links: 1623376 1625571

Description Oskar Wycislak 2018-05-09 12:30:47 UTC
Description of problem:
proxy_port settings from rhsm.conf are not respected by subscription manager.

Version-Release number of selected component (if applicable):
subscription-manager-1.20.11-1.el7_5.x86_64
subscription-manager-rhsm-1.20.11-1.el7_5.x86_64

How reproducible:


Steps to Reproduce:
1. set proxy in rhsm.conf proxy_port = 8080 (different than 3128) and proxy host
2. try to register with satellite

Actual results:
Default proxy port is used.

connect(6, {sa_family=AF_INET, sin_port=htons(3128), sin_addr=inet_addr("XXXX")}, 16) = -1 EINPROGRESS (Operation now in progress)
Proxy connection failed, please check your settings.


Expected results:
Honoring proxy port settings and registering with satellite.

Additional info:
Pull request for upstream provided - https://github.com/candlepin/subscription-manager/pull/1816

Comment 2 Oskar Wycislak 2018-05-09 15:25:11 UTC
Command line used to run subscription-manager

/sbin/subscription-manager register --force --baseurl XXX --serverurl XXX --org XXX --activationkey XXX

Comment 4 Shwetha Kallesh 2018-07-31 12:00:58 UTC
Reproducer:

[root@hp-dl380pgen8-02-vm-13 ~]# subscription-manager  version
server type: This system is currently not registered.
subscription management server: 2.2.3-1
subscription management rules: 5.26
subscription-manager: 1.20.10-1.el7


[root@hp-dl380pgen8-02-vm-13 ~]# strace -e connect -ff /sbin/subscription-manager register --org="*******" --activationkey="rhel7server_ak" --serverurl ********:443/rhsm
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=28824, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
connect(4, {sa_family=AF_LOCAL, sun_path="/run/dbus/system_bus_socket"}, 29) = 0
connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.16.36.29")}, 16) = 0
connect(6, {sa_family=AF_INET, sin_port=htons(3128), sin_addr=inet_addr("10.12.6.121")}, 16) = -1 EINPROGRESS (Operation now in progress)
Proxy connection failed, please check your settings.

Comment 5 Shwetha Kallesh 2018-07-31 12:08:16 UTC
Verification:
[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.7.0.7-Unknown
subscription management rules: 5.26
subscription-manager: 1.21.5-7.el7


[root@localhost ~]# cat /etc/rhsm/rhsm.conf | grep proxy_port
proxy_port = 3129


[root@localhost ~]# strace -e connect -ff /sbin/subscription-manager register --org="******" --activationkey="rhel7server_ak" --serverurl **********:443/rhsm
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13529, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
connect(5, {sa_family=AF_LOCAL, sun_path="/run/dbus/system_bus_socket"}, 29) = 0
connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.75.5.25")}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(3129), sin_addr=inet_addr("10.12.6.121")}, 16) = -1 EINPROGRESS (Operation now in progress)
connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.75.5.25")}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(3129), sin_addr=inet_addr("10.12.6.121")}, 16) = -1 EINPROGRESS (Operation now in progress)


--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13569, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
connect(3, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
connect(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.75.5.25")}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(3129), sin_addr=inet_addr("10.12.6.121")}, 16) = -1 EINPROGRESS (Operation now in progress)
connect(3, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = 0
The system has been registered with ID: b38f2256-4152-478e-b9af-d7e5f985fa1e
The registered system name is: localhost.localdomain

Comment 8 John Sefler 2018-09-24 17:41:50 UTC
Marie,
As currently written, the doc text is not conveying the information that the user needs to know.  Let's try again....


Subscription manager does not respect `proxy_port` settings from rhsm.conf 

Subscription manager does not respect changes to the default `proxy_port` configuration from /etc/rhsm/rhsm.conf.  Even after the user changed the value of `proxy_port`, the default value of 3128 was continually being used.

This bug has now been fixed.  However, making any change to the proxy_port value in /etc/rhsm/rhsm.conf will likely require an selinux policy change.  The user should run this additional step for the benefit of the `rhsmcertd` daemon process to avoid selinux denials whenever changing the default `proxy_port` configuration away from 3128.

semanage port -a -t squid_port_t -p tcp <new_proxy_port>

Comment 9 Marie Dolezelova 2018-10-01 11:49:10 UTC
(In reply to John Sefler from comment #8)
> Marie,
> As currently written, the doc text is not conveying the information that the
> user needs to know.  Let's try again....
> 
> 
> Subscription manager does not respect `proxy_port` settings from rhsm.conf 
> 
> Subscription manager does not respect changes to the default `proxy_port`
> configuration from /etc/rhsm/rhsm.conf.  Even after the user changed the
> value of `proxy_port`, the default value of 3128 was continually being used.
> 
> This bug has now been fixed.  However, making any change to the proxy_port
> value in /etc/rhsm/rhsm.conf will likely require an selinux policy change. 
> The user should run this additional step for the benefit of the `rhsmcertd`
> daemon process to avoid selinux denials whenever changing the default
> `proxy_port` configuration away from 3128.
> 
> semanage port -a -t squid_port_t -p tcp <new_proxy_port>

Hi John,

Thanks a lot for the review and text provided.

I modified it a little bit to meet our documentation conventions. 
I just put the beginning into the past tense - if I understand it well, it was previous behavior (the bug) that was fixed so it's not happening now and should be in the past tense.
Is that correct?

Thank you!
Marie

Comment 14 errata-xmlrpc 2018-10-30 10:36:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3153


Note You need to log in before you can comment on or make changes to this bug.