Roy Golan has submitted this change and it was merged.
Change subject: engine: Fix migration policy update for running VM
......................................................................
engine: Fix migration policy update for running VM
Problem description:
--------------------
When a VM is running and its migration policy is changed to pinned - OR
A pinned VM is running and it dedicated hosts list is modified.
The VM may running on un-dedicated host, locking the VM away from its
dedicated host. Requiring VM reboot.
Desired behavior:
-----------------
1. When a VM is running and changing migration policy from un-pinned
to pinned.
- Validate the VM is running on one of the targeted pinned hosts,
- Fail with adequate warning.
- Proceed with normal update.
2. When pinned VM is running and changing the list of dedicated hosts.
And the dedicated hosts list excluding the pinned host.
- Validate the VM is running on one of the targeted pinned hosts,
- Fail with adequate warning.
- Proceed with normal update.
Implementation:
--------------
Add canDoAction constraint on modify a pinned VM, if it is running -
must run on its dedicated host. (UpdateVmCommand.java)
Change-Id: Ib3dc32a2b92ea0d111328eb6a6803fa91c015836
Bug-Url:
https://bugzilla.redhat.com/1058384
Signed-off-by: Dudi Maroshi <dudi(a)redhat.com>
Signed-off-by: Andrej Krejcir <akrejcir(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmValidator.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmCommandTest.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/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
7 files changed, 120 insertions(+), 2 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Roy Golan: Looks good to me, approved
Andrej Krejcir: Verified
--
To view, visit
https://gerrit.ovirt.org/44289
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3dc32a2b92ea0d111328eb6a6803fa91c015836
Gerrit-PatchSet: 28
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Dudi Maroshi
Gerrit-Reviewer: Andrej Krejcir <akrejcir(a)redhat.com>
Gerrit-Reviewer: Dudi Maroshi
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Roman Mohr <rmohr(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>