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_disk: Unable to detach a direct LUN (works fine via ovirt GUI) #140

Open
mattpoel opened this issue Oct 8, 2020 · 4 comments
Open
Labels
bug Something isn't working

Comments

@mattpoel
Copy link

mattpoel commented Oct 8, 2020

SUMMARY

I'm trying to detach direct LUNs from VMs using Ansible / ovirt_disk. The detach process itself works fine in the ovirt GUI, but when I'm trying to use ovirt_disk it runs into the default timeout of 180s.

COMPONENT NAME

ovirt_disk

STEPS TO REPRODUCE
  - name: "ovirt -> Detach Direct LUNs"
    delegate_to: localhost
    ovirt_disk:
      auth: "{{ ovirt_auth }}"
      name: "testcl_LUN01"
      vm_name: "testcl1"
      state: detached
    tags: ovirt_configure_direct_luns
EXPECTED RESULTS

LUN gets detached.

ACTUAL RESULTS

Ansible runs into the default timeout of 180s.

TASK [ovirt -> Detach Direct LUNs] **********************************************************************************************************************************************************************************************
task path: /app/ansible/ovirt/ovirt-01-Reconfigure_Direct_LUNs.yml:56
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: 02e027cd
<localhost> EXEC /bin/sh -c 'echo ~02e027cd && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir /home/ansible/.ansible/tmp/ansible-tmp-1602080927.2819948-18820-128241010457198 && echo ansible-tmp-1602080927.2819948-18820-128241010457198="` echo /home/ansible/.ansible/tmp/ansible-tmp-1602080927.2819948-18820-128241010457198 `" ) && sleep 0'
Using module file /home/ansible/.ansible/plugins/modules/cloud/ovirt/ovirt_disk.py
<localhost> PUT /home/ansible/.ansible/tmp/ansible-local-18702d4u9gbd7/tmp2ch6s9zx TO /home/ansible/.ansible/tmp/ansible-tmp-1602080927.2819948-18820-128241010457198/AnsiballZ_ovirt_disk.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1602080927.2819948-18820-128241010457198/ /home/ansible/.ansible/tmp/ansible-tmp-1602080927.2819948-18820-128241010457198/AnsiballZ_ovirt_disk.py && sleep 0'
<localhost> EXEC /bin/sh -c '/app/ansible/ovirt/tools/Python-3.8.5/bin/python3.8 /home/ansible/.ansible/tmp/ansible-tmp-1602080927.2819948-18820-128241010457198/AnsiballZ_ovirt_disk.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1602080927.2819948-18820-128241010457198/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_ovirt_disk_payload_aqeudp3_/ansible_ovirt_disk_payload.zip/ansible/modules/ovirt_disk.py", line 792, in main
  File "/tmp/ansible_ovirt_disk_payload_aqeudp3_/ansible_ovirt_disk_payload.zip/ansible/module_utils/ovirt.py", line 640, in create
    wait(
  File "/tmp/ansible_ovirt_disk_payload_aqeudp3_/ansible_ovirt_disk_payload.zip/ansible/module_utils/ovirt.py", line 364, in wait
    raise Exception("Timeout exceed while waiting on result state of the entity.")
Exception: Timeout exceed while waiting on result state of the entity.
[WARNING]: Module did not set no_log for pass_discard
failed: [testcl1] (item={'name': 'LUN01', 'id': '36000144000000010e04v878sf8723fd9'}) => {
    "ansible_loop_var": "item",
    "changed": false,
    "invocation": {
        "module_args": {
            "activate": null,
            "auth": {
                "ca_file": null,
                "compress": true,
                "headers": null,
                "insecure": true,
                "kerberos": false,
                "timeout": 0,
                "token": "asdfasdfasdf",
                "url": "https://ovirt.domain.local/ovirt-engine/api"
            },
            "backup": null,
            "bootable": null,
            "content_type": "data",
            "description": null,
            "download_image_path": null,
            "fetch_nested": false,
            "force": false,
            "format": "cow",
            "host": null,
            "id": null,
            "image_provider": null,
            "interface": null,
            "logical_unit": null,
            "name": "testcl_LUN01",
            "nested_attributes": [],
            "openstack_volume_type": null,
            "pass_discard": null,
            "poll_interval": 3,
            "profile": null,
            "propagate_errors": null,
            "quota_id": null,
            "scsi_passthrough": null,
            "shareable": null,
            "size": null,
            "sparse": null,
            "sparsify": null,
            "state": "detached",
            "storage_domain": null,
            "storage_domains": null,
            "timeout": 180,
            "upload_image_path": null,
            "uses_scsi_reservation": null,
            "vm_id": null,
            "vm_name": "testcl1",
            "wait": true,
            "wipe_after_delete": null
        }
    },
    "item": {
        "id": "36000144000000010e04v878sf8723fd9",
        "name": "LUN01"
    },
    "msg": "Timeout exceed while waiting on result state of the entity."
}
<localhost> EXEC /bin/sh -c 'echo ~02e027cd && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir /home/ansible/.ansible/tmp/ansible-tmp-1602081108.6279354-18820-259396191722806 && echo ansible-tmp-1602081108.6279354-18820-259396191722806="` echo /home/ansible/.ansible/tmp/ansible-tmp-1602081108.6279354-18820-259396191722806 `" ) && sleep 0'
@mattpoel mattpoel added the bug Something isn't working label Oct 8, 2020
@mattpoel
Copy link
Author

@mnecas is there any information I can provide or collect do diagnose the problem? Thanks in advance!

@mnecas
Copy link
Member

mnecas commented Oct 19, 2020

@mattpoel sorry did not have time to investigate the issue yet, will look into it asap.
Maybe try using a larger timeout? it could be because the env is slow/you have a large disk

@mwperina mwperina assigned barpavel and unassigned mnecas Oct 26, 2021
@sandrobonazzola
Copy link
Member

Closing as stale. Please reopen if this is still relevant.

@sandrobonazzola sandrobonazzola closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2022
@mattpoel
Copy link
Author

mattpoel commented Dec 20, 2022

@sandrobonazzola yes, still relevant. I don't ask for updates to not bother the developers on their work :-)

If I can do some testing or provide additional information, I'm happy to do so. We want to use Ansible for all configuration works on ovirt/RHV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants