Bug 1789676

Summary: After updating http-proxy for repository, repository info command shows the old http-proxy-id and new http-proxy name.
Product: Red Hat Satellite Reporter: Jameer Pathan <jpathan>
Component: RepositoriesAssignee: James Jeffers <jjeffers>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: jjeffers, jsherril, zhunting
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.14.0.10-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:28:29 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:
Bug Depends On:    
Bug Blocks: 1774324    

Description Jameer Pathan 2020-01-10 05:13:15 UTC
Description of problem:
After updating http-proxy for repository, repository info command  shows the old http-proxy-id and new http-proxy name.

Version-Release number of selected component (if applicable):
- Satellite 6.7.0 snap 7

How reproducible:
- Always

Steps to Reproduce:
- Create repository with http-proxy-policy "use_selected_http_proxy".
- Update http-poroxy-policy for that repo to "global_default_http_proxy"

Actual results:
When we update http-proxy-policy from "use_selected_http_proxy" to
"global_default_http_proxy" or "none", then the repository info command 
shows the old http-proxy-id and new http-proxy name.

Expected results:
Repository info command should show new http-proxy's id and name.

Additional info:
Following is the scenario which I tried:

hammer> http-proxy list
---|----------------
ID | NAME           
---|----------------
12 | UKPJWnMGVlBewLI
13 | RwiWoWGxvMTMKrB
14 | XJBLtNRwCdYaKYO
15 | ENknxTwMXZyIUZF
16 | zOJZXSWZFVphfbz
17 | iiivHHNMmDXJEnC
18 | YBRjVEjABwpuTTJ
19 | nIsZblTjBnwuCnL
20 | bXolSOEqRFNierF
21 | IVfQUvctowwnLVu
22 | FaZghEWIxjTdauT
23 | TntoMBeNwzukUxy
24 | TYlThttwqgYuBuz
25 | ATESSLPWaXKwlky
26 | BLTgMwDPJXwUhaO
27 | oSKjRcTMpIiIwPy
28 | mfpGMBCKPBcIwCO
29 | a              
30 | b              
---|----------------

hammer> repository create --name repo1 --product Sat6Tools7 --organization-id 1 --url "https://test.com" --content-type "yum" --http-proxy-policy "use_selected_http_proxy" --http-proxy-id 30
Repository created.


hammer> repository info --name repo1 --product Sat6Tools7 --organization-id 1
ID:                 88
Name:               repo1
Label:              repo1
Organization:       Default Organization
Red Hat Repository: no
Content Type:       yum
Mirror on Sync:     yes
URL:                https://test.com
Publish Via HTTP:   yes
Published At:       http://sat_hostname.com/pulp/repos/Default_Organization/Library/custom/Sat6Tools7/repo1/
Relative Path:      Default_Organization/Library/custom/Sat6Tools7/repo1
Download Policy:    on_demand
Http Proxy:         
    ID:   30
    Name: b
Product:            
    ID:   59
    Name: Sat6Tools7
GPG Key:            

Sync:               
    Status: Not Synced
Created:            2020/01/09 13:38:25
Updated:            2020/01/09 13:38:26
Content Counts:     
    Packages:       0
    Source RPMS:    0
    Package Groups: 0
    Errata:         0
    Module Streams: 0


hammer> repository update --id 88 --http-proxy-policy "global_default_http_proxy"
Repository updated.
hammer> repository info --id 88
ID:                 88
Name:               repo1
Label:              repo1
Organization:       Default Organization
Red Hat Repository: no
Content Type:       yum
Mirror on Sync:     yes
URL:                https://test.com
Publish Via HTTP:   yes
Published At:       http://sat_hostname.com/pulp/repos/Default_Organization/Library/custom/Sat6Tools7/repo1/
Relative Path:      Default_Organization/Library/custom/Sat6Tools7/repo1
Download Policy:    on_demand
Http Proxy:         
    ID:   30
    Name: a
Product:            
    ID:   59
    Name: Sat6Tools7
GPG Key:            

Sync:               
    Status: Not Synced
Created:            2020/01/09 13:38:25
Updated:            2020/01/09 13:41:34
Content Counts:     
    Packages:       0
    Source RPMS:    0
    Package Groups: 0
    Errata:         0
    Module Streams: 0

hammer> repository update --id 88 --http-proxy-policy "none"
Repository updated.
hammer> repository info --id 88
ID:                 88
Name:               repo1
Label:              repo1
Organization:       Default Organization
Red Hat Repository: no
Content Type:       yum
Mirror on Sync:     yes
URL:                https://test.com
Publish Via HTTP:   yes
Published At:       http://sat_hostname.com/pulp/repos/Default_Organization/Library/custom/Sat6Tools7/repo1/
Relative Path:      Default_Organization/Library/custom/Sat6Tools7/repo1
Download Policy:    on_demand
Http Proxy:         
    ID: 30
Product:            
    ID:   59
    Name: Sat6Tools7
GPG Key:            

Sync:               
    Status: Not Synced
Created:            2020/01/09 13:38:25
Updated:            2020/01/09 13:42:26
Content Counts:     
    Packages:       0
    Source RPMS:    0
    Package Groups: 0
    Errata:         0
    Module Streams: 0

Comment 5 Justin Sherrill 2020-01-16 02:20:48 UTC
I would add that part of the issue is that the Proxy policy isn't even displayed as part of info, which further confuses the issue

Comment 7 Jameer Pathan 2020-02-10 09:59:20 UTC
Verified 

Verified with:
- Satellite 6.7.0 snap 11

Test steps:
- Create repository with http-proxy-policy "use_selected_http_proxy".
- Update http-proxy-policy for that repo to "global_default_http_proxy"

Observation:
- Repository info command shows expected output.

Comment 10 errata-xmlrpc 2020-04-14 13:28:29 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/RHSA-2020:1454