Project

General

Profile

Actions

Bug #35572

closed

Make cv publish fail on invalid/non existent content

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
medium
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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.

Actions

Also available in: Atom PDF