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 2033951 - [Pulp3] The pulp2-3 migration fails to migrate Alma Linux BaseOS repo with error Katello::Errors::Pulp3Error: No declared artifact with relative path "images/boot.iso"
Summary: [Pulp3] The pulp2-3 migration fails to migrate Alma Linux BaseOS repo with er...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.9.7
Hardware: x86_64
OS: All
high
high
Target Milestone: 6.9.9
Assignee: satellite6-bugs
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-19 08:01 UTC by Sayan Das
Modified: 2023-09-15 01:50 UTC (History)
11 users (show)

Fixed In Version: pulp_rpm-3.11.3,pulp-2to3-migration-0.11.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-20 20:34:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pulp pulp-2to3-migration issues 489 0 None closed [0.11] Alma Linux 8 or CentOS 8 repos migration can fail with: No declared artifact with relative path "images/boot.iso"... 2022-05-17 11:42:12 UTC
Github pulp pulp-2to3-migration pull 482 0 None Merged Use RpmQueryExistingContents stage to handle distribution tree migration properly 2022-03-08 19:36:59 UTC
Github pulp pulp_rpm issues 2305 0 None closed Distribution tree uniqueness constraint is not enough for a suboptimal .treeinfo 2022-05-17 11:39:23 UTC
Github pulp pulp_rpm pull 2324 0 None Merged [3.11.z fix] DistributionTree workaround 2022-03-08 19:36:59 UTC
Red Hat Product Errata RHSA-2022:1478 0 None None None 2022-04-20 20:35:01 UTC

Description Sayan Das 2021-12-19 08:01:30 UTC
Description of problem:

If Alma Linux Base OS repo is one of the custom repos, then the "satellite-maintain content prepare" step will fail to complete the pulp2-pulp3 migration.


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

Satellite 6.9 and 6.10

How reproducible:

Always

Steps to Reproduce:
1. Install Satellite 6.9

2. Have four almalinux repos created with the following URLs and then sync them.

# hammer repository list --product AlmaLinux --organization-id 1
---|-------------------------|-----------|--------------|-------------------------------------------------------------
ID | NAME                    | PRODUCT   | CONTENT TYPE | URL                                                         
---|-------------------------|-----------|--------------|-------------------------------------------------------------
1  | Alma Linux 8 AppStream  | AlmaLinux | yum          | https://repo.almalinux.org/almalinux/8/AppStream/x86_64/os/ 
2  | Alma Linux 8 Extras     | AlmaLinux | yum          | https://repo.almalinux.org/almalinux/8/extras/x86_64/os/    
3  | Alma Linux 8 OS         | AlmaLinux | yum          | https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/    
4  | Alma Linux 8 PowerTools | AlmaLinux | yum          | https://repo.almalinux.org/almalinux/8/PowerTools/x86_64/os/
---|-------------------------|-----------|--------------|-------------------------------------------------------------


# echo "select name,url,download_policy,content_type,verify_ssl_on_sync from katello_root_repositories where name ilike '%Alma%';" | su - postgres -c "psql foreman"
          name           |                             url                              | download_policy | content_type | verify_ssl_on_sync 
-------------------------+--------------------------------------------------------------+-----------------+--------------+--------------------
 Alma Linux 8 AppStream  | https://repo.almalinux.org/almalinux/8/AppStream/x86_64/os/  | immediate       | yum          | t
 Alma Linux 8 Extras     | https://repo.almalinux.org/almalinux/8/extras/x86_64/os/     | immediate       | yum          | t
 Alma Linux 8 OS         | https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/     | immediate       | yum          | t
 Alma Linux 8 PowerTools | https://repo.almalinux.org/almalinux/8/PowerTools/x86_64/os/ | immediate       | yum          | t
(4 rows)

3. Once the sync completes, Add them to a CV and publish the CV

4. Try content migration i.e.

# satellite-maintain prep-6.10-upgrade

# satellite-maintain content prepare


Actual results:


* The "content prepare" step will fail.

2021-12-18 22:49:08 +0530: Migrating rpm content to Pulp 3 17755/17839
2021-12-18 22:49:18 +0530: Migrating distribution content to Pulp 3 0/5
2021-12-18 22:49:28 +0530: Migrating distribution content to Pulp 3 0/5
2021-12-18 22:49:38 +0530: Migrating distribution content to Pulp 3 3/5
2021-12-18 22:49:48 +0530: Migrating erratum content to Pulp 3 0/3868
2021-12-18 22:49:58 +0530: Migrating erratum content to Pulp 3 0/3868
2021-12-18 22:50:08 +0530: Migrating modulemd content to Pulp 3 0/108Migration failed, You will want to investigate: https://satellite.example.com/foreman_tasks/tasks/afa88284-f2e6-409c-898c-96a7021fc35a
rake aborted!
ForemanTasks::TaskError: Task afa88284-f2e6-409c-898c-96a7021fc35a: Katello::Errors::Pulp3Error: No declared artifact with relative path "images/boot.iso" for content "<DistributionTree: pk=c21cf106-dc3b-4615-8541-229726d4a06d>"
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.46/lib/katello/tasks/pulp3_migration.rake:43:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:pulp3_migration
(See full trace by running task with --trace)
                                                                      [FAIL]
Failed executing preserve_output=true foreman-rake katello:pulp3_migration, exit status 1
--------------------------------------------------------------------------------
Scenario [Prepare content for Pulp 3] failed.

The following steps ended up in failing state:

  [content-prepare]


* Investigation shows the DistributionTree primary key is pointing to a treeinfo file of Alma Linux repo.


# echo "select * from rpm_distributiontree where content_ptr_id = 'c21cf106-dc3b-4615-8541-229726d4a06d';" | su - postgres -c "psql pulpcore"
            content_ptr_id            | header_version | release_name | release_short | release_version | release_is_layered | base_product_name | base_product_short | base_product_version |  arch  | build_timestamp | instimage | mainimage | discnum | totaldiscs 
--------------------------------------+----------------+--------------+---------------+-----------------+--------------------+-------------------+--------------------+----------------------+--------+-----------------+-----------+-----------+---------+------------
 c21cf106-dc3b-4615-8541-229726d4a06d | 1.2            | AlmaLinux    | AlmaLinux     | 8               | f                  |                   |                    |                      | x86_64 |      1636649716 |           |           |         |           
(1 row)


# echo "select * from core_contentartifact where content_id = 'c21cf106-dc3b-4615-8541-229726d4a06d';" | su - postgres -c "psql pulpcore"
               pulp_id                |           pulp_created           |        pulp_last_updated         | relative_path |             artifact_id              |              content_id              
--------------------------------------+----------------------------------+----------------------------------+---------------+--------------------------------------+--------------------------------------
 cfb23e31-43d2-4332-80ec-5d391c49c98d | 2021-12-18 22:49:52.015523+05:30 | 2021-12-18 22:49:52.015541+05:30 | .treeinfo     | 5258ea04-d769-4d7a-b003-ae4c5f47ac49 | c21cf106-dc3b-4615-8541-229726d4a06d
(1 row)


# echo "select * from core_artifact where pulp_id = 'cfb23e31-43d2-4332-80ec-5d391c49c98d';" | su - postgres -c "psql pulpcore"
 pulp_id | pulp_created | pulp_last_updated | file | size | md5 | sha1 | sha224 | sha256 | sha384 | sha512 
---------+--------------+-------------------+------+------+-----+------+--------+--------+--------+--------
(0 rows)



Expected results:

The migration process should be able to handle the migration of Almalinux repos as well and complete the same without any errors.


Additional info:

It seems to be similar to https://bugzilla.redhat.com/show_bug.cgi?id=1945377  and https://bugzilla.redhat.com/show_bug.cgi?id=1964530 which were for RHEL 8 and CentOS 8 Base OS.

I have checked the .treeinfo file for Base OS repo of Alma Linux product that was synced. It has valid path for all files.

[images-x86_64]
boot.iso = images/boot.iso
efiboot.img = images/efiboot.img
initrd = images/pxeboot/initrd.img
kernel = images/pxeboot/vmlinuz


# pwd
/var/lib/pulp/published/yum/https/repos/RedHat/Library/custom/AlmaLinux/Alma_Linux_8_OS

# ll images/ -R
images/:
total 0
lrwxrwxrwx. 1 apache apache 122 Dec 18 21:05 boot.iso -> /var/lib/pulp/content/units/distribution/97/e022aa9f45c173f3b2dfcc6db4104eadb1ea84d7ed6dc82fb93e28d78d4da4/images/boot.iso
lrwxrwxrwx. 1 apache apache 125 Dec 18 21:05 efiboot.img -> /var/lib/pulp/content/units/distribution/97/e022aa9f45c173f3b2dfcc6db4104eadb1ea84d7ed6dc82fb93e28d78d4da4/images/efiboot.img
lrwxrwxrwx. 1 apache apache 125 Dec 18 21:05 install.img -> /var/lib/pulp/content/units/distribution/97/e022aa9f45c173f3b2dfcc6db4104eadb1ea84d7ed6dc82fb93e28d78d4da4/images/install.img
drwxrwx---. 2 apache apache  39 Dec 18 21:05 pxeboot

images/pxeboot:
total 0
lrwxrwxrwx. 1 apache apache 132 Dec 18 21:05 initrd.img -> /var/lib/pulp/content/units/distribution/97/e022aa9f45c173f3b2dfcc6db4104eadb1ea84d7ed6dc82fb93e28d78d4da4/images/pxeboot/initrd.img
lrwxrwxrwx. 1 apache apache 129 Dec 18 21:05 vmlinuz -> /var/lib/pulp/content/units/distribution/97/e022aa9f45c173f3b2dfcc6db4104eadb1ea84d7ed6dc82fb93e28d78d4da4/images/pxeboot/vmlinuz


# for i in images/*; do echo Checking $i : `test -e $i && echo "Symlink OK" || echo "Symlink Broken"` ; done
Checking images/boot.iso : Symlink OK
Checking images/efiboot.img : Symlink OK
Checking images/install.img : Symlink OK
Checking images/pxeboot : Symlink OK

# for i in images/pxeboot/*; do echo Checking $i : `test -e $i && echo "Symlink OK" || echo "Symlink Broken"` ; done
Checking images/pxeboot/initrd.img : Symlink OK
Checking images/pxeboot/vmlinuz : Symlink OK


NOTE: There is no workaround to get past this problem without deleting the repo and restarting the migration which is not a very good solution.

Comment 2 pulp-infra@redhat.com 2021-12-20 22:08:51 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2021-12-20 22:08:52 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2021-12-20 23:09:00 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2021-12-22 16:12:49 UTC
The Pulp upstream bug status is at CLOSED - DUPLICATE. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2021-12-22 17:18:32 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 9 Tanya Tereshchenko 2022-01-07 16:37:44 UTC
Fixed in pulp_rpm 3.11.3 and pulp-2to3-migration 0.11.8

Comment 18 errata-xmlrpc 2022-04-20 20:34:53 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 (Important: Satellite 6.9.9 Async Bug Fix Update), 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-2022:1478

Comment 20 Red Hat Bugzilla 2023-09-15 01:50:40 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days


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