Katello/katello — pull request #626 by bbuckingham (2012-09-10 22:52:21+00:00)
Title: 854697 - manifest import - if first import fails, rollback (unimport it)

This commit contains changes such that if a user attempts to import
a manifest and the import fails, the orchestration will rollback
(i.e. unimport) the manifest.

This change is to address a scenario like the following:
- user sets the CDN to an invalid value
- user imports a manifest
- the import of the manifest in to candlepin succeeds; however,
the creation of the repos using candlepin/cdn fails (since
the cdn url is bad)

With this change, the user can fix the cdn url and attempt a
reimport.

A couple of issues to be aware of:
1. The manifest upload history will report the failed upload as
successful; however, an error notice will be generated. The
issue here is that we should not be displaying upload history
based only on the success of the candlepin upload. A separate
bugzilla has been created to address this.

2. This rollback only applies if there have not been any previous
successful imports. The reason being rolling back will completely
remove any information stored in candlepin from that manifest
and any incrementals previously imported. In addition, subscriptions
will be removed. Support for proper rollbacks are something that
can be explored in the future.