Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1576423 - proxy_port from rhsm.conf not used
proxy_port from rhsm.conf not used
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager (Show other bugs)
7.5
All Linux
unspecified Severity low
: rc
: ---
Assigned To: Jiri Hnidek
Red Hat subscription-manager QE Team
Marie Dolezelova
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-09 08:30 EDT by Oskar Wycislak
Modified: 2018-10-30 06:37 EDT (History)
6 users (show)

See Also:
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>
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-30 06:36:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Github candlepin/subscription-manager/pull/1816 None None None 2018-05-11 04:31 EDT
Github candlepin/subscription-manager/pull/1829 None None None 2018-06-08 10:34 EDT
Red Hat Product Errata RHBA-2018:3153 None None None 2018-10-30 06:37 EDT

  None (edit)
Description Oskar Wycislak 2018-05-09 08:30:47 EDT
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 11:25:11 EDT
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 08:00:58 EDT
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 08:08:16 EDT
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 13:41:50 EDT
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 07:49:10 EDT
(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 06:36:12 EDT
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.