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 2056568 - Katello doesn't create a new publication for default organization repos when importing a content view version with new contents
Summary: Katello doesn't create a new publication for default organization repos when ...
Keywords:
Status: CLOSED DUPLICATE of bug 2043726
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Inter Satellite Sync
Version: 6.10.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.11.0
Assignee: Chris Roberts
QA Contact: Radek Mynar
URL: https://projects.theforeman.org/issue...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-21 13:53 UTC by Hao Chang Yu
Modified: 2024-03-05 16:02 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-11 09:45:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34384 0 High Closed content views configured as "import only" generate 404 errors during capsule sync 2022-03-01 17:28:20 UTC
Github Katello katello pull 9919 0 None Merged Fixes #34384 - publish metadata for imported repos 2022-03-01 17:28:20 UTC
Red Hat Issue Tracker SAT-8498 0 None None None 2022-03-01 17:30:02 UTC

Description Hao Chang Yu 2022-02-21 13:53:30 UTC
Description of problem:
Katello doesn't create a new publication for default organization repos when importing a content view version with new contents

Steps to Reproduce:

On the connected Satellite:
1. Create a custom repo and upload 1 rpm to it.
2. Create a content view and attach the custom repo.
3. Publish content view version 1.0.
4. Export content view version 1.0
 
hammer content-export complete version --organization-id 1 --content-view-id <cv id> --lifecycle-environment Library --version 1

5. Upload 1 new rpm to the custom repo
6. Publish content view version 2.0
7. Export content view version 2.0

hammer content-export complete version --organization-id 1 --content-view-id <cv id> --lifecycle-environment Library --version 2

8. Copy the exported files to the disconnect Satellite.


On the disconnected Satellite:
9. Import content view version 1.0

hammer content-import version --organization-id 1 --path /var/lib/pulp/imports/<cv version 1 export files path>

10. Register a client to the disconnected Satellite and enable the custom repo then run yum to inspect the repo. The repo should have only 1 rpm.

yum clean all
yum repolist -v

11. Import content view version 2.0
12. Go back to the client and inspect the repo again.

yum clean all
yum repolist -v


Actual results:
Still getting 1 rpm


Expected results:
Should get 2 rpms


Additional info:

The first import task has the following actions but they are not in the 2nd import task:
64: Actions::Pulp3::Repository::CreatePublication (success) [ 0.89s / 0.31s ]
66: Actions::Pulp3::Repository::SavePublication (success) [ 0.03s / 0.03s ]

The following command doesn't solve the issue:

hammer content-view version republish-repositories --content-view-id 1 --version 1.0 --force yes


The repo can be fixed by forcing the publication:

foreman-rake console
Katello::Repository.where(id: [<default org repo id>], library_instance_id: nil).each {|repo| ForemanTasks.async_task(Actions::Katello::Rep
ository::MetadataGenerate, repo, force_publication: true) }
exit

Comment 1 Chris Roberts 2022-03-01 17:28:21 UTC
I followed the steps on my devel box and confirmed this works on master. I will link up the redmine/github issue.

First export:

Repo-id      : food_custom-ex_zoo
Repo-name    : zoo
Repo-revision: 1646155012
Repo-updated : Tue Mar  1 17:16:52 2022
Repo-pkgs    : 32
Repo-size    : 77 k
Repo-baseurl : https://centos7-katello-devel.vault111.example.com/pulp/content/food/Library/view/custom/custom-ex/zoo/
Repo-expire  : 1 second(s) (last: Tue Mar  1 17:21:04 2022)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/redhat.repo

Second export:

Repo-id      : food_custom-ex_zoo
Repo-name    : zoo
Repo-revision: 1646155363
Repo-updated : Tue Mar  1 17:22:43 2022
Repo-pkgs    : 31
Repo-size    : 74 k
Repo-baseurl : https://centos7-katello-devel.vault111.example.com/pulp/content/food/Library/view/custom/custom-ex/zoo/
Repo-expire  : 1 second(s) (last: Tue Mar  1 17:23:32 2022)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/redhat.repo


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