Bug 857963 - Add better transactional support for failed manifest uploads
Add better transactional support for failed manifest uploads
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Subscription Management (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: --
Assigned To: Tom McKay
Katello QA List
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-09-17 11:26 EDT by Mike McCune
Modified: 2014-09-18 11:32 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-01 10:06:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mike McCune 2012-09-17 11:26:26 EDT
During CFSE 1.1 we added improved support to rollback an imported manifest with the implementation of a fix in this bug:


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 10:06:04 EDT
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.