Change in ovirt-engine[ovirt-engine-4.0]: core: Fix match disk profile to storage domain

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Wed Sep 7 12:31:08 UTC 2016


Piotr Kliczewski has submitted this change and it was merged.

Change subject: core: Fix match disk profile to storage domain
......................................................................


core: Fix match disk profile to storage domain

Problem cause:

A. When a template has a disk which is allocated to more than one
storage domain, it will contain for that disk image:
 - A list of storage domains
 - A list of disk profiles that belong to each storage domain

B. Creating a VM from that template using REST will :
 - Select the first storage domain from the list
 - Select the first disk profile from the list

Note : VM creation via UI selects a specific storage domain and a
specific disk profile which is associated with that storage domain.
There is no option to leave these values empty -
unlike a REST call where these values can be dismissed.

Consequence:
In cases where the selected disk profile is not associated with
the selected storage domain -
the VM will not be created due to this inconsistency.

Fix:
The disk profile is selected according to the selected
storage domain (out of the possible storage domains).

Change-Id: I2fd4b91842d8f8f6de5cb5e5a538e335c0fcfede
Bug-Url: https://bugzilla.redhat.com/1361838
Signed-off-by: yquinn <yquinn at redhat.com>
(cherry picked from commit 276df6effc6d14bc99fec4f75dfef97f30ef8d0d)
Signed-off-by: Yanir Quinn <yquinn at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java
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/CommonVmPoolWithVmsCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/exportimport/ImportVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/exportimport/ImportVmFromExternalProviderCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/exportimport/ImportVmTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/profiles/DiskProfileHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AddDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/MoveOrCopyDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/UpdateVmDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RegisterDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/StorageDomainCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/lsm/LiveMigrateVmDisksCommand.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/profiles/DiskProfileHelperTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/EngineMessage.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M frontend/webadmin/modules/frontend/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
20 files changed, 247 insertions(+), 32 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Roy Golan: Looks good to me, approved
  Yanir Quinn: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fd4b91842d8f8f6de5cb5e5a538e335c0fcfede
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Yanir Quinn <yquinn at redhat.com>
Gerrit-Reviewer: Andrej Krejcir <akrejcir at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenny Tokar <jtokar at redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Phillip Bailey <phbailey at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Roman Mohr <rmohr at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yanir Quinn <yquinn at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list