Bug 1020549 - Syncing repository with distribution to a node places distribution in the wrong directory
Summary: Syncing repository with distribution to a node places distribution in the wro...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: nodes
Version: Master
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: 2.3.0
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
: 1021568 (view as bug list)
Depends On:
Blocks: 1021314
TreeView+ depends on / blocked
 
Reported: 2013-10-17 21:47 UTC by Justin Sherrill
Modified: 2013-12-09 14:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1021314 (view as bug list)
Environment:
Last Closed: 2013-12-09 14:31:57 UTC
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2013-10-17 21:47:44 UTC
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 Justin Sherrill 2013-10-21 15:34:32 UTC
*** Bug 1021568 has been marked as a duplicate of this bug. ***

Comment 2 Jeff Ortel 2013-10-22 15:55:57 UTC
https://github.com/pulp/pulp/pull/669

Comment 3 Jeff Ortel 2013-10-23 23:27:12 UTC
build: 2.3.0-0.24.beta

Comment 4 Preethi Thomas 2013-10-30 15:25:59 UTC
On the pulp-server
[root@dell-pe2900-01 ~]# rpm -qa pulp-server
pulp-server-2.3.0-0.26.beta.el6.noarch
[root@dell-pe2900-01 ~]# rpm -qa pulp-nodes-parent
pulp-nodes-parent-2.3.0-0.26.beta.el6.noarch
[root@dell-pe2900-01 ~]# 

[root@dell-pe2900-01 ~]#  tree /var/lib/pulp/content/distribution/ks-Red\ Hat\ Enterprise\ Linux\ Server-5.9-x86_64/
/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux Server-5.9-x86_64/
|-- images
|   |-- boot.iso
|   |-- diskboot.img
|   |-- minstg2.img
|   |-- pxeboot
|   |   |-- initrd.img
|   |   `-- vmlinuz
|   |-- stage2.img
|   `-- xen
|       |-- initrd.img
|       `-- vmlinuz
|-- Server
|   `-- repodata
|       |-- 101ecad62a146f3ab4e06ca16104cdb90b225a48-filelists.xml.gz
|       |-- 289101a61191454ff75fe12046e26e85b0e2f482-filelists.sqlite.bz2
|       |-- 329cf55bc21b6c16fcc54fbcb0edd91bcf27d3bd-updateinfo.xml.gz
|       |-- 4ec225f636e39c137f8330c4ac2618f0020e85d6-other.xml.gz
|       |-- 53939e47b5c6e5e960f18fc7c209d60ce37ccc01-other.sqlite.bz2
|       |-- 61c1abdd05c1bf5abfb346f7d0b55abb8a519817-comps-rhel5-server-core.xml.gz
|       |-- 8700492668c730742984ec61666e4f3499c07713-comps-rhel5-server-core.xml
|       |-- 908500781155e417f50c845157ee922d22008961-primary.sqlite.bz2
|       |-- d984304da8889ba9e906d8a0455418f4b7edc206-primary.xml.gz
|       |-- productid.gz
|       `-- repomd.xml
`-- treeinfo

5 directories, 20 files
[root@dell-pe2900-01 ~]# 


on the node-child
[root@hp-dl120g5-01 ~]# rpm -qa pulp-nodes-child
pulp-nodes-child-2.3.0-0.26.beta.el6.noarch
[root@hp-dl120g5-01 ~]# 


[root@hp-dl120g5-01 ~]# tree /var/lib/pulp/content/distribution/ks-Red\ Hat\ Enterprise\ Linux\ Server-5.9-x86_64/
/var/lib/pulp/content/distribution/ks-Red Hat Enterprise Linux Server-5.9-x86_64/
|-- images
|   |-- boot.iso
|   |-- diskboot.img
|   |-- minstg2.img
|   |-- pxeboot
|   |   |-- initrd.img
|   |   `-- vmlinuz
|   |-- stage2.img
|   `-- xen
|       |-- initrd.img
|       `-- vmlinuz
|-- Server
|   `-- repodata
|       |-- 101ecad62a146f3ab4e06ca16104cdb90b225a48-filelists.xml.gz
|       |-- 289101a61191454ff75fe12046e26e85b0e2f482-filelists.sqlite.bz2
|       |-- 329cf55bc21b6c16fcc54fbcb0edd91bcf27d3bd-updateinfo.xml.gz
|       |-- 4ec225f636e39c137f8330c4ac2618f0020e85d6-other.xml.gz
|       |-- 53939e47b5c6e5e960f18fc7c209d60ce37ccc01-other.sqlite.bz2
|       |-- 61c1abdd05c1bf5abfb346f7d0b55abb8a519817-comps-rhel5-server-core.xml.gz
|       |-- 8700492668c730742984ec61666e4f3499c07713-comps-rhel5-server-core.xml
|       |-- 908500781155e417f50c845157ee922d22008961-primary.sqlite.bz2
|       |-- d984304da8889ba9e906d8a0455418f4b7edc206-primary.xml.gz
|       |-- productid.gz
|       `-- repomd.xml
`-- treeinfo

5 directories, 20 files
[root@hp-dl120g5-01 ~]# 


publish task on the child node

[root@hp-dl120g5-01 ~]# pulp-admin tasks list
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  auto_publish, publish
Resources:   rhel59-os (repository)
State:       Successful
Start Time:  2013-10-30T15:10:45Z
Finish Time: 2013-10-30T15:17:54Z
Result:      N/A
Task Id:     93ff76e6-1617-4d9f-a901-aac787e8ac7d


[root@hp-dl120g5-01 ~]#

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


Note You need to log in before you can comment on or make changes to this bug.