Bug 787745

Summary: Getting "404 Resource Not Found" when trying to Download a System Template
Product: Red Hat Satellite Reporter: scollier
Component: Content ManagementAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: bbuckingham, cwelton, sreichar
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 18:24:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 747354    

Description scollier 2012-02-06 16:10:43 UTC
Description of problem:

Can not download a system template.  


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

# /pub/scripts/post_install_configuration_scripts/cf-se-versions 
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Linux cf-se2.cloud.lab.eng.bos.redhat.com 2.6.32-220.4.1.el6.x86_64 #1 SMP Thu Jan 19 14:50:54 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
PyYAML-3.09-14.el6_1.x86_64
facter-1.5.9-1.el6.noarch
js-1.70-12.el6_0.x86_64
mongodb-1.8.2-2.el6.x86_64
mongodb-server-1.8.2-2.el6.x86_64
puppet-2.6.11-1.el6_1.noarch
pymongo-1.9-8.el6_1.x86_64
tomcat6-6.0.24-35.el6_1.noarch
ruby-1.8.7.352-5.el6_2.x86_64
grinder-0.0.136-1.el6.noarch
postgresql-server-8.4.9-1.el6_1.1.x86_64
postgresql-8.4.9-1.el6_1.1.x86_64
candlepin-0.5.16-1.el6.noarch
pulp-0.0.263-1.el6.noarch
katello-0.1.211-2.el6.noarch
katello-all-0.1.211-2.el6.noarch
katello-cli-0.1.44-2.el6.noarch
katello-configure-0.1.55-2.el6.noarch



How reproducible:

always

Steps to Reproduce:
1. create content, custom and Red Hat providers
2. sync content
3. generate system template
4. promote
5. download system template from new "dev" environment
  
Actual results:

get: 

Pulp::Distribution: 404 Resource Not Found "No distribution ks-Red%20Hat%20Enterprise%20Linux-Server-6.2-x86_64" (GET /pulp/api/distributions/ks-Red%2520Hat%2520Enterprise%2520Linux-Server-6.2-x86_64/): "No distribution ks-Red%20Hat%20Enterprise%20Linux-Server-6.2-x86_64"



Expected results:

to be able to download the system template.

Additional info:

# curl -H "Content-Type: application/json" -H "Accept: application/json" -# -k -u admin:admin https://cf-se2/pulp/api/distributions/
[{"files": ["/var/lib/pulp/distributions/ks-Red Hat Enterprise Linux-Server-6.2-x86_64/boot.iso", "/var/lib/pulp/distributions/ks-Red Hat Enterprise Linux-Server-6.2-x86_64/install.img", "/var/lib/pulp/distributions/ks-Red Hat Enterprise Linux-Server-6.2-x86_64/efidisk.img", "/var/lib/pulp/distributions/ks-Red Hat Enterprise Linux-Server-6.2-x86_64/treeinfo", "/var/lib/pulp/distributions/ks-Red Hat Enterprise Linux-Server-6.2-x86_64/initrd.img", "/var/lib/pulp/distributions/ks-Red Hat Enterprise Linux-Server-6.2-x86_64/efiboot.img", "/var/lib/pulp/distributions/ks-Red Hat Enterprise Linux-Server-6.2-x86_64/vmlinuz"], "description": "ks-Red Hat Enterprise Linux-Server-6.2-x86_64", "family": "Red Hat Enterprise Linux", "url": ["http://cf-se2.cloud.lab.eng.bos.redhat.com/pulp/ks/refarch/Library/content/dist/rhel/server/6/6Server/x86_64/os/", "http://cf-se2.cloud.lab.eng.bos.redhat.com/pulp/ks/refarch/dev/content/dist/rhel/server/6/6Server/x86_64/os/", "http://cf-se2.cloud.lab.eng.bos.redhat.com/pulp/ks/refarch/test/content/dist/rhel/server/6/6Server/x86_64/os/"], "relativepath": "/var/lib/pulp/distributions/ks-Red Hat Enterprise Linux-Server-6.2-x86_64", "variant": "Server", "version": "6.2", "timestamp": "2011-11-17T11:08:34", "_ns": "distribution", "_id": "ks-Red Hat Enterprise Linux-Server-6.2-x86_64", "arch": "x86_64", "id": "ks-Red Hat Enterprise Linux-Server-6.2-x86_64", "repoids": ["refarch-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server", "refarch-dev-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server", "refarch-test-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server"]}]

Comment 1 Brad Buckingham 2012-02-06 16:16:24 UTC
This looks like a regression due to recent changes to encode all pulp urls... Previously, we did encode the distro name in urls, since it required it.

Comment 2 Brad Buckingham 2012-02-06 16:27:59 UTC
commit - 791dbabc4681ae498ffa719ef1fa16043d24b3e1

A recent commit (930851c800d7b9d63ac960f655e38f1ff912c419) was introduced to uri encode all resources to pulp/cp.  Unfortunately, we were already encoding the distro name for pulp requests.  As a result, this double encoding caused the behavior observed.

Comment 3 Corey Welton 2012-02-21 03:26:34 UTC
QA Verified templates can be downloaded now.

Comment 5 Mike McCune 2013-08-16 18:10:38 UTC
getting rid of 6.0.0 version since that doesn't exist