{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/19130","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/19130/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/19130/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/19130/events","html_url":"https://github.com/ansible/ansible/issues/19130","id":194724573,"number":19130,"title":"module ovirt_clusters fails with 'NoneType' object has no attribute 'policy'","user":{"login":"jniederm","id":5278760,"avatar_url":"https://avatars.githubusercontent.com/u/5278760?v=3","gravatar_id":"","url":"https://api.github.com/users/jniederm","html_url":"https://github.com/jniederm","followers_url":"https://api.github.com/users/jniederm/followers","following_url":"https://api.github.com/users/jniederm/following{/other_user}","gists_url":"https://api.github.com/users/jniederm/gists{/gist_id}","starred_url":"https://api.github.com/users/jniederm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniederm/subscriptions","organizations_url":"https://api.github.com/users/jniederm/orgs","repos_url":"https://api.github.com/users/jniederm/repos","events_url":"https://api.github.com/users/jniederm/events{/privacy}","received_events_url":"https://api.github.com/users/jniederm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-09T23:46:58Z","updated_at":"2016-12-10T08:20:26Z","closed_at":null,"body":"Moved from https://github.com/ansible/ansible-modules-extras/issues/3685\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\ncloud/ovirt/ovirt_clusters.py\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\r\n```\r\n2.2.0.0\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nMention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\r\n-->\r\n\r\n##### OS / ENVIRONMENT\r\n<!---\r\nfedora 24\r\n-->\r\n\r\n##### SUMMARY\r\nFollowing snippet of playbook\r\n```yml\r\n  - name: Set CPU type for cluster\r\n    ovirt_clusters:\r\n     name: Default\r\n     cpu_type: Intel Haswell-noTSX Family\r\n     auth: \"{{ auth }}\" \r\n```\r\n\r\nproduces error\r\n\r\n```\r\nTASK [Set CPU type for cluster] ************************************************\r\ntask path: /home/jakub/src/ovirt-aux-scripts/automation/configure-engine.yml:18\r\nUsing module file /home/jakub/ansible-library/ovirt_clusters.py\r\n<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jakub\r\n<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1481140926.15-251862178298182 `\" && echo ansible-tmp-1481140926.15-251862178298182=\"` echo $HOME/.ansible/tmp/ansible-tmp-1481140926.15-251862178298182 `\" ) && sleep 0'\r\n<127.0.0.1> PUT /tmp/tmp4znDH6 TO /home/jakub/.ansible/tmp/ansible-tmp-1481140926.15-251862178298182/ovirt_clusters.py\r\n<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/jakub/.ansible/tmp/ansible-tmp-1481140926.15-251862178298182/ /home/jakub/.ansible/tmp/ansible-tmp-1481140926.15-251862178298182/ovirt_clusters.py && sleep 0'\r\n<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python2 /home/jakub/.ansible/tmp/ansible-tmp-1481140926.15-251862178298182/ovirt_clusters.py; rm -rf \"/home/jakub/.ansible/tmp/ansible-tmp-1481140926.15-251862178298182/\" > /dev/null 2>&1 && sleep 0'\r\nAn exception occurred during task execution. The full traceback is:\r\nTraceback (most recent call last):\r\n  File \"/tmp/ansible_dWQ5AL/ansible_module_ovirt_clusters.py\", line 552, in main\r\n    ret = clusters_module.create()\r\n  File \"/tmp/ansible_dWQ5AL/ansible_modlib.zip/ansible/module_utils/ovirt.py\", line 392, in create\r\n    if not self.update_check(entity):\r\n  File \"/tmp/ansible_dWQ5AL/ansible_module_ovirt_clusters.py\", line 473, in update_check\r\n    equal(self.param('serial_policy'), str(entity.serial_number.policy)) and\r\nAttributeError: 'NoneType' object has no attribute 'policy'\r\n\r\nfatal: [localhost]: FAILED! => {\r\n    \"changed\": false, \r\n    \"failed\": true, \r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"ballooning\": null, \r\n            \"comment\": null, \r\n            \"compatibility_version\": null, \r\n            \"cpu_arch\": null, \r\n            \"cpu_type\": \"Intel Haswell-noTSX Family\", \r\n            \"datacenter\": null, \r\n            \"description\": null, \r\n            \"fence_connectivity_threshold\": null, \r\n            \"fence_enabled\": null, \r\n            \"fence_skip_if_connectivity_broken\": null, \r\n            \"fence_skip_if_sd_active\": null, \r\n            \"gluster\": null, \r\n            \"ha_reservation\": null, \r\n            \"host_reason\": null, \r\n            \"ksm\": null, \r\n            \"ksm_numa\": null, \r\n            \"memory_policy\": null, \r\n            \"migration_auto_converge\": null, \r\n            \"migration_bandwidth\": null, \r\n            \"migration_bandwidth_limit\": null, \r\n            \"migration_compressed\": null, \r\n            \"migration_policy\": null, \r\n            \"name\": \"Default\", \r\n            \"network\": null, \r\n            \"poll_interval\": 3, \r\n            \"resilience_policy\": null, \r\n            \"rng_sources\": null, \r\n            \"scheduling_policy\": null, \r\n            \"serial_policy\": null, \r\n            \"serial_policy_value\": null, \r\n            \"spice_proxy\": null, \r\n            \"state\": \"present\", \r\n            \"switch_type\": null, \r\n            \"threads_as_cores\": null, \r\n            \"timeout\": 180, \r\n            \"trusted_service\": null, \r\n            \"virt\": null, \r\n            \"vm_reason\": null, \r\n            \"wait\": true\r\n        }, \r\n        \"module_name\": \"ovirt_clusters\"\r\n    }, \r\n    \"msg\": \"'NoneType' object has no attribute 'policy'\"\r\n}\r\n\r\n```\r\nVersion of ovirt_clusters.py: https://github.com/ansible/ansible/blob/87d26c4729686dcffdcfa742d0cd50821296905d/lib/ansible/modules/cloud/ovirt/ovirt_clusters.py\r\n\r\n@machacekondra please have a look"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/266189506","html_url":"https://github.com/ansible/ansible/issues/19130#issuecomment-266189506","issue_url":"https://api.github.com/repos/ansible/ansible/issues/19130","id":266189506,"user":{"login":"machacekondra","id":3384302,"avatar_url":"https://avatars.githubusercontent.com/u/3384302?v=3","gravatar_id":"","url":"https://api.github.com/users/machacekondra","html_url":"https://github.com/machacekondra","followers_url":"https://api.github.com/users/machacekondra/followers","following_url":"https://api.github.com/users/machacekondra/following{/other_user}","gists_url":"https://api.github.com/users/machacekondra/gists{/gist_id}","starred_url":"https://api.github.com/users/machacekondra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/machacekondra/subscriptions","organizations_url":"https://api.github.com/users/machacekondra/orgs","repos_url":"https://api.github.com/users/machacekondra/repos","events_url":"https://api.github.com/users/machacekondra/events{/privacy}","received_events_url":"https://api.github.com/users/machacekondra/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T08:20:26Z","updated_at":"2016-12-10T08:20:26Z","body":"resolved_by_pr 18964"}}
{"actor":{"display_login":"machacekondra"}}