Hi,

I hope this is the correct group to ask this, it's not entirely clear where 
the issue lies.

I'm using the ovirt.ovirt.ovirt_disk module to upload a disk image to our 
ovirt system and attach to a VM.
This works when I run the playbook locally (on a test Alma8 host), but when 
I try to run it in AWX the task fails with the following error.

"exception": "Traceback (most recent call last):\n  File 
\"/tmp/ansible_ovirt.ovirt.ovirt_disk_payload_qoy8tx2r/ansible_ovirt.ovirt.ovirt_disk_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_disk.py\",
 
line 899, in main\n  File 
\"/tmp/ansible_ovirt.ovirt.ovirt_disk_payload_qoy8tx2r/ansible_ovirt.ovirt.ovirt_disk_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_disk.py\",
 
line 598, in upload_disk_image\n  File 
\"/tmp/ansible_ovirt.ovirt.ovirt_disk_payload_qoy8tx2r/ansible_ovirt.ovirt.ovirt_disk_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_disk.py\",
 
line 583, in upload_disk_image\nNameError: name 'client' is not defined\n",
  "msg": "name 'client' is not defined",

I also get the same error when I try to run the playbook from my test host 
against another remote test host.

I have the same version of the python3-ovirt-engine-sdk4 RPM (4.4.15-1) on 
the local test host (where the upload works) as I do on the AWX EE (and the 
other remote host) and also the latest ovirt collection on all hosts/EE.

The task looks like...

    - name: Upload KS config disk
      ovirt.ovirt.ovirt_disk:
        name: new_host_ks_config
        vm_id: "{{ new_vm_info.id }}"
        interface: virtio_scsi
        size: 10MiB
        format: cow
        image_path: "/var/build/disk_image.qcow2"
        storage_domain: "my_domain"
        auth: "{{ ovirt_auth }}"

All other tasks that use the ovirt modules work ok.
The /var/build/ path is being shared with the AWX EE, so it can 'see' the 
disk image to upload. 
As a test, I can upload the disk image to ovirt manually - if I then re-run 
the job in AWX, the upload task completes successfully, but obviously with 
no change as the disk image is already uploaded. The following tasks 
(including using ovirt modules) then continue as expected.

Any ideas as to why this upload task only works when running the playbook 
locally would be much appreciated. Please let me know if you need any more 
info.

Thanks
Rob

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2c1c011f-b259-4d1e-a47c-088318ea7e89n%40googlegroups.com.

Reply via email to