[WIP] Prevent a vm or template being its own parent#23302
[WIP] Prevent a vm or template being its own parent#23302agrare wants to merge 2 commits intoManageIQ:masterfrom
Conversation
5938445 to 0528763 Compare | @miq-bot cross-repo-test /providers |
From Pull Request: ManageIQ/manageiq#23302
app/models/manageiq/providers/inventory/persister/builder/cloud_manager.rb Outdated Show resolved Hide resolved
0528763 to 01ece9e Compare | Hi @agrare, I used the changes you committed in this PR, but again i got the same error. What is the work around for this to fix this issue |
| @Dhamo1107 thank you for testing! It sounds like we need some more logging / diagnostics to try to find which image or images have this issue. I'll add some more logging to this save block and the openstack parser to try to help find the issue. |
| Okay @agrare |
How to fix this issue @agrare |
| I'm working on it @Dhamo1107 😉 Based on the openstack parser it isn't clear to me how a template could be assigned itself as a genealogy parent because it is only looking at the vms collection so it couldn't even find itself in the database. |
| Thank you @agrare, Any work around for this, because not able to do refresh relationship for that provider |
| You can comment out the inventory collection temporarily: https://github.com/ManageIQ/manageiq-providers-openstack/blob/master/app/models/manageiq/providers/openstack/inventory/persister/definitions/cloud_collections.rb#L36C27-L36C55 Similar effect to what was being done here: ManageIQ/manageiq-providers-openstack#862 (comment) |
| Okay @Dhamo1107 can you try testing out the latest updates in this PR, un-comment the collection in the openstack persister if you commented it out, and try applying the changes here https://github.com/ManageIQ/manageiq-providers-openstack/pull/899/files |
| Checked commits agrare/manageiq@01ece9e~...9c752cd with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint |
| This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
1 similar comment
| This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
Prevent a vm or template from being assigned as its own parent, preventing the ancestry "cannot be a descendant of itself" exception
Fixes ManageIQ/manageiq-providers-openstack#862