Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1969855

Summary: [RFE] Update ovirt_vm module to allow setting multiple hosts for PlacementPolicy when affinity is "pinned"
Product: Red Hat Enterprise Virtualization Manager Reporter: Antonio Romito <aromito>
Component: ovirt-ansible-collectionAssignee: Martin Necas <mnecas>
Status: CLOSED ERRATA QA Contact: Pavol Brilla <pbrilla>
Severity: high Docs Contact:
Priority: medium    
Version: 4.4.6CC: bdolezal, gdeolive, mnecas, mperina, pelauter
Target Milestone: ovirt-4.4.7Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: ovirt-ansible-collection-1.5.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-22 15:26:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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