Bug 1014660

Summary: not able to remove proxy setup to no proxy if you have already set it up
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: rpm-supportAssignee: Barnaby Court <bcourt>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: medium    
Version: MasterCC: bcourt, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: 2.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-09 14:31:32 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 Preethi Thomas 2013-10-02 13:49:01 UTC
Description of problem:
If you set up a repo with --proxy-host then there is no way to remove it. You can update it to a different proxy, but not to none

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


How reproducible:


Steps to Reproduce:
1. create a repo with proxy (--proxy-host, --proxy-port)
2. Try to update the repo with --proxy-host "" and --proxy-port ""


Actual result

[root@ibm-ls22-02 ~]# pulp-admin rpm repo list --details
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  zoo
Display Name:        zoo
Description:         None
Content Unit Counts: 
  Erratum:          4
  Package Category: 1
  Package Group:    2
  Rpm:              32
Notes:               
Importers:           
  Config:           
    Feed:       http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
    Proxy Host: http://pulp-proxy.usersys.redhat.com
    Proxy Port: 3128
  Id:               yum_importer
  Importer Type Id: yum_importer
  Last Sync:        2013-09-30T12:41:26-04:00
  Repo Id:          zoo
  Scheduled Syncs:  
Distributors:        
  Auto Publish:        True
  Config:              
    Http:         False
    Https:        True
    Relative URL: /repos/pulp/pulp/demo_repos/zoo/
  Distributor Type Id: yum_distributor
  Id:                  yum_distributor
  Last Publish:        2013-09-30T12:41:27-04:00
  Repo Id:             zoo
  Scheduled Publishes: 



[root@ibm-ls22-02 ~]# pulp-admin rpm repo update  --repo-id zoo  --proxy-host "" --proxy-port ""
The server indicated one or more values were incorrect. The server provided the
following error message:

   Configuration errors:
The configuration parameter <proxy_host> is required
when any of the following other parameters are defined: proxy_password,
proxy_port, proxy_username.

More information can be found in the client log file ~/.pulp/admin.log.

[root@ibm-ls22-02 ~]# 
[root@ibm-ls22-02 ~]# 
[root@ibm-ls22-02 ~]# pulp-admin rpm repo update  --repo-id zoo  --proxy-host "" --proxy-port "" --proxy-user "" --proxy-pass ""
The server indicated one or more values were incorrect. The server provided the
following error message:

   Configuration errors:
The configuration parameter <proxy_host> is required
when any of the following other parameters are defined: proxy_password,
proxy_port, proxy_username.

More information can be found in the client log file ~/.pulp/admin.log.

[root@ibm-ls22-02 ~]# 


Expected results:


Additional info:

Comment 1 Barnaby Court 2013-10-04 14:00:04 UTC
PR: https://github.com/pulp/pulp/pull/652

Comment 2 Barnaby Court 2013-10-07 16:43:15 UTC
PR: https://github.com/pulp/pulp/pull/652

Comment 3 Jeff Ortel 2013-10-11 15:26:01 UTC
build: 2.3.0-0.18.beta

Comment 4 Preethi Thomas 2013-10-15 18:07:25 UTC
verified

[root@pulp-v2-server ~]# rpm -qa pulp-server
pulp-server-2.3.0-0.20.beta.el6.noarch
[root@pulp-v2-server ~]# 

[root@pulp-v2-server ~]# pulp-admin rpm repo create --repo-id zoo --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/ --proxy-host http://pulp-proxy.usersys.redhat.com --proxy-port 3128
Successfully created repository [zoo]

[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# pulp-admin repo list --details
+----------------------------------------------------------------------+
                              Repositories
+----------------------------------------------------------------------+

Id:                  zoo
Display Name:        zoo
Description:         None
Content Unit Counts: 
Notes:               
Importers:           
  Config:           
    Feed:       http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
    Proxy Host: http://pulp-proxy.usersys.redhat.com
    Proxy Port: 3128
  Id:               yum_importer
  Importer Type Id: yum_importer
  Last Sync:        None
  Repo Id:          zoo
  Scheduled Syncs:  
Distributors:        
  Auto Publish:        True
  Config:              
    Http:         False
    Https:        True
    Relative URL: /repos/pulp/pulp/demo_repos/zoo/
  Distributor Type Id: yum_distributor
  Id:                  yum_distributor
  Last Publish:        None
  Repo Id:             zoo
  Scheduled Publishes: 
  Auto Publish:        False
  Config:              
    Http:  False
    Https: True
  Distributor Type Id: export_distributor
  Id:                  export_distributor
  Last Publish:        None
  Repo Id:             zoo
  Scheduled Publishes: 


[root@pulp-v2-server ~]# pulp-admin rpm repo update  --repo-id zoo  --proxy-host "" --proxy-port ""
Repository [zoo] successfully updated

[root@pulp-v2-server ~]# pulp-admin repo list --details+----------------------------------------------------------------------+
                              Repositories
+----------------------------------------------------------------------+

Id:                  zoo
Display Name:        zoo
Description:         None
Content Unit Counts: 
Notes:               
Importers:           
  Config:           
    Feed: http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
  Id:               yum_importer
  Importer Type Id: yum_importer
  Last Sync:        None
  Repo Id:          zoo
  Scheduled Syncs:  
Distributors:        
  Auto Publish:        True
  Config:              
    Http:         False
    Https:        True
    Relative URL: /repos/pulp/pulp/demo_repos/zoo/
  Distributor Type Id: yum_distributor
  Id:                  yum_distributor
  Last Publish:        None
  Repo Id:             zoo
  Scheduled Publishes: 
  Auto Publish:        False
  Config:              
    Http:  False
    Https: True
  Distributor Type Id: export_distributor
  Id:                  export_distributor
  Last Publish:        None
  Repo Id:             zoo
  Scheduled Publishes: 


[root@pulp-v2-server ~]#

Comment 5 Preethi Thomas 2013-12-09 14:31:32 UTC
Pulp 2.3 released.