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.
Created attachment 795897 [details] screenshot of the exception
Created attachment 795898 [details] logs
This looks similar or related to Bug 1001609.
@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.
then i am more than happy to marke it duplicate. thanks. *** This bug has been marked as a duplicate of bug 1001609 ***