Bug 1952605 - foreman-rake katello:correct_repositories is failing to create the repositories.
Summary: foreman-rake katello:correct_repositories is failing to create the repositories.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 6.9.2
Assignee: satellite6-bugs
QA Contact: Tasos Papaioannou
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-22 16:34 UTC by James Jeffers
Modified: 2024-03-25 18:15 UTC (History)
11 users (show)

Fixed In Version: tfm-rubygem-katello-3.18.1.28-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1908101
Environment:
Last Closed: 2021-05-20 18:05:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5655281 0 None None None 2021-04-22 16:34:17 UTC
Red Hat Product Errata RHBA-2021:2074 0 None None None 2021-05-20 18:05:40 UTC

Comment 3 Tasos Papaioannou 2021-05-03 19:37:16 UTC
Verified on 6.9.2 snap 1.0.

1.) Install pulp-admin-client.

# pulpversion=`rpm -q pulp-server --qf %{v}`
# yum install pulp-admin-client-${pulpversion} pulp-rpm-admin-extensions.noarch --disableplugin=foreman-protector

2.) Get pulp repo id.

# pulpAdminPassword=$(grep ^default_password /etc/pulp/server.conf | cut -d' ' -f2)
# pulp-admin -u admin -p $pulpAdminPassword rpm repo list
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  d6d9bc5f-515f-4e8c-b7af-c53b5b926247
Display Name:        Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64
Description:         None
Content Unit Counts: 
  Erratum:                527
  Rpm:                    1381
  Yum Repo Metadata File: 1

3.) Delete repo from pulp.

# pulp-admin -u admin -p $pulpAdminPassword rpm repo delete --repo-id d6d9bc5f-515f-4e8c-b7af-c53b5b926247
This command may be exited via ctrl+c without affecting the request.


[\]
Running...

Repository [d6d9bc5f-515f-4e8c-b7af-c53b5b926247] successfully deleted


4.) Run foreman-rake command.

# foreman-rake katello:correct_repositories COMMIT=true
Processing Repository 1/1: Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64 (1)
Repository 1 Missing
Recreating 1

5.) Verify that repo is present.

# pulp-admin -u admin -p $pulpAdminPassword repo list
+----------------------------------------------------------------------+
                              Repositories
+----------------------------------------------------------------------+

Id:                  d6d9bc5f-515f-4e8c-b7af-c53b5b926247
Display Name:        Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64
Description:         None
Content Unit Counts: 

6.) Re-sync from Satellite UI, then verify that content is back in pulp:

# pulp-admin -u admin -p $pulpAdminPassword repo list
+----------------------------------------------------------------------+
                              Repositories
+----------------------------------------------------------------------+

Id:                  d6d9bc5f-515f-4e8c-b7af-c53b5b926247
Display Name:        Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64
Description:         None
Content Unit Counts: 
  Erratum:                527
  Rpm:                    1381
  Yum Repo Metadata File: 1

Comment 8 errata-xmlrpc 2021-05-20 18:05:30 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 (Satellite 6.9.2 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/RHBA-2021:2074


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