-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Error when removing VM with ovirt_vms #19801
Comments
The problem is that oVirt Python SDK doesn't check the HTTP return code. In this case it will get 404, with no body, so the XmlReader will fail. Actually this is bug in both oVirt Python SDK and the ovirt.py module in |
So I've checked and you are using Python SDK version 4.0.0 or lower, right? Please update to latest 4.0 version, which is 4.0.4, and it will work right: |
Please close if oVirt Python SDK update solves the issue for you. |
@atgreen Any news? |
I know it's just remotely related, but I just experienced a similar error when playing around with When trying to run the
The reason was, that I forgot to specify the Maybe this should be discussed in a different issue? |
This is something we should fix in Python SDK for oVirt. Can you please open an issue here, requesting to do a URL check, whether it's in correct format? THanks! |
Thanks for your reply. Just for reference, I opened https://bugzilla.redhat.com/show_bug.cgi?id=1440292 |
notabug |
ISSUE TYPE
COMPONENT NAME
ovirt_vms
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Fedora 25
SUMMARY
When I try to remove a VM like so...
delegate_to: localhost
ovirt_vms:
auth:
username: admin@internal
password: XXXXX
url: https://10.0.0.3/ovirt-engine/api
insecure: true
state: absent
name: rhel7-base-vm
wait: true
I get...
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_oqYJc_/ansible_module_ovirt_vms.py", line 891, in main
ret = vms_module.remove()
File "/tmp/ansible_oqYJc_/ansible_modlib.zip/ansible/module_utils/ovirt.py", line 540, in remove
poll_interval=self.module.params['poll_interval'],
File "/tmp/ansible_oqYJc/ansible_modlib.zip/ansible/module_utils/ovirt.py", line 273, in wait
entity = service.get()
File "/usr/lib64/python2.7/site-packages/ovirtsdk4/services.py", line 18259, in get
self._check_fault(response)
File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 89, in _check_fault
xmlreader = xml.XmlReader(buf)
Exception: Can't read first node
fatal: [10.0.0.3 -> localhost]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"boot_devices": null,
"cd_iso": null,
"clone": false,
"clone_permissions": false,
"cloud_init": null,
"cloud_init_nics": null,
"cluster": null,
"cpu_cores": null,
"cpu_shares": null,
"cpu_sockets": null,
"delete_protected": null,
"disks": [],
"fetch_nested": false,
"force": false,
"high_availability": null,
"host": null,
"id": null,
"memory": null,
"memory_guaranteed": null,
"name": "rhel7-base-vm",
"nested_attributes": null,
"nics": [],
"operating_system": null,
"poll_interval": 3,
"state": "absent",
"stateless": null,
"sysprep": null,
"template": null,
"template_version": null,
"timeout": 180,
"type": null,
"use_latest_template_version": null,
"wait": true
},
"module_name": "ovirt_vms"
},
"msg": "Can't read first node"
}
The VM is deleted, but I get this error.
STEPS TO REPRODUCE
Run the task above
EXPECTED RESULTS
The VM should be deleted without error
ACTUAL RESULTS
See above.
The text was updated successfully, but these errors were encountered: