Bug 1033776 - Never synced custom repositories fail to publish
Summary: Never synced custom repositories fail to publish
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: 2.3
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: 2.3.0
Assignee: Barnaby Court
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 1033777
TreeView+ depends on / blocked
 
Reported: 2013-11-22 20:49 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:
: 1033777 (view as bug list)
Environment:
Last Closed: 2013-12-09 14:31:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2013-11-22 20:49:40 UTC
Description of problem:

Custom repositories do not seem to publish properly, and thus the content is not available to clients.


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

How reproducible:
Always

Steps to Reproduce:
1.   Create a new custom repo
2.   Upload a package to it from the cli
3.   Assign a system to the custom product and try to install the pushed rpm

Actual results:
From client repository shows that it contains no packages, system cannot install package.

Expected results:
Client sees package, can install it.

Additional info:
Error seen in /var/log/pulp/pulp.log:

2013-11-22 15:37:39,303 pulp.plugins.pulp_rpm.yum_plugin.metadata:ERROR: Error performing final move, could be missing pkg metadata files


This is actually masking another error, and after some debugging:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp_rpm/yum_plugin/metadata.py", line 851, in final_repodata_move
    mdgen.doRepoMetadata()
  File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 955, in doRepoMetadata
    data = misc.Checksums([sumtype])
  File "/usr/lib/python2.6/site-packages/yum/misc.py", line 245, in __init__
    raise MiscError, 'Error Checksumming, bad checksum type %s' % sumtype
MiscError: Error Checksumming, bad checksum type None

Comment 1 Justin Sherrill 2013-11-22 20:59:06 UTC
I did confirm that if the repo is ever synced with an external repo the issue does not occur.

Comment 2 Barnaby Court 2013-11-22 21:28:56 UTC
PR: https://github.com/pulp/pulp_rpm/pull/396

Comment 3 Jeff Ortel 2013-11-23 00:15:08 UTC
build: 2.3.1-0.1.beta

Comment 4 Preethi Thomas 2013-11-26 15:23:35 UTC
verified
[root@pulp-v2-server ~]# rpm -qa pulp-server
pulp-server-2.3.1-0.3.beta.el6.noarch
[root@pulp-v2-server ~]# 

[root@pulp-v2-server ~]# pulp-admin rpm repo create --repo-id preethi
Successfully created repository [preethi]

[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# pulp-admin rpm repo uploads rpm --repo-id preethi -d upload/ -v
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: pulp-test-package-0.2.1-1.fc11.x86_64.rpm
... completed

Files to be uploaded:
  pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm
  pulp-test-package-0.3.1-1.fc11.x86_64.rpm
  pulp-test-package-0.2.1-1.fc11.x86_64.rpm

Creating upload requests on the server...
[==================================================] 100%
Initializing: pulp-test-package-0.2.1-1.fc11.x86_64.rpm
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
cancelled entirely using the cancel command.

Uploading: pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm
[==================================================] 100%
2359/2359 bytes
... completed

Importing into the repository...
... completed

Deleting the upload request...
... completed

Uploading: pulp-test-package-0.3.1-1.fc11.x86_64.rpm
[==================================================] 100%
2216/2216 bytes
... completed

Importing into the repository...
... completed

Deleting the upload request...
... completed

Uploading: pulp-test-package-0.2.1-1.fc11.x86_64.rpm
[==================================================] 100%
2216/2216 bytes
... completed

Importing into the repository...
... completed

Deleting the upload request...
... completed

[root@pulp-v2-server ~]# pulp-admin rpm repo publish run --repo-id preethi+----------------------------------------------------------------------+
                    Publishing Repository [preethi]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Publishing packages...
[==================================================] 100%
Packages: 3/3 items
... completed

Publishing distributions...
[==================================================] 100%
Distributions: 0/0 items
... completed

Generating metadata
[\]
... completed

Publishing repository over HTTPS
[-]
... completed


[root@pulp-v2-server ~]# pulp-admin node repo enable --repo-id preethi
Repository enabled.

Note: Repository [ preethi ] will not be available for node synchronization
until published.  See: the 'node repo publish' command.

Warning: enabling with auto-publish may degrade repository synchronization
performance.

[root@pulp-v2-server ~]# pulp-admin node repo publish --repo-id preethi
This command may be exited via ctrl+c without affecting the request.

[-]
Waiting to begin...

[-]
Running...

Publish succeeded.



[root@pulp-v2-server ~]# pulp-admin node bind --repo-id preethi --node-id node1
Node bind succeeded.

Note: Repository [ preethi ] will be included in node synchronization.

[root@pulp-v2-server ~]# pulp-admin node  sync run  --node-id node1This command may be exited via ctrl+c without affecting the request.

[-]
Waiting to begin...



(1/2) Repository: preethi
[==================================================] 100%


(2/2) Repository: zoo
[==================================================] 100%




Synchronization succeeded

+----------------------------------------------------------------------+
                       Child Node Synchronization
+----------------------------------------------------------------------+

Repository: 
  Action: Added
  Id:     preethi
  Units:  
    Added:   2
    Removed: 0
    Updated: 1

Repository: 
  Action: Merged
  Id:     zoo
  Units:  
    Added:   0
    Removed: 0
    Updated: 0



[root@pulp-v2-server ~]# 


[root@pulp-v2-server ~]# pulp-admin node list
+----------------------------------------------------------------------+
                              Child Nodes
+----------------------------------------------------------------------+

Id:               node1
Display Name:     node1
Description:      None
Bindings:         
  Additive: preethi, zoo
Update Strategy:  additive
Notes:            



[root@pulp-v2-node ~]# pulp-consumer status
This consumer is registered to the server [pulp-v2-server.usersys.redhat.com]
with the ID [node1].


[root@pulp-v2-client ~]# pulp-consumer status
This consumer is registered to the server [pulp-v2-node.usersys.redhat.com] with
the ID [test].

[root@pulp-v2-client ~]# pulp-consumer rpm  repos
+----------------------------------------------------------------------+
                              Repositories
+----------------------------------------------------------------------+

Id:                  zoo
Display Name:        zoo
Description:         None
Content Unit Counts: 
  Erratum:          4
  Package Category: 1
  Package Group:    2
  Rpm:              32
Notes:               

Id:                  preethi
Display Name:        preethi
Description:         None
Content Unit Counts: 
  Rpm: 3
Notes:               


[root@pulp-v2-client ~]# pulp-consumer rpm bind --repo-id preethi
Bind tasks successfully created:

Task Id: 25109ee5-34fb-45df-8fcc-e5b827a5a716

Task Id: 9cbd60e5-5680-4a4f-93fc-ea4f6c8332af


[root@pulp-v2-client ~]# 


[root@pulp-v2-node ~]# pulp-admin -u admin -p admin rpm consumer package install run -n pulp-dot-2.0-test --consumer-id test
This command may be exited via ctrl+c without affecting the request.

[-]
Waiting to begin...
Refresh Repository Metadata             [ OK ]
Downloading Packages                    [ OK ]
Check Package Signatures                [ OK ]
Running Test Transaction                [ OK ]
Running Transaction                     [ OK ]

Install Succeeded

+----------------------------------------------------------------------+
                               Installed
+----------------------------------------------------------------------+

Name:    pulp-dot-2.0-test
Version: 0.1.2
Arch:    x86_64
Repoid:  preethi



[root@pulp-v2-node ~]# 


From a feeded repo

[root@pulp-v2-node ~]# pulp-admin -u admin -p admin rpm consumer package install run -n fox --consumer-id test
This command may be exited via ctrl+c without affecting the request.

[-]
Waiting to begin...
Refresh Repository Metadata             [ OK ]
Downloading Packages                    [ OK ]
Check Package Signatures                [ OK ]
Running Test Transaction                [ OK ]
Running Transaction                     [ OK ]

Install Succeeded

+----------------------------------------------------------------------+
                               Installed
+----------------------------------------------------------------------+

Name:    fox
Version: 1.1
Arch:    noarch
Repoid:  zoo



[root@pulp-v2-node ~]# 


Using yum

[root@pulp-v2-client ~]# yum install pulp-test
Loaded plugins: pulp-profile-update, security
Setting up Install Process
No package pulp-test available.
Error: Nothing to do
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# yum install pulp-test-package
Loaded plugins: pulp-profile-update, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pulp-test-package.x86_64 0:0.3.1-1.fc11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                 Arch         Version               Repository     Size
================================================================================
Installing:
 pulp-test-package       x86_64       0.3.1-1.fc11          preethi       2.2 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 2.2 k
Installed size: 5  
Is this ok [y/N]: y
Downloading Packages:
pulp-test-package-0.3.1-1.fc11.x86_64.rpm                | 2.2 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : pulp-test-package-0.3.1-1.fc11.x86_64                        1/1 
pulp: profile sent, status=201
  Verifying  : pulp-test-package-0.3.1-1.fc11.x86_64                        1/1 

Installed:
  pulp-test-package.x86_64 0:0.3.1-1.fc11                                       

Complete!
[root@pulp-v2-client ~]#

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


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