Bug 1748025
| Summary: | ovirt_host_facts module returns wrong hrefs in nested values | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Jan Zmeskal <jzmeskal> |
| Component: | ansible | Assignee: | Ondra Machacek <omachace> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | Pavol Brilla <pbrilla> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 4.3.5 | CC: | lsvaty, mperina, pelauter |
| Target Milestone: | ovirt-4.3.8 | Keywords: | ZStream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | ansible-2.9.1 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-09 12:46:47 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: | |||
Very similar issue is raised by ovirt_cluster_facts module: Permissions returned 'null' in 'href' key. However, when inspecting the RHV API, it is 'SuperUser' role of user 'admin' - that why I think it is same as one above for ovirt_hosts_facts Persmission has only correct ids, href links were removed from modules. Installed Packages rhvm.noarch 4.3.8.1-0.1.master.el7 @rhv-4.3.8 [root@10-37-138-97 ~]# ansible --version ansible 2.9.2 |
Description of problem: When you execute ovirt_host_facts module against an engine, some of the returned nested values (specifically hrefs) are wrong. Version-Release number of selected component (if applicable): rhvm-4.3.5.5-0.1.el7.noarch ansible-2.8.4-1.el7ae.noarch python-ovirt-engine-sdk4-4.3.2-1.el7ev.x86_64 How reproducible: 100 % Steps to Reproduce: 1. Have a playbook that extracts facts about one of your hosts. Example here: - name: Test ovirt module hosts: localhost tasks: - ovirt_auth: url: https://<engine_url>/ovirt-engine/api username: admin@internal password: <password> insecure: yes - ovirt_host_facts: auth: "{{ ovirt_auth }}" fetch_nested: yes pattern: "name=host_mixed_1" all_content: no - debug: var: ovirt_hosts 2. Run the playbook 3. Examine the returned value Actual results: 1. First problem is in 'permissions' key of 'ovirt_hosts' fact. This is what is returned by Ansible: https://pastebin.com/YWdjs99d This is what can be seen in API: https://pastebin.com/CmFNxFFs As you can see, one of the permissions returned 'null' in 'href' key. However, when inspecting the RHV API, the same permission has valid href that can be followed when put into address line in browser. By following it, I found out that it is 'SuperUser' role of user 'admin'. I also did the same experiment at another RHV engine (of version 4.3.6) and observed the same. 2. There's a different 'href' for network attachment in returned ansible value and in API. This is returned by ansible: https://pastebin.com/JVN6iSFv This can be seen in API: https://pastebin.com/SEeuRNeh Expected results: Values returned by running ovirt_host_facts and those acquired by querying API should be consistent.