Bug 1959393 - pulp3: On_demand capsule sync (pulp3 to pulp2) for repos with empty groups fails
Summary: pulp3: On_demand capsule sync (pulp3 to pulp2) for repos with empty groups fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.10.0
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-11 12:58 UTC by Tanya Tereshchenko
Modified: 2021-11-16 14:11 UTC (History)
5 users (show)

Fixed In Version: pulp-rpm-3.14.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1989503 (view as bug list)
Environment:
Last Closed: 2021-11-16 14:10:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 9193 0 Normal CLOSED - CURRENTRELEASE Backport #8713 "Pulp 3 to Pulp 2 sync fails if comps.xml has a group with an empty packagelist" to 3.14.z 2021-08-11 19:06:31 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:11:11 UTC

Description Tanya Tereshchenko 2021-05-11 12:58:26 UTC
Description of the problem:

 'NoneType' object has no attribute 'findall'
 Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 321, in run
     group.GROUP_TAG)
   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 950, in get_comps_file_units
     self.save_fileless_units(group_file_handle, tag, process_func, mutable_type=True)
   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 1006, in save_fileless_units
     for model in package_info_generator:
   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/packages.py", line 64, in package_list_generator
     package_info = process_func(element)
   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/group.py", line 32, in process_group_element
     packagelist.findall('packagereq'))
 AttributeError: 'NoneType' object has no attribute 'findall'
INFO: [ac1cd020] Task failed : [ac1cd020-c06c-4d53-ac08-1adbab8c41b1]
 Task pulp.server.managers.repo.sync.sync[ac1cd020-c06c-4d53-ac08-1adbab8c41b1] raised unexpected: PulpExecutionException('Importer indicated a failed response',)
 Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 367, in trace_task
     R = retval = fun(*args, **kwargs) 
   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 688, in __call__
     return super(Task, self).__call__(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 110, in __call__
     return super(PulpTask, self).__call__(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 622, in __protected_call__
     return self.run(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 860, in sync
     raise pulp_exceptions.PulpExecutionException(_('Importer indicated a failed response'))
 PulpExecutionException: Importer indicated a failed response


To reproduce:
 - Migrate a repo with empty groups, e.g. as of today, this one has one https://cdn.redhat.com/content/dist/rhel8/8.3/x86_64/appstream/kickstart/
 - Try to sync that repo from main Satellite (Pulp 3) to a Capsule (pulp2)

Comment 1 pulp-infra@redhat.com 2021-05-11 13:19:13 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 2 pulp-infra@redhat.com 2021-05-11 13:19:15 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2021-07-26 18:09:25 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2021-07-27 19:06:47 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 7 pulp-infra@redhat.com 2021-07-28 12:12:53 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 8 pulp-infra@redhat.com 2021-07-28 13:19:25 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 9 pulp-infra@redhat.com 2021-08-03 11:06:15 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 10 pulp-infra@redhat.com 2021-08-03 11:06:17 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 12 pulp-infra@redhat.com 2021-08-11 18:09:05 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 13 pulp-infra@redhat.com 2021-08-11 19:06:32 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 14 Lai 2021-08-25 17:48:17 UTC
Step to test

1. Get a 6.9 satellite
2. Get a capsule and register it to the satellite
3. Sync the https://cdn.redhat.com/content/dist/rhel8/8.3/x86_64/appstream/kickstart/ repo but do not publish in a cv
4. Add the library environment to the capsule
5. upgrade satellite to 6.10
6. Publish a cv with the repo from step 3
7. Check the task page for the triggering of the capsule sync

Expected:
Capsule sync should be successful

Actual
Capsule sync is successfull

Additional note:
You can check that capsule is still on pulp2 by going to Infrastructure -> capsule -> <capsule name> and there will be an indicator saying that the capsule versions do not match with satellite.
For the verification of the capsule sync, you can check dynflow:  Actions::Pulp::Consumer::SyncCapsule.  It does show success.  Another way to check is the folder for packages /var/lib/pulp/published/yum/https/repos/Default_Organization/Library/<name>/content/dist/rhel8/8.3/x86_64/baseos/kickstart/Packages that was synced on capsule.

Verified on 6.10 snap 14

Comment 15 Lai 2021-08-25 18:13:29 UTC
Forgot to mention but ensure the repo is on_demand sync.

Comment 18 errata-xmlrpc 2021-11-16 14:10:56 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 (Moderate: Satellite 6.10 Release), 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/RHSA-2021:4702


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