Bug 1006199 - [UI] Trying to recreate Org with the same label: PG error
Summary: [UI] Trying to recreate Org with the same label: PG error
Keywords:
Status: CLOSED DUPLICATE of bug 1001609
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Tom McKay
QA Contact: SAM QE List
URL:
Whiteboard:
Depends On:
Blocks: sam13-tracker
TreeView+ depends on / blocked
 
Reported: 2013-09-10 08:24 UTC by Garik Khachikyan
Modified: 2015-01-04 22:00 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-10 12:59:27 UTC
Embargoed:


Attachments (Terms of Use)
screenshot of the exception (70.00 KB, image/png)
2013-09-10 08:24 UTC, Garik Khachikyan
no flags Details
logs (477.36 KB, application/gzip)
2013-09-10 08:25 UTC, Garik Khachikyan
no flags Details

Description Garik Khachikyan 2013-09-10 08:24:14 UTC
Description of problem:
Trying to create an org with the label same as the one I just scheduled for removal (~ 1 min ago or so) fails with Postgres exception in UI:
---
Failed to delete organization 'virt pools'. Check notices for more details. 
PGError: ERROR: update or delete on table "organizations" violates foreign key constraint "notices_organization_id_fk" on table "notices" DETAIL: Key (id)=(2) is still referenced from table "notices". : COMMIT (ActiveRecord::InvalidForeignKey)
---

Version-Release number of selected component (if applicable):
candlepin-0.8.25-1.el6sam.noarch
candlepin-cert-consumer-cfseserver2.usersys.redhat.com-1.0-1.noarch
candlepin-scl-1-5.el6_4.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-selinux-0.8.25-1.el6sam.noarch
candlepin-tomcat6-0.8.25-1.el6sam.noarch
elasticsearch-0.19.9-8.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-1.4.3-10.el6sat.noarch
katello-cli-common-1.4.3-10.el6sat.noarch
katello-common-1.4.3-12.el6sam_splice.noarch
katello-configure-1.4.4-4.el6sat.noarch
katello-glue-candlepin-1.4.3-12.el6sam_splice.noarch
katello-glue-elasticsearch-1.4.3-12.el6sam_splice.noarch
katello-headpin-1.4.3-12.el6sam_splice.noarch
katello-headpin-all-1.4.3-12.el6sam_splice.noarch
katello-selinux-1.4.4-2.el6sat.noarch
ruby193-rubygem-ldap_fluff-0.2.2-1.el6sat.noarch
thumbslug-0.0.34-1.el6sam.noarch
thumbslug-selinux-0.0.34-1.el6sam.noarch

How reproducible:
from the first attempt: accidentally while playing with virtual subscriptions (was prepared a wrong org, deleted it having 3 systems registered and with manifest imported).

Steps to Reproduce:
1.create an org "virt pools" (will have the labe virt_pools - leave it to be untouched in UI).
2.import manifest, assign and subscribe 2 systems + 1 register only.
3.now delete the org , and RIGHT AFTER try to create an org named: virt_pools (NOTE: label is the same - leave it as it is) and push the create button.

Actual results:
exception described above (also pls: attachment screenshot)

Expected results:
no exception, as the org is removed (or maybe is in progress) free the label to be reused. NO pg error to be thrown.

Additional info:
screenshot + logs are attached.

Comment 1 Garik Khachikyan 2013-09-10 08:24:41 UTC
Created attachment 795897 [details]
screenshot of the exception

Comment 2 Garik Khachikyan 2013-09-10 08:25:48 UTC
Created attachment 795898 [details]
logs

Comment 3 sthirugn@redhat.com 2013-09-10 12:15:41 UTC
This looks similar or related to Bug 1001609.

Comment 4 Tom McKay 2013-09-10 12:56:57 UTC
@garik - Setting to POST as I believe that @sthirugn is correct that it is the same as https://bugzilla.redhat.com/show_bug.cgi?id=1001609 . I would rather you re-test this one, though, instead of closing this as a duplicate to be sure.

Comment 5 Garik Khachikyan 2013-09-10 12:59:27 UTC
then i am more than happy to marke it duplicate. thanks.

*** This bug has been marked as a duplicate of bug 1001609 ***


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