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 1769893

Summary: Full Capsule sync doesn't fix the broken repository metadata and results in ERROR: "undefined method `[]' for nil:NilClass"
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: Capsule - ContentAssignee: Samir Jha <sajha>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.5.0CC: bkearney, fperalta, gtaylor, jsherril, mmccune, mschibli, pcreech, sadas, sajha, spetrosi, vsedmik, zhunting
Target Milestone: 6.6.1Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-katello-3.12.0.28-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1745835 Environment:
Last Closed: 2019-12-04 21:12:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 7 Lukas Pramuk 2019-11-26 17:36:35 UTC
VERIFIED.

@satellite-6.6.1-1.el7sat.noarch
tfm-rubygem-katello-3.12.0.29-1.el7sat.noarch

by the following manual reproducer:

1) Create a CV and assign a repo to it
2) Publish and promote CV to a LFE
3) Assign a LFE to external capsule
4) Trigger Full Capsule sync

 Label: Actions::Katello::CapsuleContent::Sync
Status: stopped
Result: success 

_____/Run\__________
 3: Actions::Pulp::Repository::RefreshNeeded (success) [ 0.11s / 0.11s ]
 6: Actions::Pulp::Consumer::SyncCapsule (success) [ 15.70s / 0.56s ]
10: Actions::Pulp::Repository::DistributorPublish (success) [ 1.94s / 0.16s ]

>>> the action Actions::Pulp::Repository::DistributorPublish succeeded 

5) Check where Actions::Pulp::Repository::DistributorPublish was run

10: Actions::Pulp::Repository::DistributorPublish (success) [ 1.94s / 0.16s ]

Started at: 2019-11-26 17:06:42 UTC
Ended at: 2019-11-26 17:06:44 UTC
Real time: 1.94s
Execution time (excluding suspended state): 0.16s

Input:
---
smart_proxy_id: 2
options:
  force: true
  source_repository:
    id: 8
    name: Red_Hat_Ansible_Engine_2_8_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64
    url: https://satellite.example.com/pulp/repos/Default_Organization/content_views/Test_View/1.0/content/dist/rhel/server/7/7Server/x86_64/ansible/2.8/os/
  matching_content: 
  dependency: 
  repository_creation: false
dependency: 
repository_id: 16
remote_user: admin
remote_cp_user: admin
current_request_id: 
current_timezone: Europe/Prague
current_user_id: 4
current_organization_id: 
current_location_id: 

Output:
---
pulp_tasks:
- exception: 
  task_type: pulp.server.managers.repo.publish.publish
  _href: "/pulp/api/v2/tasks/45981997-54e0-49bd-b533-9374e6b10688/"
  task_id: 45981997-54e0-49bd-b533-9374e6b10688
  tags:
  - pulp:repository:1-Test_View-Dev-e363c247-bf1f-463e-8a03-84871753b082
  - pulp:action:publish
  finish_time: '2019-11-26T17:06:44Z'
  _ns: task_status
  start_time: '2019-11-26T17:06:43Z'
  traceback: 
  spawned_tasks: []
  progress_report:
  ...

  queue: reserved_resource_worker-2.com.dq2
  state: finished
  worker_name: reserved_resource_worker-2.com
  result:
    result: success
  ...

>>> both queue: and worker_name: indicates that DistributorPublish is being performed on the capsule

Comment 9 errata-xmlrpc 2019-12-04 21:12:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:4103