Change in ovirt-engine[master]: core: remove redundant legacy check in create vm

Code Review gerrit at ovirt.org
Mon Feb 6 13:57:46 UTC 2017


>From Arik Hadas <ahadas at redhat.com>:

Arik Hadas has submitted this change and it was merged.

Change subject: core: remove redundant legacy check in create vm
......................................................................


core: remove redundant legacy check in create vm

Generally, we do not have validations in VDS command. That is because the bll
command validates that the operation can be executed and the locks it takes
ensures that this 'valid' state is preserved.

However, we have these annoying checks in create vm. Not only that these
checks are unexpected, but they also interact with the database - and this
has a performance penalty.

One of these checks that the status of the VM is different than ImageLocked.
In RunVm we validate that the VM is not in this status and then exclusively
lock the VM. So this check is relevant only if there is a flow in which the
VM is switched to ImageLocked without being locked by (in-memory) engine
lock. But now that we lock the VM before switching it to ImageLocked in
AddVmTemplate (see If4822f), there is no such flow so this check is
redundant and therefore removed.

Change-Id: I98d9ff00ec182b742f5a04c2866b7852f74c3e92
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/CreateVDSCommand.java
1 file changed, 0 insertions(+), 12 deletions(-)

Approvals:
  Shahar Havivi: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Arik Hadas: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98d9ff00ec182b742f5a04c2866b7852f74c3e92
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Sharon Gratch <sgratch at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list