Bug 977744
| Summary: | Deleting an org that has an active sync fails (partially) | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Ade Bradshaw <abradshaw> |
| Component: | Content Management | Assignee: | Partha Aji <paji> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Corey Welton <cwelton> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.1 | CC: | cwelton, ehelms, jmontleo, kbidarka, mmccune |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-04-24 17:09:10 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1002495 | ||
|
Description
Ade Bradshaw
2013-06-25 09:11:31 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. We need to check and see if this puts the system in a bad state (corrupted data, etc.) -- if so, raise sev. Testing this behavior on latest I am not able to reproduce. After creating an organization, starting a sync, waiting for the sync to get partially done and then attempting to delete the organization occurs successfully for me. We get the below notice when trying to delete it. Failed to delete organization 'kedar_Test' 2013-10-21T07:33:28-0400: [Worker(delayed_job host:cloud-qe-8.idm.lab.bos.redhat.com pid:17019)] OrganizationDestroyer#run failed with NoMethodError: undefined method `editable?' for nil:NilClass - 0 failed attempts 2013-10-21T07:33:28-0400: [Worker(delayed_job host:cloud-qe-8.idm.lab.bos.redhat.com pid:17019)] PERMANENTLY removing OrganizationDestroyer#run because of 1 consecutive failures. undefined method `editable?' for nil:NilClass /usr/share/katello/app/models/authorization/repository.rb:31:in `deletable?' /usr/share/katello/app/models/repository.rb:307:in `assert_deletable' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:407:in `_run__2602415743000240731__destroy__4015956763612595372__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_destroy_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:254:in `destroy' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:236:in `block in destroy' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:236:in `destroy' /usr/share/katello/app/models/glue.rb:93:in `destroy' The above traceback is from /var/log/katello/delayed_job.log Will be updating the katello-debug report shortly. This bug would also lead to a situation, where in one could no longer upload the manifest (used in the deleted org) to another org, as the org deletion had failed and there is no way from the UI to delete the manifest as the org is no longer visible. Looks like a blocker issue to me as per above comment8. we don't use the blocker flag, FYI When line https://github.com/Katello/katello/blob/master/app/models/authorization/repository.rb#L31 is evaluated it's running in transaction where product of the repository was already deleted, so the method #product is returning nil and can't verify that the repository is #deletable?. All #(before|after)_destroy callbacks appear correctly defined before all associations with `:dependent` option. So the bug is probably in order of destroy callbacks defined by association's `:dependent` option. Changing order of associations or verifying of all #deletable? conditions before any destruction should fix the problem. Ping me if more information is needed. should be fixed when https://github.com/Katello/katello/pull/3284 gets merged to master should be fixed in the next build c89ad4ad8a251fa898d8bfebf1e7ab1c2f16eae2 tested partha's patch and it did indeed seem to fix the issue for me. I no longer get this message in the latest snap. I'm told org is scheduled for background deletion and disappears from UI, without error. QA Verified Satellite-6.0.2-RHEL-6-20131030.0 This was verified and delivered with MDP2. Closing it out. This was delivered and verified with MDP2. Closing the bug. |