Bug 733474

Summary: Sync fails silently when repo created with API, with blank URL
Product: [Retired] Katello Reporter: Jeff Weiss <jweiss>
Component: WebUIAssignee: Ivan Necas <inecas>
Status: CLOSED UPSTREAM QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.0CC: dajohnso, inecas, mmccune
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
pulp-0.0.227-1.fc14.noarch
Last Closed: 2012-07-17 13:09:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Weiss 2011-08-25 19:04:10 UTC
Description of problem:
The UI checks for valid urls but the API does not.  The UI does not handle this condition when syncing.

Version-Release number of selected component (if applicable):
katello-0.1.70-1.git.288.120a626.fc14.noarch

How reproducible:


Steps to Reproduce:
1. Create a product
2. In that product, use the API to create a repo with blank URL (nil).
3. In the GUI, sync the product
  
Actual results:
Fails silently

Expected results:
Fails with error message in the UI about what's wrong with that repo

Additional info:
Logs:

RestClient::NotAcceptable (Pulp::Repository: 406 Not Acceptable "Repo [1314294222681-testrepo-1314294224019-ACME_Corporation] is not setup for sync. Please add packages using upload." (POST /pulp/api/repositories/1314294222681-testrepo-1314294224019-ACME_Corporation/sync/)):
  lib/http_resource.rb:94:in `post'
  lib/resources/pulp.rb:205:in `sync'
  app/controllers/sync_management_controller.rb:173:in `sync_repos'
  app/controllers/sync_management_controller.rb:170:in `each'
  app/controllers/sync_management_controller.rb:170:in `inject'
  app/controllers/sync_management_controller.rb:170:in `sync_repos'
  app/controllers/sync_management_controller.rb:77:in `sync'
  lib/util/threadsession.rb:77:in `thread_locals'

Comment 1 Mike McCune 2011-09-02 19:24:10 UTC
The API needs to validate the URL like the UI does.  Sending to BK

Comment 2 Ivan Necas 2012-03-30 13:16:45 UTC
Fixed in commit 051d093b6cd5199a1569a23ac5f1cbf39349460c

Comment 3 Bryan Kearney 2012-07-17 13:09:30 UTC
Moving all community bugs with fixes to closed.