Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ovirt_cluster, failing with the "TypeError" on the ovirtsdk4 library #37425

Closed
mkrish004c opened this issue Mar 14, 2018 · 3 comments
Closed
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. ovirt oVirt and RHV community support:community This issue/PR relates to code supported by the Ansible community.

Comments

@mkrish004c
Copy link

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ovirt_cluster:

ANSIBLE VERSION
Ansible 2.4.1.0 
CONFIGURATION
COMMAND_WARNINGS(/etc/ansible/ansible.cfg) = False
DEFAULT_CALLBACK_PLUGIN_PATH(/etc/ansible/ansible.cfg) = [u'/usr/lib/python2.7/site-packages/ansible/plugins/callback']
DEFAULT_CALLBACK_WHITELIST(/etc/ansible/ansible.cfg) = ['logstash']
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
DEPRECATION_WARNINGS(/etc/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 30
SYSTEM_WARNINGS(/etc/ansible/ansible.cfg) = False
OS / ENVIRONMENT

RHEL 7.3

SUMMARY

Ovirt_cluster module is failing every time with python "TypeError" on ovirtsdk4 modules.

STEPS TO REPRODUCE
- name: set cluster policies
  ovirt_cluster:
    auth: "{{ ovirt_auth }}"
    name: "{{ rhv_cluster_name }}"
    data_center: "{{ rhv_datacenter_name }}"
    cpu_arch: x86_64
    cpu_type: Intel Broadwell-noTSX Family
    mac_pool: Default
    scheduling_policy: evenly_distributed
    threads_as_cores: true
EXPECTED RESULTS

Expect the Cluster should be created.

ACTUAL RESULTS

But ends with below TypeError from the module library,

{
    "_ansible_parsed": true,
    "exception": "Traceback (most recent call last):\n  File \"/tmp/ansible_9Sutik/ansible_module_ovirt_cluster.py\", line 594, in main\n    ret = clusters_module.create()\n  File \"/tmp/ansible_9Sutik/ansible_modlib.zip/ansible/module_utils/ovirt.py\", line 545, in create\n    new_entity = self.build_entity()\n  File \"/tmp/ansible_9Sutik/ansible_module_ovirt_cluster.py\", line 460, in build_entity\n    self.param('cpu_arch') or self.param('cpu_type')\n  File \"/usr/lib64/python2.7/site-packages/ovirtsdk4/types.py\", line 804, in __init__\n    self.architecture = architecture\n  File \"/usr/lib64/python2.7/site-packages/ovirtsdk4/types.py\", line 913, in architecture\n    Struct._check_type('architecture', value, Architecture)\n  File \"/usr/lib64/python2.7/site-packages/ovirtsdk4/__init__.py\", line 128, in _check_type\n    expected=expected.__name__,\nTypeError: The type 'str' isn't valid for attribute 'architecture', it must be 'Architecture'\n",
    "_ansible_no_log": false,
    "changed": false,
    "failed": true,
    "invocation": {
        "module_args": ""
    },
    "msg": "The type 'str' isn't valid for attribute 'architecture', it must be 'Architecture'"
}
@ansibot
Copy link
Contributor

ansibot commented Mar 14, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Mar 14, 2018

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. virt Virt community (incl. QEMU, KVM, libvirt, ovirt, RHV and Proxmox) support:community This issue/PR relates to code supported by the Ansible community. labels Mar 14, 2018
mkrish004c pushed a commit to mkrish004c/ansible that referenced this issue Mar 14, 2018
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Mar 15, 2018
ansibot pushed a commit that referenced this issue Mar 21, 2018
* ovrit_cluster: fix for CPU arch entity #37425

* Corrected Indentation

* Condition to check if `architecture` is defined
@machacekondra
Copy link
Contributor

resolved_by_pr 37436

@ansibot ansibot closed this as completed Mar 29, 2018
machacekondra pushed a commit to machacekondra/ansible that referenced this issue Apr 5, 2018
* ovrit_cluster: fix for CPU arch entity ansible#37425

* Corrected Indentation

* Condition to check if `architecture` is defined
nitzmahone pushed a commit that referenced this issue Apr 9, 2018
* ovirt_host_networks: Fix idempotency

* ovirt_hosts: Fix failed_state after PM fence

* ovirt_host_networks: Fix of bond assignment (#38054)

* ovirt_host_networks: Fix of bond assignment

* ovirt_host_networks: Fix bond modes

* ovirt_host_networks: Fix incorrect prefix documentation

* ovrit_cluster: fix for CPU arch entity #37425 (#37436)

* ovrit_cluster: fix for CPU arch entity #37425

* Corrected Indentation

* Condition to check if `architecture` is defined
@dagwieers dagwieers added ovirt oVirt and RHV community and removed virt Virt community (incl. QEMU, KVM, libvirt, ovirt, RHV and Proxmox) labels Feb 28, 2019
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. ovirt oVirt and RHV community support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

No branches or pull requests

5 participants