Bug 1489103

Summary: subscription-manager-cockpit registers by proxy even no proxy is set in register dialog
Product: Red Hat Enterprise Linux 7 Reporter: Jan Stavel <jstavel>
Component: subscription-managerAssignee: Kevin Howell <khowell>
Status: CLOSED DUPLICATE QA Contact: Jan Stavel <jstavel>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.5CC: jhnidek, jstavel, khowell, redakkan, salmy, skallesh
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.20.10-1 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-12 11:34:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Stavel 2017-09-06 17:18:30 UTC
Description of problem:

If proxy properties are set in /etc/rhsm/rhsm.conf 
and you register a system using cockpit plugin
the proxy server is used even you had not set any proxy field in the cockpit register dialog.


Version-Release number of selected component (if applicable):

[root@jstavel-rhel7-latest-server ~]# rpm -qa | grep cockpit
cockpit-bridge-138-9.el7.x86_64
cockpit-system-138-9.el7.noarch
cockpit-138-9.el7.x86_64
cockpit-ws-138-9.el7.x86_64


How reproducible:

Each time.

Steps to Reproduce:
1. set variables in /etc/rhsm/rhsm.conf for proxy:
   
   [root@jstavel-rhel7-latest-server ~]# grep proxy /etc/rhsm/rhsm.conf
   proxy_hostname = auto-services.usersys.redhat.com
   proxy_port = 3129
   proxy_user = 
   proxy_password = 
   no_proxy = 

2. open cockpit subscription plugin
3. click 'Register' 
   and do not set any proxy related field
4. fill login and password
   and click 'Register'

you can check the network connections:

   tcpdump -i eth0 tcp and not ssh and not port websm

13:06:47.372069 IP host-172-16-47-48.openstacklocal.44892 > dhcp6-121.lab.eng.rdu.redhat.com.netport-id: Flags [.], ack 19709, win 519, options [nop,nop,TS val 2212112996 ecr 1128834587], length 0

 

Actual results:


Expected results:


Additional info:

Comment 3 Jan Stavel 2018-02-13 16:30:23 UTC
[root@jstavel-rhel7-server ~]# rpm -qa | grep cockpit
cockpit-ws-154-3.el7.x86_64
cockpit-bridge-154-3.el7.x86_64
cockpit-154-3.el7.x86_64
cockpit-system-154-3.el7.noarch
subscription-manager-cockpit-1.20.10-1.el7.noarch

I cannot verify that cockpit does not use proxy.

grep proxy /etc/rhsm/rhsm.conf

   [root@jstavel-rhel7-server ~]# grep proxy /etc/rhsm/rhsm.conf
   proxy_hostname = auto-services.usersys.redhat.com
   proxy_port = 3129
   proxy_user=
   proxy_password=
   no_proxy=

Click on 'Register'

I see empty  [ ] 'use proxy' 
I fill username and password for entitlement
I click 'Register' button.

I see a communication in a terminal with:
   tcpdump -i eth0 tcp and dst host auto-services.usersys.redhat.com

Comment 4 Jan Stavel 2018-02-13 18:28:37 UTC
I may be wrong but this error has not been fixed yet.

It may be a misunderstanding - the key point is that if I see '[ ] use proxy' then no proxy is used even it is set in /etc/rhsm/rhsm.conf.

Or let cockpit display the values from /etc/rhsm/rhsm.conf and once I change it let cockpit write it back to /etc/rhsm/rhsm.conf.

Comment 5 Kevin Howell 2018-02-15 20:19:52 UTC
Jan, we interpreted similar to bug 1487688. Due to bug 1504588, rhsm service does not re-read rhsm.conf if it is edited. We need to restart rhsm service after manually editing rhsm.conf.

Accordingly, steps for testing should be:
1. set variables in /etc/rhsm/rhsm.conf for proxy:
   
   [root@jstavel-rhel7-latest-server ~]# grep proxy /etc/rhsm/rhsm.conf
   proxy_hostname = auto-services.usersys.redhat.com
   proxy_port = 3129
   proxy_user = 
   proxy_password = 
   no_proxy = 
2. Restart rhsm service:
   [root@jstavel-rhel7-latest-server ~]# systemctl restart rhsm

3. open cockpit subscription plugin

4. click 'Register' 
   and do not set any proxy related field

5. fill login and password
   and click 'Register'

Though perhaps this is already covered by bug 1487688. Can you please elaborate on expected behavior, especially compared to bug 1487688 and bug 1504588?

Comment 7 Jan Stavel 2018-03-12 11:34:09 UTC
I will close it. It is related to a behaviour that cockpit rereads configuration of /etc/rhsm/rhsm.conf.

Another bugs describe this behaviour.

*** This bug has been marked as a duplicate of bug 1504588 ***