Project

General

Profile

Actions

Bug #28178

closed

Repository create with http_proxy name fails with Error: Found more than one http_proxy.

Added by Vijay Singh almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Repository create with http_proxy name fails with Error: Found more than one http_proxy.

Steps:

hammer> repository create --name RenuRani7 --product-id 1 --content-type yum --url 'https://repos.fedorapeople.org/repos/pulp/pulp/fixtures/srpm/' --http-proxy TestProxy --http-proxy-policy use_selected_http_proxy
Could not create the repository:
  Error: Found more than one http_proxy.
hammer>

Actual Result:

Error: Found more than one http_proxy.

Expected Result:

Able to create Repository using http_proxy name.

Related issues 1 (1 open0 closed)

Related to Katello - Tracker #28179: [Tracker] Content Mgmt: http_proxy issuesNewJames Jeffers

Actions
Actions #1

Updated by Vijay Singh almost 5 years ago

  • Related to Tracker #28179: [Tracker] Content Mgmt: http_proxy issues added
Actions #2

Updated by James Jeffers almost 5 years ago

  • Assignee deleted (James Jeffers)

Reproduced this with 2 http proxies - "TestProxy" and "TestProxy2". Using hammer

hammer repository create --name VijayTest2 --product-id 2 --content-type yum --url 'https://repos.fedorapeople.org/repos/pulp/pulp/fixtures/srpm/' --http-proxy TestProxy --http-proxy-policy use_selected_http_proxy

Hammer invokes an API request:

14:13:21 rails.1   | 2019-11-01T14:13:21 [I|app|b1971d02] Started GET "/api/http_proxies?name=TestProxy&per_page=1000&page=1" for 192.168.121.219 at 2019-11-01 14:13:21 +0000
14:13:21 rails.1   | 2019-11-01T14:13:21 [I|app|b1971d02] Processing by Api::V2::HttpProxiesController#index as JSON
14:13:21 rails.1   | 2019-11-01T14:13:21 [I|app|b1971d02]   Parameters: {"name"=>"TestProxy", "per_page"=>"1000", "page"=>"1", "apiv"=>"v2", "http_proxy"=>{}}
14:13:21 rails.1   | 2019-11-01T14:13:21 [D|app|b1971d02] Authenticated user admin against INTERNAL authentication source
14:13:21 rails.1   | 2019-11-01T14:13:21 [I|app|b1971d02] Authorized user admin(Admin User)
14:13:21 rails.1   | 2019-11-01T14:13:21 [D|tax|b1971d02] Current location set to none
14:13:21 rails.1   | 2019-11-01T14:13:21 [D|tax|b1971d02] Current organization set to none
14:13:21 rails.1   | 2019-11-01T14:13:21 [D|tax|b1971d02] Current location set to none
14:13:21 rails.1   | 2019-11-01T14:13:21 [D|tax|b1971d02] Current organization set to none
14:13:21 rails.1   | 2019-11-01T14:13:21 [I|app|b1971d02]   Rendering api/v2/http_proxies/index.json.rabl within api/v2/layouts/index_layout
14:13:21 rails.1   | 2019-11-01T14:13:21 [I|app|b1971d02]   Rendered api/v2/http_proxies/index.json.rabl within api/v2/layouts/index_layout (17.0ms)
14:13:21 rails.1   | 2019-11-01T14:13:21 [D|app|b1971d02] Body: {
14:13:21 rails.1   |  |   "total": 2,
14:13:21 rails.1   |  |   "subtotal": 2,
14:13:21 rails.1   |  |   "page": 1,
14:13:21 rails.1   |  |   "per_page": 1000,
14:13:21 rails.1   |  |   "search": null,
14:13:21 rails.1   |  |   "sort": {
14:13:21 rails.1   |  |     "by": null,
14:13:21 rails.1   |  |     "order": null
14:13:21 rails.1   |  |   },
14:13:21 rails.1   |  |   "results": [{"id":1,"name":"TestProxy","url":"http://192.168.1.112","username":"admin"},{"id":2,"name":"TestProxy2","url":"http://192.168.1.121:8888","username":""}]
14:13:21 rails.1   |  | }

While the parameter is actually the name of one of the http proxies, the list returned is actually all http proxies that match that name. The supplied name is a search, and not a unique identifier according to how the API controller is implemented.

See https://github.com/theforeman/foreman/blob/develop/app/controllers/api/v2/http_proxies_controller.rb.

Actions #3

Updated by Justin Sherrill almost 5 years ago

  • Target version set to Katello Backlog
  • Triaged changed from No to Yes
Actions #4

Updated by James Jeffers over 4 years ago

  • Bugzilla link set to 1777720
Actions #5

Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Chris Roberts
  • Target version deleted (Katello Backlog)
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/711 added
Actions #6

Updated by Chris Roberts over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #7

Updated by Jonathon Turel over 4 years ago

  • Target version set to Katello 3.15.0
Actions

Also available in: Atom PDF