Bug 1502101

Summary: metadata not generated for emtpty repositories during promote - capsule sync fails with RPM1004
Product: Red Hat Satellite Reporter: daniel <dmoessne>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.12CC: bbuckingham
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-20 14:19:45 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:

Description daniel 2017-10-14 08:36:49 UTC
Description of problem:
When creating a new product and adding a new yum repo but not adding any content to it sync to capsule fails with 

Error: RPM1004: Error retrieving metadata: NOT FOUND

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

[root@inf3 ~]# rpm -qa satellite
satellite-6.2.12-5.0.el7sat.noarch
[root@inf3 ~]# rpm -qa foreman
foreman-1.11.0.85-1.el7sat.noarch
[root@inf3 ~]# 

[root@inf3 ~]# rpm -qa pulp*
pulp-katello-1.0.2-1.el7sat.noarch
pulp-docker-plugins-2.0.3.1-1.el7sat.noarch
pulp-puppet-tools-2.8.7.1-1.el7sat.noarch
pulp-puppet-plugins-2.8.7.1-1.el7sat.noarch
pulp-client-1.0-1.noarch
pulp-rpm-plugins-2.8.7.16-1.el7sat.noarch
pulp-selinux-2.8.7.15-1.el7sat.noarch
pulp-server-2.8.7.15-1.el7sat.noarch
[root@inf3 ~]# 

-- should be latest 6.2.12

How reproducible:


Steps to Reproduce:
1. create a new product, add new yum repository but don't add content
2. publish content view and promote content view to LCE 
3. add new LCE to capsule
4. sync capsule via hammer

Actual results:
# hammer capsule content synchronize --id 6 --organization-id 12
[.........................................................................................................................................................................................................] [100%]
Error: RPM1004: Error retrieving metadata: NOT FOUND

Expected results:
sync shall complete without error even if repository is empty 

Additional info:
Played around with fore metadata creation during publish and promote:
- when forcing metadata creation during publish only --> not sufficent, capsule sync fails
- when forcing metadata creation during promote only --> repo can be synced --> capsule sync works

Comment 3 Brad Buckingham 2017-10-20 14:19:45 UTC

*** This bug has been marked as a duplicate of bug 1491646 ***