Bug 812346 - org delete (with manifest imported) fails - not possible to reuse the manifest any more
org delete (with manifest imported) fails - not possible to reuse the manifes...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Justin Sherrill
Katello QA List
:
Depends On: 813427
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-13 09:19 EDT by Garik Khachikyan
Modified: 2015-01-04 16:59 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-15 14:59:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Garik Khachikyan 2012-04-13 09:19:34 EDT
Description of problem:
Recent CFSE puddle provides an issue about failing on org removal which has a manifest imported (repo enabled). The same issue exists also on latest Katello code.

Version-Release number of selected component (if applicable):
CFSE v. 2012-04-05.1

How reproducible:
2 from 2 attempts

Steps to Reproduce:
1.create an org and and apply envs in a sequence like: Library->Dev->Test
2.import manifest; enable repo of RHEL6Server and promote to both envs (no need of sync)
3.register systems to both env. and consume subscriptions
4.`org delete`
  
Actual results:
Seems that environment sequence causes issues, and after this the manifest is not possible to use for any other org: traceback:
---
Organization [ org-manifest-1334321922 ] deletion failed: Errors occured during orchestration #<OrderedHash {:base=>["Environment Dev-1334321922 has a successor.  Only the last environment on a path can be deleted"]}>
 Queue Failed - []
---

Expected results:
no error. Org should be removed in a clean way. Further usage of the manifest would be possible.

Additional info:
Comment 4 Justin Sherrill 2012-04-13 15:04:07 EDT
fixed in katello master.  Also added a test case.

20794ebde89f1e6e5f2302e8724740c3ee3fae74
Comment 5 Garik Khachikyan 2012-04-16 02:16:16 EDT
ack-ing - also automation scenario exists (i'll add more checkings in tearDown).
would be easy to check.
Comment 6 Garik Khachikyan 2012-04-16 08:06:14 EDT
# VERIFIED on katello

with the fix delete org is performing without any issues, also the manifest file is possible to re-use.
---

m2crypto-0.21.1.pulp-7.el6.x86_64
qpid-cpp-client-0.12-6.el6.x86_64
katello-glue-foreman-0.2.30-1.git.13.398c73b.el6.noarch
pulp-selinux-server-1.1.2-1.el6.noarch
katello-configure-0.2.18-1.git.17.3e78c40.el6.noarch
katello-repos-testing-0.2.1-1.el6.noarch
candlepin-tomcat6-0.5.27-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
katello-glue-candlepin-0.2.30-1.git.13.398c73b.el6.noarch
katello-0.2.30-1.git.13.398c73b.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-common-0.2.30-1.git.13.398c73b.el6.noarch
katello-selinux-0.2.4-1.git.0.b03a73e.el6.noarch
candlepin-0.5.27-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
qpid-cpp-server-ssl-0.12-6.el6.x86_64
katello-cli-common-0.2.26-1.git.1.ba3df1f.el6.noarch
katello-cli-0.2.26-1.git.1.ba3df1f.el6.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
python-qpid-0.12-1.el6.noarch
katello-certs-tools-1.1.5-1.git.0.f153109.el6.noarch
pulp-common-1.1.2-1.el6.noarch
qpid-cpp-server-0.12-6.el6.x86_64
katello-glue-pulp-0.2.30-1.git.13.398c73b.el6.noarch
pulp-1.1.2-1.el6.noarch
katello-repos-0.2.1-1.el6.noarch
qpid-cpp-client-ssl-0.12-6.el6.x86_64
katello-agent-1.0.3-1.git.0.cccd0b4.el6.noarch
Comment 10 Corey Welton 2012-04-17 14:01:58 EDT
I'm seeing a completely different error in latest brew - CloudForms System Engine Version: 0.1.310-1.el6_2.  I have repeated this three times in a row, using the following steps which, other than Environment names, seems pretty identical (broken out here in fine detail)


1. Create org 812346
2. Create envs Dev - QA - Stage - Prod
3. Switch to org 812346; Upload manifest
4. Enable repo 6Server - x86_64 - Red Hat Enterprise Linux 6 Server RPMs x86_64 5. 6Server; do not promote
6. Create changeset "todev"; promote product from Library to Dev.
7. Create changeset "toqa"; promote product from Dev to QA
8. Register one system to Dev
9. Register one system to QA
10. In UI, assign subscriptions to each system accordingly
11. Switch to ACME_Corporation


End result, upon attempting to delete org:

Candlepin::Content: 500 Internal Server Error {"displayMessage":"Runtime Error Could not execute JDBC batch update at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"} (DELETE /candlepin/content/861)

At this point, the org has disappeared from the UI, but still exists in the background - and user cannot use the manifest from before, as CFSE thinks the manifest is still in use.

katello-0.1.310-1.el6_2.noarch
katello-all-0.1.310-1.el6_2.noarch
candlepin-0.5.27-1.el6.noarch
Comment 11 Corey Welton 2012-04-17 14:21:24 EDT
Comment #10 appears to be a different bug - it can occur even w/o creating envs. Writing up a new bz, but this bug will likely be blocked in testing until the new one is resolved.
Comment 15 Corey Welton 2012-04-23 14:14:22 EDT
This seems to be mostly ok now - I can now delete the org. During reimport of cert with a new environment, though, I have to use 'Force', else it tells me someone has already imported the cert.

Is this the expected behavior?  Import using "Force" appears to work... I just wasn't sure if it's what we wanted.
Comment 16 Corey Welton 2012-04-23 14:42:34 EDT
Per dev, this is the expected behavior.

QA Verified in brew - CloudForms System Engine Version: 0.1.311-1.el6_2
Comment 17 Garik Khachikyan 2012-04-24 10:20:47 EDT
well at least - it becomes possible to import "somehow" :)

I would consider as ok.
Comment 18 errata-xmlrpc 2012-05-15 14:59:35 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0665.html

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