Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1021314

Summary: Syncing repository with distribution to a node places distribution in the wrong directory
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: Content ManagementAssignee: Mike McCune <mmccune>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.0.2CC: cwelton, jsherril, mhrivnak
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: 1020549 Environment:
Last Closed: 2014-09-11 12:23:56 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: 1020549    
Bug Blocks:    

Description Mike McCune 2013-10-21 03:40:39 UTC
+++ This bug was initially created as a clone of Bug #1020549 +++

Description of problem:

When you sync a repo down to a pulp node that has a distribution, it appears to put the distribution files in the wrong directory.

Here is the layout on the pulp server:


[root@qe-blade-09 ~]# tree /var/lib/pulp/content/distribution/ks-Red\ Hat\ Enterprise\ Linux-Server-6.4-x86_64/
/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/
├── images
│   ├── boot.iso
│   ├── efiboot.img
│   ├── efidisk.img
│   ├── install.img
│   ├── product.img
│   └── pxeboot
│       ├── initrd.img
│       └── vmlinuz
└── treeinfo



And here it is on the pulp node:

[root@cloud-qe-2 ks-Red Hat Satellite-Tools-6.0.2-x86_64]# tree /var/lib/pulp/content/distribution/ks-Red\ Hat\ Enterprise\ Linux-Server-6.4-x86_64/
/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/
└── ks-Red Hat Enterprise Linux-Server-6.4-x86_64
    ├── images
    │   ├── boot.iso
    │   ├── efiboot.img
    │   ├── efidisk.img
    │   ├── install.img
    │   ├── product.img
    │   └── pxeboot
    │       ├── initrd.img
    │       └── vmlinuz
    └── treeinfo


As you will notice, the node puts all the files within an additional subdirectory 
/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/ks-Red Hat Enterprise Linux-Server-6.4-x86_64


While this syncs fine, it causes the repository publish to fail on the node:


2013-10-17 16:22:26,549 pulp.server.managers.repo.publish:INFO: publish failed for repo [Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server] with distributor ID [Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server]


Here's the output from the task:



{ "_id" : ObjectId("52604702e6fc26788400494e"), "exception" : null, "repo_id" : "Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server", "traceback" : null, "started" : "2013-10-17T16:20:40-04:00", "_ns" : "repo_publish_results", "completed" : "2013-10-17T16:22:26-04:00", "error_message" : null, "distributor_type_id" : "yum_distributor", "distributor_id" : "Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server", "summary" : { "num_package_units_errors" : 0, "https_publish_dir" : "/var/lib/pulp/published/https/repos/Katello_Infrastructure/Dev_Env/rhel6_published/content/dist/rhel/server/6/6Server/x86_64/os", "num_package_categories_published" : 0, "num_distribution_units_errors" : 7, "skip_metadata_update" : false, "num_distribution_units_published" : -6, "num_package_groups_published" : 202, "num_package_units_attempted" : 11029, "num_package_units_published" : 11029, "num_distribution_units_attempted" : 1, "relative_path" : "Katello_Infrastructure/Dev_Env/rhel6_published/content/dist/rhel/server/6/6Server/x86_64/os" }, "result" : "failed", "id" : "52604702e6fc26788400494e", "details" : { "errors" : [ 	[ 	"/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/efiboot.img", 	"/var/lib/pulp/working/repos/Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server/distributors/yum_distributor/images/efiboot.img", 	"Source path: /var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/efiboot.img is missing" ], 	[ 	"/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/pxeboot/vmlinuz", 	"/var/lib/pulp/working/repos/Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server/distributors/yum_distributor/images/pxeboot/vmlinuz", 	"Source path: /var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/pxeboot/vmlinuz is missing" ], 	[ 	"/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/efidisk.img", 	"/var/lib/pulp/working/repos/Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server/distributors/yum_distributor/images/efidisk.img", 	"Source path: /var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/efidisk.img is missing" ], 	[ 	"/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/product.img", 	"/var/lib/pulp/working/repos/Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server/distributors/yum_distributor/images/product.img", 	"Source path: /var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/product.img is missing" ], 	[ 	"/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/install.img", 	"/var/lib/pulp/working/repos/Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server/distributors/yum_distributor/images/install.img", 	"Source path: /var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/install.img is missing" ], 	[ 	"/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/pxeboot/initrd.img", 	"/var/lib/pulp/working/repos/Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server/distributors/yum_distributor/images/pxeboot/initrd.img", 	"Source path: /var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/pxeboot/initrd.img is missing" ], 	[ 	"/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/boot.iso", 	"/var/lib/pulp/working/repos/Katello_Infrastructure-Dev_Env-rhel6_published-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server/distributors/yum_distributor/images/boot.iso", 	"Source path: /var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux-Server-6.4-x86_64/images/boot.iso is missing" ] ], "time_metadata_sec" : 102.79039597511292 } }



Version-Release number of selected component (if applicable):
pulp-server-2.3.0-0.22.beta.el6sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Sync a repository to a pulp server that contains a distribution
2. Setup a pulp node pointing to that pulp server
3. Bind the pulp node to the repo synced in 1
4. Attempt to 'sync' the node

Actual results:
repo is synced, distribution is not in the same directory as it is on the master pulp server, repo publish fails

Expected results:
Repo publish runs successfully

Comment 1 Mike McCune 2013-10-21 03:41:29 UTC
Justin,

Just giving this to you to track

Comment 2 Mike McCune 2013-10-21 03:41:55 UTC
ignore previous comment.  this is a clone to track the upstream pulp bug

Comment 5 Mike McCune 2013-10-23 23:38:18 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1020549#c3

 Jeff Ortel 2013-10-23 19:27:12 EDT

build: 2.3.0-0.24.beta

Comment 8 Corey Welton 2014-08-13 21:13:16 UTC
This is essentially verified in Satellite-6.0.4-RHEL-6-20140806.0, but capsule sync is broken out of the box. With appropriate fixes, sync works and I can get the proper tree format.  However, I will not mark this verified until snap arrives that fixes bug #1129835

Comment 9 Corey Welton 2014-08-28 00:34:12 UTC
Verified in Satellite-6.0.4-RHEL-6-20140823.0

Comment 10 Bryan Kearney 2014-09-11 12:23:56 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.