-
Notifications
You must be signed in to change notification settings - Fork 898
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
Return VMs and Templates for EMS prev_relats #15671
Return VMs and Templates for EMS prev_relats #15671
Conversation
When retrieving vmdb_relats_ems we weren't including templates in the list of children for folders. This isn't an issue for clusters, hosts, and resource_pools because templates don't belong to any of these but they do belong to folders. If a VM was marked as a template and moved into a new folder it was not being included in the prev_relats which meant that its previous resource_pool and folder relat were not being deleted, but we were adding a new folder relationship. This caused the "multiple parents found" exception seen occasionally on the UI while provisioning. https://bugzilla.redhat.com/show_bug.cgi?id=1475405
c0bb826
to
b1ed3c8
Compare
Checked commit agrare@b1ed3c8 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read it, I understand it, I approve it 😄
Great find @agrare !! |
After applying this patch just running a full refresh will clean up any existing stale relationships without needing to run the |
Return VMs and Templates for EMS prev_relats (cherry picked from commit 3c599e9) https://bugzilla.redhat.com/show_bug.cgi?id=1477722
Euwe backport details:
|
Should also backport #15692 to fix a sporadic test failure |
Return VMs and Templates for EMS prev_relats (cherry picked from commit 3c599e9) https://bugzilla.redhat.com/show_bug.cgi?id=1479805
Fine backport details:
|
+1 |
…ents_found Return VMs and Templates for EMS prev_relats (cherry picked from commit 3c599e9) https://bugzilla.redhat.com/show_bug.cgi?id=1479805
When retrieving vmdb_relats_ems we weren't including templates in the
list of children for folders. This isn't an issue for clusters, hosts,
and resource_pools because templates don't belong to any of these but
they do belong to folders.
If a VM was marked as a template and moved into a new folder it was not
being included in the prev_relats which meant that its previous
resource_pool and folder relat were not being deleted, but we were
adding a new folder relationship. This caused the "multiple parents
found" exception seen occasionally on the UI while provisioning.
https://bugzilla.redhat.com/show_bug.cgi?id=1475405
Steps to reproduce:
With evmserver stopped (needed to ensure a full refresh is run)
In rails console:
In VMware Client:
2. Move a template into a different folder
In rails console:
3. Run another full refresh (Note: with a running system this can happen for a few reasons, in the case of this ticket the new folder event got merged causing the full refresh)
4. Print the parent blue folder (
VmOrTemplate.find_by(:name => "foo").parent_blue_folder
)Before this patch this should result in the
multiple parent found
exception.