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_storage_domain_info - follow not working #717

Open
Kloppi313 opened this issue Aug 23, 2023 · 3 comments
Open

ovirt_storage_domain_info - follow not working #717

Kloppi313 opened this issue Aug 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Kloppi313
Copy link

Kloppi313 commented Aug 23, 2023

SUMMARY

While trying to migrate from deprecated fetch attributes I run into an error I am not able to explain.

COMPONENT NAME

ovirt_storage_domain_info

STEPS TO REPRODUCE

Does not work:

ovirt_storage_domain_info:
  pattern: "name={{ template_storage_domain }}*"
  auth: "{{ ovirt_auth }}"
  follow: data_centers

But the following older code works:

ovirt_storage_domain_info:
  pattern: "name={{ template_storage_domain }}*"
  auth: "{{ ovirt_auth }}"
  fetch_nested: true
  nested_attributes: data_centers
EXPECTED RESULTS
ACTUAL RESULTS
redirecting (type: modules) ansible.builtin.ovirt_storage_domain_info to ovirt.ovirt.ovirt_storage_domain_info
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: USERNAME
<localhost> EXEC /bin/sh -c 'echo ~USERNAME && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/USERNAME/.ansible/tmp `"&& mkdir "` echo /home/USERNAME/.ansible/tmp/ansible-tmp-1692782877.6512156-3914968-49789654361326 `" && echo ansible-tmp-1692782877.6512156-3914968-49789654361326="` echo /home/USERNAME/.ansible/tmp/ansible-tmp-1692782877.6512156-3914968-49789654361326 `" ) && sleep 0'
redirecting (type: modules) ansible.builtin.ovirt_storage_domain_info to ovirt.ovirt.ovirt_storage_domain_info
Including module_utils file ansible/__init__.py
Including module_utils file ansible/module_utils/__init__.py
Including module_utils file ansible/module_utils/basic.py
Including module_utils file ansible/module_utils/_text.py
Including module_utils file ansible/module_utils/common/_collections_compat.py
Including module_utils file ansible/module_utils/common/__init__.py
Including module_utils file ansible/module_utils/common/_json_compat.py
Including module_utils file ansible/module_utils/common/_utils.py
Including module_utils file ansible/module_utils/common/arg_spec.py
Including module_utils file ansible/module_utils/common/file.py
Including module_utils file ansible/module_utils/common/locale.py
Including module_utils file ansible/module_utils/common/parameters.py
Including module_utils file ansible/module_utils/common/collections.py
Including module_utils file ansible/module_utils/common/process.py
Including module_utils file ansible/module_utils/common/sys_info.py
Including module_utils file ansible/module_utils/common/text/converters.py
Including module_utils file ansible/module_utils/common/text/__init__.py
Including module_utils file ansible/module_utils/common/text/formatters.py
Including module_utils file ansible/module_utils/common/validation.py
Including module_utils file ansible/module_utils/common/warnings.py
Including module_utils file ansible/module_utils/compat/selectors.py
Including module_utils file ansible/module_utils/compat/__init__.py
Including module_utils file ansible/module_utils/compat/_selectors2.py
Including module_utils file ansible/module_utils/compat/selinux.py
Including module_utils file ansible/module_utils/distro/__init__.py
Including module_utils file ansible/module_utils/distro/_distro.py
Including module_utils file ansible/module_utils/errors.py
Including module_utils file ansible/module_utils/parsing/convert_bool.py
Including module_utils file ansible/module_utils/parsing/__init__.py
Including module_utils file ansible/module_utils/pycompat24.py
Including module_utils file ansible/module_utils/six/__init__.py
Including module_utils file ansible_collections/ovirt/ovirt/plugins/module_utils/ovirt.py
Including module_utils file ansible_collections/__init__.py
Including module_utils file ansible_collections/ovirt/__init__.py
Including module_utils file ansible_collections/ovirt/ovirt/__init__.py
Including module_utils file ansible_collections/ovirt/ovirt/plugins/__init__.py
Including module_utils file ansible_collections/ovirt/ovirt/plugins/module_utils/__init__.py
Including module_utils file ansible_collections/ovirt/ovirt/plugins/module_utils/cloud.py
Including module_utils file ansible_collections/ovirt/ovirt/plugins/module_utils/version.py
Using module file /opt/REDACTED/vens/ansible-6.7-py3/lib/python3.10/site-packages/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_storage_domain_info.py
<localhost> PUT /home/USERNAME/.ansible/tmp/ansible-local-3914457gv7asoy6/tmp6hsu6jtu TO /home/USERNAME/.ansible/tmp/ansible-tmp-1692782877.6512156-3914968-49789654361326/AnsiballZ_ovirt_storage_domain_info.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/USERNAME/.ansible/tmp/ansible-tmp-1692782877.6512156-3914968-49789654361326/ /home/USERNAME/.ansible/tmp/ansible-tmp-1692782877.6512156-3914968-49789654361326/AnsiballZ_ovirt_storage_domain_info.py && sleep 0'
<localhost> EXEC /bin/sh -c 'REQUESTS_CA_BUNDLE=/etc/ssl/certs/ /opt/REDACTED/vens/ansible-6.7-py3/bin/python3 /home/USERNAME/.ansible/tmp/ansible-tmp-1692782877.6512156-3914968-49789654361326/AnsiballZ_ovirt_storage_domain_info.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/USERNAME/.ansible/tmp/ansible-tmp-1692782877.6512156-3914968-49789654361326/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_ovirt_storage_domain_info_payload_keronz2d/ansible_ovirt_storage_domain_info_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_storage_domain_info.py", line 112, in main
  File "/opt/REDACTED/vens/ansible-6.7-py3/lib/python3.10/site-packages/ovirtsdk4/services.py", line 26457, in list
    return self._internal_get(headers, query, wait)
  File "/opt/REDACTED/vens/ansible-6.7-py3/lib/python3.10/site-packages/ovirtsdk4/service.py", line 211, in _internal_get
    return future.wait() if wait else future
  File "/opt/REDACTED/vens/ansible-6.7-py3/lib/python3.10/site-packages/ovirtsdk4/service.py", line 55, in wait
    return self._code(response)
  File "/opt/REDACTED/vens/ansible-6.7-py3/lib/python3.10/site-packages/ovirtsdk4/service.py", line 208, in callback
    self._check_fault(response)
  File "/opt/REDACTED/vens/ansible-6.7-py3/lib/python3.10/site-packages/ovirtsdk4/service.py", line 130, in _check_fault
    body = self._internal_read_body(response)
  File "/opt/REDACTED/vens/ansible-6.7-py3/lib/python3.10/site-packages/ovirtsdk4/service.py", line 316, in _internal_read_body
    self._connection.check_xml_content_type(response)
  File "/opt/REDACTED/vens/ansible-6.7-py3/lib/python3.10/site-packages/ovirtsdk4/__init__.py", line 846, in check_xml_content_type
    return self._check_content_type(
  File "/opt/REDACTED/vens/ansible-6.7-py3/lib/python3.10/site-packages/ovirtsdk4/__init__.py", line 889, in _check_content_type
    raise Error(msg)
ovirtsdk4.Error: The response content type 'text/html;charset=UTF-8' isn't the expected XML
fatal: [gisu1011 -> localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "fetch_nested": false,
            "follow": [
                "data_centers"
            ],
            "nested_attributes": [],
            "pattern": "name=Templates*"
        }
    },
    "msg": "The response content type 'text/html;charset=UTF-8' isn't the expected XML"
}

The file /var/log/httpd/ssl_error_log on API Endpoint is an empty file
Kerberos is used for authentication against API

@Kloppi313 Kloppi313 added the bug Something isn't working label Aug 23, 2023
@mnecas
Copy link
Member

mnecas commented Aug 24, 2023

Hi @Kloppi313 , thank you for the issue!
looks like an api/engine issue.

@Kloppi313
Copy link
Author

Kloppi313 commented Aug 28, 2023

Thank you for the information. It looks like there is nothing we can do about it.
So is it best to close this issue or do you prefer to leave it opened for tracking etc.?

@mnecas
Copy link
Member

mnecas commented Sep 8, 2023

we can close this here because we can't do anything in collection to fix it and open it in the https://github.com/ovirt/ovirt-engine, but afaik nobody is right now working on that area and goes also outside of my knowledge.

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

2 participants