Change in ovirt-engine[master]: core: Remove ImagesHandler.PerformImagesChecks

amureini at redhat.com amureini at redhat.com
Mon Apr 22 14:29:00 UTC 2013


Allon Mureinik has submitted this change and it was merged.

Change subject: core: Remove ImagesHandler.PerformImagesChecks
......................................................................


core: Remove ImagesHandler.PerformImagesChecks

After the recent changes, PerformImagesChecks had the following
functionality:
For each disk:
- GetImageInfo from VDSM
- if it does not exist, fail
- if it's status is different from the engine's status, update the
  engine's status.

Analyzing ImageStatus' different values, this validation is useless:
- OK: The engine did not issue any command regarding this image. It may
  have been manually removed from the storage itself, but that could
  also happen right after the check finishes successfully.
- LOCKED: The engine is in the middle of performing a command on the
  image. It's status in VDSM is meaningless, as it may change any moment
  now.
- ILLEGAL/INVALID: The engine issued a command on the image, and it was
  interrupted somehow (e.g., restart, network failure, etc.). The image
  may have been partly or fully compromised, and it cannot be trusted
  anyway.

In conclusion, this validation NEVER returns any useful information, and
thus could (and should!) be removed.
For good measures, an additional validation that the disks aren't
ILLEGAL in the engine side was added to the commands where it was
missing, just to be safe.

Change-Id: I983a4c3a016909385ec16f21803ef3a82e4dcaf6
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
5 files changed, 3 insertions(+), 67 deletions(-)

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/14114
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I983a4c3a016909385ec16f21803ef3a82e4dcaf6
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Alissa Bonas <abonas at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>



More information about the Engine-commits mailing list