Bug 1755487 - Wrong error returned when ovirt_template times out
Summary: Wrong error returned when ovirt_template times out
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ansible
Version: 4.3.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ovirt-4.4.0
: ---
Assignee: Martin Necas
QA Contact: Pavol Brilla
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-25 15:23 UTC by Jan Zmeskal
Modified: 2020-04-16 10:24 UTC (History)
5 users (show)

Fixed In Version: rhv-4.4.0-29
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-16 10:24:26 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ansible ansible pull 63199 0 'None' closed Ovirt add template timeout error 2020-04-16 10:23:10 UTC

Description Jan Zmeskal 2019-09-25 15:23:19 UTC
Description of problem:
When creating a template out of Glance disk image, it might happen that (for example due to slow connection) the task times out. In that case, module returns this error:

TASK [Create teamplate out of Glance image] **************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Error: Fault reason is "Input validation failed.". Fault detail is "No matching signature found, make sure that mandatory attributes are provided.". HTTP response code is 400.
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Fault reason is \"Input validation failed.\". Fault detail is \"No matching signature found, make sure that mandatory attributes are provided.\". HTTP response code is 400."}

This error makes it seem as though I provided wrong parameters. However, the template was eventually created successfully - only it happened after the timeout.

Version-Release number of selected component (if applicable):
ansible 2.8.5

How reproducible:
100 %

Steps to Reproduce:
1. Have a playbook like this:

- hosts: localhost
  gather_facts: false
  vars:
    engine_url: "https://fqdn/ovirt-engine/api"
    engine_username: "admin@internal"
    engine_password: "password"
  tasks:
    - name: Authenticate with oVirt
      ovirt_auth:
        url: "{{ engine_url }}"
        username: "{{ engine_username }}"
        password: "{{ engine_password }}"
        insecure: yes
    - name: Create template out of Glance image
      ovirt_template:
        auth: "{{ ovirt_auth }}"
        state: imported
        name: "my_template"
        image_disk: "disk"
        template_image_disk_name: "disk_from_glance"
        image_provider: "my_glance"
        storage_domain: "my_storage"
        cluster: "my_cluster"
        timeout: 60

2. Make sure that the timeout is low enought and that the time for copying of Glance image is greater than the timeout
3. Run the playbook.

Actual results:
Error about "Input validation failed" is printed.

Expected results:
The module should inform the user about the fact that the timeout was exceeded.

Comment 1 Martin Necas 2019-10-14 12:15:36 UTC
I added exception which tells that the image was not able to import and that user should try rerun it with a larger timeout.

Comment 4 Lukas Svaty 2020-04-16 10:24:26 UTC
Closing low/medium severity bugs, if you would like to still verify this issue please reopen.


Note You need to log in before you can comment on or make changes to this bug.