Bug 1969855 - [RFE] Update ovirt_vm module to allow setting multiple hosts for PlacementPolicy when affinity is "pinned"
Summary: [RFE] Update ovirt_vm module to allow setting multiple hosts for PlacementPol...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-ansible-collection
Version: 4.4.6
Hardware: All
OS: All
medium
high
Target Milestone: ovirt-4.4.7
: ---
Assignee: Martin Necas
QA Contact: Pavol Brilla
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-09 10:49 UTC by Antonio Romito
Modified: 2024-12-20 20:12 UTC (History)
5 users (show)

Fixed In Version: ovirt-ansible-collection-1.5.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-22 15:26:02 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-ansible-collection issues 200 0 None open ovirt_vm module and PlacementPolicy 2021-06-09 10:49:51 UTC
Github oVirt ovirt-ansible-collection pull 294 0 None open ovirt_vm: add placement_policy_hosts 2021-06-11 12:17:19 UTC
Red Hat Product Errata RHSA-2021:2866 0 None None None 2021-07-22 15:26:18 UTC

Description Antonio Romito 2021-06-09 10:49:51 UTC
Description of problem:

According to API it is possible to set PlacementPolicy with a list of Hosts.
http://ovirt.github.io/ovirt-engine-api-model/4.4/#types/vm_placement_policy
It is also possible to mark specific hosts in the GUI.

The ovirt_vm module does not allow that, the placement_policy parameter is a string that relates to the parameter "host" which is a string as well.
It is not possible to define several hosts.

According to an upstream issue[1] already reported the solution should be to separate the host parameter from the placement_policy and make placement_policy a dict (affinity and hosts).

[1] https://github.com/oVirt/ovirt-ansible-collection/issues/200


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


How reproducible:


Steps to Reproduce:
1. 
2.
3.

Actual results:

Unable to set multiple hosts with placement_policy

Expected results:

It should be possible to select multiple hosts when placement_policy affinity is set to "pinned".


Additional info:

Comment 7 Pavol Brilla 2021-07-16 11:11:15 UTC
Verified on
Installed Packages
ovirt-ansible-collection.noarch                                        1.5.3-1.el8ev                                        @rhv-4.4.7

...
    - name: Add placement policy with multiple hosts
      ovirt.ovirt.ovirt_vm:
        auth: "{{ ovirt_auth }}"
        name: vm_1
        placement_policy: pinned
        placement_policy_hosts:
          - host_1
          - host_2
....

Comment 11 errata-xmlrpc 2021-07-22 15:26:02 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 (Low: RHV Engine and Host Common Packages security update [ovirt-4.4.7]), 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-2021:2866


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