Change in ovirt-engine[master]: engine: Adding unique(vds_id, name) constraint to vds_interface

emesika at redhat.com emesika at redhat.com
Sun Jun 21 11:17:23 UTC 2015


Eli Mesika has submitted this change and it was merged.

Change subject: engine: Adding unique(vds_id, name) constraint to vds_interface
......................................................................


engine: Adding unique(vds_id, name) constraint to vds_interface

and removing duplicate entiries in case there were any.
Due to a bug that was already fixed, more than one GetCaps could be
executed simultaneously. In some scenarios of the race the same nic
could be created more than once.

This patch cleans the duplicate entities from vds_interface table
(leaves just the last updated entry).

The building proccess of the network_attachments assumes there are no such
duplicates in vds_interface,
so the duplicates should be cleaned up from vds_interface prior building
the network_attachments table.

In case the user already run the add_network_attachment upgrade script-
1. If succeeded- it means his vdS_interface table doesn't have duplicates,
so the is no need for clean up.
2. If failed- it means the add_network_attachment upgrade script is not
marked as a script the already have run. So now, when running the setup,
the duplicates clean will occur before building the network_attachments
and everything should work fine.

Change-Id: I2ae0c11afb751ec28b8f71e70959546ba306444f
Signed-off-by: Alona Kaplan <alkaplan at redhat.com>
---
M packaging/dbscripts/upgrade/03_06_1460_add_network_attachment.sql
A packaging/dbscripts/upgrade/03_06_1610_unique_vds_id_name_vds_interface.sql
2 files changed, 12 insertions(+), 0 deletions(-)

Approvals:
  Eli Mesika: Looks good to me, approved; Passed CI tests
  Alona Kaplan: Verified



-- 
To view, visit https://gerrit.ovirt.org/42429
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ae0c11afb751ec28b8f71e70959546ba306444f
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list