Bug 1597537 - [RFE] please add vnic profile configuration to oVirt modules.
Summary: [RFE] please add vnic profile configuration to oVirt modules.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ansible
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.3.6
: 4.3.6
Assignee: Martin Necas
QA Contact: Pavol Brilla
URL: https://github.com/ansible/ansible/pu...
Whiteboard:
Depends On: 1720487
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-03 07:45 UTC by Moran Goldboim
Modified: 2019-10-25 13:54 UTC (History)
6 users (show)

Fixed In Version: ansible-2.8.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-25 13:54:41 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ansible ansible issues 42233 0 'None' closed please add vnic profile configuration to oVirt modules. 2020-10-20 11:35:15 UTC
Github ansible ansible pull 44716 0 'None' closed ovirt add vnic 2020-10-20 11:35:16 UTC
Github ansible ansible pull 57936 0 'None' closed Ovirt vnic profile fix 2020-10-20 11:35:16 UTC
Github ansible ansible pull 58058 0 'None' closed Ovirt vnic profile fix backport 2020-10-20 11:35:16 UTC
Github ansible ansible pull 60198 0 'None' closed Ovirt vnic profile fix backport 2020-10-20 11:35:16 UTC

Description Moran Goldboim 2018-07-03 07:45:02 UTC
Description of problem:
vNic profiles are needed to configure no-mac-spoofing which is a parameter required for certain applications. adding it to the Ansible modules would enable a more complete deployment flow, like in the case of deploying Openstack control plane and undercloud on top of RHV infra

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

https://github.com/ansible/ansible/issues/42233

Comment 1 Martin Perina 2018-09-03 15:10:36 UTC
For now moving to RHV 4.3, we will retarget when we know exactl Ansible version containing this fix

Comment 2 Dan Kenigsberg 2018-09-05 07:34:53 UTC
Trusting you, Martin, to deliver this as soon as possible.

Comment 3 Martin Necas 2018-09-05 08:20:41 UTC
I'm waiting for the PR to be confirmed and merged.

Comment 4 Martin Perina 2018-09-05 10:48:11 UTC
(In reply to Dan Kenigsberg from comment #2)
> Trusting you, Martin, to deliver this as soon as possible.

Unfortunately Ansible 2.7 is closed already, so it will be part of 2.8.

Comment 7 Lucie Leistnerova 2019-06-13 11:36:54 UTC
The module doesn't work correctly.

1. running the same playbook returns error

Steps to reproduce:
1. run playbook

    - name: test
      ovirt_vnic_profile:
        auth: "{{ ovirt_auth }}"
        data_center: "Default"
        name: "test"
        network: "ovirtmgmt"
        description: "it is a test"
        state: present
2. first run works ok, creates vnic profile
3. run the same playbook again - it should finish successfully and nothing is changed

Error: FAILED! => {"changed": false, "msg": "'NoneType' object has no attribute 'name'"}

And also I can't add vnic profile with the same name to different network - same error.
When I change something else e.g. description, it works. 


2. removing vnic ignores network definition

Steps to reproduce:
1. create new network 'test'
2. run playbook
    - name: test
      ovirt_vnic_profile:
        auth: "{{ ovirt_auth }}"
        data_center: "Default"
        name: "test2"
        network: "test"
        description: "it is a test"
        state: present
3. vnic profile test2 created in network test
4. run playbook
    - name: test
      ovirt_vnic_profile:
        auth: "{{ ovirt_auth }}"
        data_center: "Default"
        name: "test2"
        network: "ovirtmgmt"
        description: "it is a test"
        state: absent

Vnic profile from network test is removed, but it shouldn't do nothing.


Tested in ansible-2.8.1-1.el7ae.noarch

Comment 9 Lucie Leistnerova 2019-07-16 07:31:49 UTC
Issue 1. from Comment 7 still doesn't work.
Running same playbook with no changes returns 'NoneType' object has no attribute 'name'. When I change at least description, it works.

How do I remove already set custom property? "" as value doesn't work.

There is discrepancy how Passthrough + Network filter/Port mirroring works
- Have vnic with pass_through: disabled
  run playbook with:
    pass_through: enabled
    network_filter: "allow-dhcp"
  error returned: Cannot edit VM network interface profile. 'Port Mirroring,'Qos' and 'Network Filter' are not supported on passthrough profiles.
  run playbook with:
    pass_through: enabled
    port_mirroring: yes
  no error, Passthrough checked, Port mirroring not
- both should return same error

Can't set qos
- Have DC with quota enforced, create VM network qos 'test_vm', I see that option in admin portal by the vnic
  run playbook with:
        qos: test_vm
  error returned: 'NoneType' object has no attribute 'name'

Can't change migratable to 'no'
- Have vnic with Passthrough and Migratable checked
  run playbook with:
    pass_through: enabled
    migratable: no
  no error, changed=1 but in admin portal Migratable still checked
- from no -> yes it works
- when creating new vnic, it also works


Tested in ansible-2.8.2-1.el7ae.noarch

And there are mistakes in documentation
https://docs.ansible.com/ansible/latest/modules/ovirt_vnic_profile_module.html#ovirt-vnic-profile-module

in Examples
twice the task: Editing vNICs network_filter, custom_properties, qos
in task: Dont use migratable
  - migratable: False -> no

Comment 10 Sandro Bonazzola 2019-08-27 06:34:08 UTC
ansible-2.8.4 has been released, please check the fix was included.

Comment 11 Pavol Brilla 2019-08-29 11:31:28 UTC
All main scenarios + scenarios from previous comments 


Tested both are working: False and no
- migratable: False -> no 

Verified on:
ansible --version
ansible 2.8.4

Comment 12 Sandro Bonazzola 2019-10-25 13:54:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of CURRENT RELEASE.

For information on the advisory, 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-2019:2543


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