New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #23878 - Config association with organization #90
Conversation
@ares request you to review it once, I used discovery plugin as example when writing concern, I tested it and its working, I am able to delete org when having config defined but still you have look at this once. Thank You! |
Thanks @upadhyeammit, this seems to work with the original issue. There's still one more foreign key, that's failing though, I'm getting this now.
I'll need to look with my debugging environment, it's not clear why it fails now, perhaps it's related to the other linked objects from configuration, such as user |
@ares I will check this once, will let you know my findings. |
Hello, If I see the error then I do see there are good number records in taxable_taxonomies referring to the organization which I tried to delete, ESC[32m2018-10-22T07:28:11ESC[0m [ESC[31mEESC[0m|ESC[36mbacESC[0m|4fa15] PG::ForeignKeyViolation: ERROR: update or delete on table "taxonomies" violates foreign key constraint "taxable_taxonomies_taxonomy_id_fk" on table "taxable_taxonomies" katello=# select taxable_type, count(*) from taxable_taxonomies where taxonomy_id=3 group by taxable_type; Foreign-key constraints: I feel like these associations should be getting handled somewhere already, I am checking it further, if you have any thoughts on this then request to comment. |
@upadhyeammit that looks as the cause, you're right. The problem is that when we try to delete org, new audit record is created and therefore new entry in taxable_taxonomies table. This happens after these relation were cleanup by That's definitely unrelated, so this can be merged. Thanks! |
so in fact, it was actually audit created by the virt who configuration deletion, not yet sure how to fix it |
fix by the linked PR |
This adds missing dependent destroy of ForemanVirtWhoConfigure::Config class so when deleting the Organization it should consider deleting Virt Who configuration associated with Organization.