Change in ovirt-engine[master]: core: fix badly generated macs in db

alkaplan at redhat.com alkaplan at redhat.com
Thu Dec 17 12:46:56 UTC 2015


Alona Kaplan has submitted this change and it was merged.

Change subject: core: fix badly generated macs in db
......................................................................


core: fix badly generated macs in db

There was .py script (now deleted) which was used to generate mac
ranges in some circumstances. However there was a bug in it, so some
users may end up with MAC address like 00:1a:4a:1:4f:ff generated.
This MAC got without any validation into DB and engine did not detect
this problem — since engine code just removes colons and parse value
as hex. So in that case user ended up with different mac ranges than
intended. In 3.6 code validations were added to UI, where such MAC
will fail when user just opens DC edit dialog and confirm it without
any change.

description of sql udpate:
To be sure we touch only one letter parts of mac address, the
'from_mac' and 'to_mac' string are split using colon, then regex is
used to update single letter rows, then strings are concatenated
again.

Change-Id: I4a1b37da30ce4ad6d25c1d510eb5c09e17525f1b
Bug-Url: https://bugzilla.redhat.com/1286132
Signed-off-by: Martin Mucha <mmucha at redhat.com>
---
A packaging/dbscripts/upgrade/04_00_0120_fix_invalid_macs.sql
1 file changed, 20 insertions(+), 0 deletions(-)

Approvals:
  Martin Mucha: Verified
  Alona Kaplan: Looks good to me, approved; Passed CI tests



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a1b37da30ce4ad6d25c1d510eb5c09e17525f1b
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmucha 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: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list