Bug 857963 - Add better transactional support for failed manifest uploads
Summary: Add better transactional support for failed manifest uploads
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Tom McKay
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-17 15:26 UTC by Mike McCune
Modified: 2019-09-26 13:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-01 14:06:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike McCune 2012-09-17 15:26:26 UTC
During CFSE 1.1 we added improved support to rollback an imported manifest with the implementation of a fix in this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=854697

this change only allows for 1 failed manifest import but after that the user is still left in a state that can not be recovered from.  We need additional changes in Katello and Candlepin:

"The changes introduced 'delete' the manifest from candlepin, if the total successful imports is 1 (i.e. this is the first import attempt).  Since katello does not currently store the import history locally, the 'total' is determined by looking at the candlepin history.  The issue we are encountering is essentially the following:

- user sets CDN to invalid value

- user attempts to import a manifest
  - the import of the manifest to candlepin succeeds (history total=1)
  - the creation of repos fails
  - katello deletes the manifest from candlepin (i.e. total == 1)

- user attempts to import a manifest (again)
  - the import of the manifest to to candlepin succeeds (history total=2)
  - the creation of repos fails
  - katello does not delete manifest from candlepin (i.e. total > 1)

- user attempts to import a manifest (again)
  - the import of the manifest to candlepin fails... reason being, it could not
    be deleted on the previous failure, so candlepin reports that this import
    is 'older than existing data'

Unfortunately, katello does not currently have a way with current data to determine on that second failed attempt to delete the manifest.  It is quite possible that first success was a true success, systems were registered, subscribed and are consuming content.  As a result, we cannot simply delete the manifest again, without affecting existing subscriptions.

In order to address this behavior, the following are a couple of things that could potentially help:

1. Update candlepin to destroy the import history for an owner, when a manifest is deleted.  Since the manifest is no longer there, not sure that the history is very useful.  If this was done, in the above scenario the second failed attempt would again delete the manifest from candlepin.

2. Update candlepin to report to katello that the manifest has already been imported (i.e. rather than report 'older than existing data', report 'already imported').  Using this information, katello could be updated to make a decision to continue with the second phase of the import process, which is to create the repositories.  (Note: this is currently on candlepin backlog)

There are likely other solutions; however, posing a couple of possibilities."

Comment 1 William Poteat 2013-10-01 14:06:04 UTC
We have added the ability to update manifests in place. The need to delete the previous manifest to import a new one is gone.

Just import the new-and-improved manifest as needed. Updates will be made in place.

If there is still an issue, please reopen.


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