Project

General

Profile

Bug #35572

Make cv publish fail on invalid/non existent content

Added by Partha Aji 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
medium
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Customers who have upgraded from katello 3.18 and above in some instances seem to have repositories that do not have any candlepin content. This is possibly related to manifest expiration (which deletes the subs in candlepin but keeps the repo in Katello db)

We need the content view publish Not to happen with a clear message if any of the repositories in that content view has no content.

Not able to exactly reproduce this situation but here are some rails commands to try
1) Create a custom product and repository
2) foreman-rake console
3)

> root = ::Katello::RootRepository.last
> ::Katello::Resources::Candlepin::Product.remove_content(root.product.organization.label, root.product.cp_id, root.content_id)
> ::Katello::Resources::Candlepin::Content.destroy(root.product.organization.label, root.content_id)

4) Add this repo to a content view and publish.

Expected:
Error asking the invalid repo to be removed before publish starts

Actual:
Error in finalize pausing the task and causing all kinds of side effects.

Associated revisions

Revision 7664477e (diff)
Added by Partha Aji about 2 months ago

Fixes #35572 - Fails publish if repos have no content (#10294)

  • Fixes #35572 - Fails publish if repos have no content
  • Refs #35572 - Works for Composite also
  • Refs #35572 - Added similar logic for sync & promote also

Co-authored-by: Jeremy Lenz <>
Co-authored-by: Chris Roberts <>
Co-authored-by: Samir Jha <>

History

#1 Updated by Partha Aji 2 months ago

  • Bugzilla link set to 2032040

#2 Updated by The Foreman Bot 2 months ago

  • Assignee set to Partha Aji
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/10294 added

#3 Updated by Chris Roberts 2 months ago

  • Triaged changed from No to Yes
  • Difficulty set to medium
  • Target version set to Katello 4.7.0

#4 Updated by The Foreman Bot about 2 months ago

  • Fixed in Releases Katello 4.7.0 added

#5 Updated by Partha Aji about 2 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF