Bug 1375678 - Template/InstanceType migration mode (placement policy affinity) value has inconsistencies between webadmin/api/DB
Summary: Template/InstanceType migration mode (placement policy affinity) value has in...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.2
: 4.2.2.2
Assignee: Andrej Krejcir
QA Contact: Polina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-13 16:36 UTC by sefi litmanovich
Modified: 2018-04-27 07:23 UTC (History)
6 users (show)

Fixed In Version: ovirt-engine-4.2.2
Clone Of:
Environment:
Last Closed: 2018-04-27 07:23:00 UTC
oVirt Team: SLA
Embargoed:
dfediuck: ovirt-4.2?
rule-engine: planning_ack?
rule-engine: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 87228 0 model_4.2 MERGED Move VmPlacementPolicy field from Vm to VmBase 2018-02-07 17:10:18 UTC
oVirt gerrit 87229 0 master MERGED restapi: Expose migration support and pinning for templates and instance types 2018-02-12 12:59:06 UTC
oVirt gerrit 87281 0 model_4.2 MERGED Move VmPlacementPolicy field from Vm to VmBase 2018-02-07 17:15:48 UTC
oVirt gerrit 87308 0 master MERGED restapi: Update to model 4.3.7 2018-02-08 08:53:15 UTC
oVirt gerrit 87309 0 ovirt-engine-4.2 MERGED restapi: Update to model 4.2.29 2018-02-08 10:43:15 UTC
oVirt gerrit 87364 0 sdk_4.2 MERGED Update to model 4.2.29 and metamodel to 1.2.17 2018-02-08 18:59:33 UTC
oVirt gerrit 87494 0 ovirt-engine-4.2 MERGED restapi: Expose migration support and pinning for templates and instance types 2018-02-12 16:44:05 UTC

Description sefi litmanovich 2016-09-13 16:36:06 UTC
Description of problem:
In the instance type or template create/edit menu in webadmin, under the host tab, the option to choose the migration mode exist and is changeable.
This option should be reflected in API with the placement_policy attribute and affinity sub-attrbiute, same as it does for vms.
In practice changing the value via webadmin affects the DB as expected, but the attribute doesn't exist in API so cannot be edited using it.
Furthermore only with templates, the value that was set in webadmin and is changes in DB doesn't reflect in webadmin when you edit the template once more and always returns back to the default mode = 'Allow manual and automatic migration'

Version-Release number of selected component (if applicable):


How reproducible:
rhevm-4.0.4.2-0.1.el7ev.noarch

Steps to Reproduce:
1. Edit a template or an instance type.
2. Under Host tab choose 'migration mode' = Allow manual migration
3. call GET cmd via API for the template entity.

Actual results:
in DB the correct value is set (migration_support column in vm_static table is set to 1).
In webadmin - the value persists for instance type, but is reverted to 'Allow manual and automatic migration' for templates.
Via API the value isn't visible at all (tried all-content flag as well).

Expected results:
All values are aligned between webadmin-DB-API and are reflected properly.

Additional info:

Comment 1 Yaniv Kaul 2017-11-29 10:39:29 UTC
Is anyone looking at this? I assume not for 4.2.0?

Comment 2 Polina 2018-04-26 08:29:36 UTC
Verification is done on rhv-release-4.2.3-2-001.noarch

Verification steps:

In the existent template choose Host tab and change migration mode to 'Allow manual migration only'. Create the VM from thos template.
Results:
1. in postgres - 
   select migration_support from vm_static where vm_guid='aa257ee2-3594-49b8-93a3-5fca07ee7bdc';
   1
2. In UI the VM is created with 'Allow manual migration only'.
3. In get vms API - 
        <placement_policy>
            <affinity>user_migratable</affinity>
        </placement_policy>

Comment 3 Sandro Bonazzola 2018-04-27 07:23:00 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.