Bug 1651406 - [RFE] Allow Maintenance of Host with Enforcing VM Affinity Rules (hard affinity)
Summary: [RFE] Allow Maintenance of Host with Enforcing VM Affinity Rules (hard affinity)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.2.7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.4.0
: ---
Assignee: Andrej Krejcir
QA Contact: Polina
URL:
Whiteboard:
Depends On:
Blocks: 1670073 1712353 1717007
TreeView+ depends on / blocked
 
Reported: 2018-11-20 00:40 UTC by Ameya Charekar
Modified: 2020-08-04 13:16 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
The current release enables you to migrate a group of virtual machines (VMs) that are in positive enforcing affinity with each other. * You can use the new checkbox in the Migrate VM dialog to migrate this type of affinity group. * You can use the following REST API to migrate this type of affinity group: http://ovirt.github.io/ovirt-engine-api-model/4.4/#services/vm/methods/migrate/parameters/migrate_vms_in_affinity_closure. * Putting a host into maintenance also migrates this type of affinity group.
Clone Of:
: 1670073 1712353 (view as bug list)
Environment:
Last Closed: 2020-08-04 13:16:18 UTC
oVirt Team: Virt
Target Upstream Version:
mavital: testing_plan_complete+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3828691 0 None None None 2019-02-01 17:01:07 UTC
Red Hat Product Errata RHSA-2020:3247 0 None None None 2020-08-04 13:16:43 UTC
oVirt gerrit 97253 0 'None' MERGED scheduler: create SchedulingContext 2020-10-20 15:24:10 UTC
oVirt gerrit 97254 0 'None' MERGED core: Add option to ignore hard affinity groups when putting host to maintenance 2020-10-20 15:24:22 UTC
oVirt gerrit 97287 0 'None' MERGED scheduler: create SchedulingContext 2020-10-20 15:24:10 UTC
oVirt gerrit 97288 0 'None' MERGED core: Add option to ignore hard affinity groups when putting host to maintenance 2020-10-20 15:24:10 UTC
oVirt gerrit 97362 0 'None' ABANDONED scheduler: create SchedulingContext 2020-10-20 15:24:10 UTC
oVirt gerrit 97363 0 'None' ABANDONED core: Add option to ignore hard affinity groups when putting host to maintenance 2020-10-20 15:24:10 UTC
oVirt gerrit 97370 0 'None' MERGED core: Moving host to maintenance first tries to migrate VM with affinity and then without. 2020-10-20 15:24:10 UTC
oVirt gerrit 98266 0 'None' MERGED scheduler: change order of parameters of PolicyUnitImpl::score 2020-10-20 15:24:10 UTC
oVirt gerrit 98267 0 'None' ABANDONED scheduler: Small change to make SchedulingManager.selectBestHost more efficient 2020-10-20 15:24:10 UTC
oVirt gerrit 98268 0 'None' MERGED scheduler: Fetch numa nodes from DB before running policy units. 2020-10-20 15:24:23 UTC
oVirt gerrit 98269 0 'None' ABANDONED scheduler: Move scheduling methods to a separate class 2020-10-20 15:24:24 UTC
oVirt gerrit 98270 0 'None' MERGED scheduler: Move RunVmDelayer call to SchedulingManager from MemoryPolicyUnit 2020-10-20 15:24:11 UTC
oVirt gerrit 98271 0 'None' MERGED scheduler: Remove recursion when fitting numa nodes 2020-10-20 15:24:11 UTC
oVirt gerrit 98275 0 'None' MERGED scheduler: Schedule multiple VMs at the same time 2020-10-20 15:24:11 UTC
oVirt gerrit 98639 0 'None' MERGED scheduler: Do not subtract resources of currently scheduled VM from host where it is running 2020-10-20 15:24:12 UTC
oVirt gerrit 98665 0 'None' ABANDONED core: Expose method to allow running multiple commands only if all validations pass. 2020-10-20 15:24:12 UTC
oVirt gerrit 98920 0 'None' MERGED core: Add MigrateMultipleVms command and use it for host maintenance 2020-10-20 15:24:12 UTC
oVirt gerrit 99357 0 'None' MERGED scheduler: change order of parameters of PolicyUnitImpl::score 2020-10-20 15:24:25 UTC
oVirt gerrit 99358 0 'None' MERGED scheduler: Fetch numa nodes from DB before running policy units. 2020-10-20 15:24:12 UTC
oVirt gerrit 99359 0 'None' MERGED scheduler: Do not subtract resources of currently scheduled VM from host where it is running 2020-10-20 15:24:12 UTC
oVirt gerrit 99458 0 'None' MERGED vm-migrate: Add checkbox to select if other vms in affinity should be migrated too 2020-10-20 15:24:25 UTC
oVirt gerrit 99459 0 'None' MERGED Add new parameters to HostsService.List and VmService.Migrate 2020-10-20 15:24:14 UTC
oVirt gerrit 99460 0 'None' MERGED core: Remove unused code from GetValidHostsForVmsParameters and GetValidHostsForVmsQuery 2020-10-20 15:24:25 UTC
oVirt gerrit 99461 0 'None' MERGED core: A VM can be migrated together with others in positive affinity 2020-10-20 15:24:13 UTC
oVirt gerrit 99655 0 'None' MERGED scheduler: Move RunVmDelayer call to SchedulingManager from MemoryPolicyUnit 2020-10-20 15:24:13 UTC
oVirt gerrit 99656 0 'None' MERGED scheduler: Remove recursion when fitting numa nodes 2020-10-20 15:24:13 UTC
oVirt gerrit 99735 0 'None' MERGED restapi: Update to model 4.4.0 2020-10-20 15:24:13 UTC
oVirt gerrit 99845 0 'None' MERGED Revert "core: Add MigrateMultipleVms command and use it for host maintenance" 2020-10-20 15:24:14 UTC
oVirt gerrit 99859 0 'None' MERGED core: Add MigrateMultipleVms command and use it for host maintenance 2020-10-20 15:24:14 UTC
oVirt gerrit 100094 0 'None' MERGED Add new parameters to HostsService.List and VmService.Migrate 2020-10-20 15:24:07 UTC
oVirt gerrit 100096 0 'None' MERGED scheduler: Schedule multiple VMs at the same time 2020-10-20 15:24:07 UTC
oVirt gerrit 100097 0 'None' MERGED core: Remove unused code from GetValidHostsForVmsParameters and GetValidHostsForVmsQuery 2020-10-20 15:24:07 UTC
oVirt gerrit 100098 0 'None' MERGED core: Add MigrateMultipleVms command and use it for host maintenance 2020-10-20 15:24:07 UTC
oVirt gerrit 100099 0 'None' MERGED core: A VM can be migrated together with others in positive affinity 2020-10-20 15:24:08 UTC
oVirt gerrit 100223 0 'None' MERGED scheduling: Improve logging in CPU passthrough policy unit 2020-10-20 15:24:08 UTC
oVirt gerrit 100271 0 'None' ABANDONED restapi: Update to model 4.3.23 2020-10-20 15:24:21 UTC
oVirt gerrit 100316 0 'None' MERGED scheduling: Improve logging in CPU passthrough policy unit 2020-10-20 15:24:08 UTC
oVirt gerrit 100372 0 'None' MERGED core: Fix incorrectly rebased code 2020-10-20 15:24:08 UTC
oVirt gerrit 100391 0 'None' MERGED restapi: Update to model 4.3.23 2020-10-20 15:24:09 UTC
oVirt gerrit 100510 0 'None' MERGED restapi: Update to model 4.4.1 2020-10-20 15:24:09 UTC
oVirt gerrit 100511 0 'None' MERGED scheduler: Fix Guid != comparison 2020-10-20 15:24:09 UTC
oVirt gerrit 100512 0 'None' MERGED restapi: Update to model 4.3.24 2020-10-20 15:24:09 UTC
oVirt gerrit 100530 0 'None' MERGED scheduler: Fix Guid != comparison 2020-10-20 15:24:22 UTC
oVirt gerrit 100564 0 'None' MERGED scheduler: Fix Guid != comparison 2020-10-20 15:24:09 UTC

Description Ameya Charekar 2018-11-20 00:40:49 UTC
1. Proposed title of this feature request
Allow Maintenance of Host with Positive Enforcing VM Affinity Rules.

3. What is the nature and description of the request?
Currently by design it is not allowed to break a hard affinity rule to migrate VMs to place host in maintenance mode and it behaves as if 2 or more VMs were pinned to the same host. Request is to allow placing such host in maintenance mode by migrating all VMs.

4. Why does the customer need this? (List the business requirements here)
We are creating an integrated product based on RHHI/RHV which will be installed as part of several isolated networks around the world and the system is expected to work under most extreme circumstances (including, but not limited to, man and nature originating national and international disasters). As such, not all admins/users using the system will be RHV experts so the user experience should be as smooth as possible. The requirement to make affinity rule non-enforcing, then put host to maintenance, then reset the affinity rule back to enforcing has two steps too many that might cause a user to lose time during emergency or, if distracted (which is likely under extreme circumstances), may not remember reset the affinity rule back to enforcing, causing hard-to-find issues later on if the tightly-coupled VMs end up running on separate hosts.

5. How would the customer like to achieve this? (List the functional requirements here)
It must be possible to put a Host to Maintenance even if VMs with Hard Positive VM Polarity are running on it provided that there are resources on other Hosts where they can be migrated, without the admin/user/script needing to tweak Affinity Rules during this operation.

6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.
Yes.

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?
I am not able to find any.

8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?
Preferably as a part an RHV 4.2 errata but if that is not feasible then as part of RHV 4.3. First half of 2019 is when we ideally would like to have this feature available.

9. Is the sales team involved in this request and do they have any additional input?
No.

10. List any affected packages or components.
ovirt-engine.

11. Would the customer be able to assist in testing this functionality if implemented?
Yes.

Comment 2 Ryan Barry 2018-11-20 16:12:22 UTC
This is extremely unlikely to make a 4.2 stream. 4.3 may be possible, but has soft affinity been looked at? Soft affinity (both host to VM and VM to VM) may provide an immediate resolution. This sounds extremely similar to the requirements which produced https://bugzilla.redhat.com/show_bug.cgi?id=1392393

Comment 18 Ryan Barry 2019-01-21 14:53:50 UTC
Re-targeting to 4.3.1 since it is missing a patch, an acked blocker flag, or both

Comment 20 Michal Skrivanek 2019-01-23 13:17:11 UTC
This applies to both affinity and anti-affinity. anti-affinity is going to work better, but still there will be times when the rules won't be enforced. Maintenance will have priority and if there is not enough hosts the system won't be able to distribute (or keep together) VMs properly. This should fix automatically once the host is brought back as the host becomes operational and empty/available for scheduling, though we will not attempt to restore the VM distribution exactly as it was.
I propose to turn this behavior on by default in 4.3, and have an engine-config toggle to switch this off if anyone finds this new behavior problematic

Comment 21 Michal Skrivanek 2019-01-25 10:12:28 UTC
merged to 4.3

Comment 22 Michal Skrivanek 2019-01-28 14:31:37 UTC
more patches are coming to 4.3

Comment 24 Sandro Bonazzola 2019-02-01 14:54:28 UTC
Not blocking ovirt-4.3.0 on this. Moving to 4.3.1.

Comment 28 Michal Skrivanek 2019-03-19 12:35:48 UTC
negative affinity works (fixed also in 4.2.8-1)
positive affinity needs a bit more work

Comment 30 Polina 2019-04-28 12:06:42 UTC
Verified on ovirt-engine-4.3.3.6-0.0.master.20190416081415.git5975555.el7.noarch

In the following cases the host maintenance is allowed:

1. Hard VM Positive and no Host Polarity 
2. Soft VM Positive and no Host Polarity
3. Hard VM Positive and Soft Positive host
3. Soft VM Positive and Soft Positive host

Comment 36 RHEL Program Management 2019-12-05 07:01:52 UTC
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.

Comment 37 RHV bug bot 2019-12-13 13:15:49 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops@redhat.comINFO: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops@redhat.com

Comment 38 RHV bug bot 2019-12-20 17:45:23 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops@redhat.comINFO: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops@redhat.com

Comment 39 RHV bug bot 2020-01-08 14:47:43 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops@redhat.comINFO: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops@redhat.com

Comment 40 RHV bug bot 2020-01-08 15:17:08 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops@redhat.comINFO: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops@redhat.com

Comment 42 RHV bug bot 2020-01-24 19:49:26 UTC
WARN: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops@redhat.comINFO: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops@redhat.com

Comment 46 errata-xmlrpc 2020-08-04 13:16:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: RHV Manager (ovirt-engine) 4.4 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2020:3247


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