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

vmware_category: RecursionError: maximum recursion depth exceeded while calling a Python object #59928

Closed
goneri opened this issue Aug 1, 2019 · 5 comments
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. python3 support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. vmware VMware community

Comments

@goneri
Copy link
Contributor

goneri commented Aug 1, 2019

SUMMARY

The following playbook from https://github.com/ansible/ansible/blob/devel/test/integration/targets/prepare_vmware_tests/tasks/setup_category.yml fails with the error below.

- name: Create a category for cluster
  vmware_category:
    hostname: '{{ vcenter_hostname }}'
    username: '{{ vcenter_username }}'
    password: '{{ vcenter_password }}'
    validate_certs: False
    category_name: '{{ cluster_category }}'
    category_description: '{{ cluster_category }} description'
    state: present

The error:

fatal: [testhost]: FAILED! => {
    "changed": false,
    "module_stderr": "/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecureRequestWarning)\nTraceback (most recent call last):\n  File \"/home/goneri/.ansible/tmp/ansible-tmp-1564671235.268164-193770822526206/AnsiballZ_vmware_category.py\", line 139, in <module>\n    _ansiballz_main()\n  File \"/home/goneri/.ansible/tmp/ansible-tmp-1564671235.268164-193770822526206/AnsiballZ_vmware_category.py\", line 131, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/goneri/.ansible/tmp/ansible-tmp-1564671235.268164-193770822526206/AnsiballZ_vmware_category.py\", line 65, in invoke_module\n    spec.loader.exec_module(module)\n  File \"<frozen importlib._bootstrap_external>\", line 728, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n  File \"/tmp/ansible_vmware_category_payload_g4b69ljz/__main__.py\", line 273, in <module>\n  File \"/tmp/ansible_vmware_category_payload_g4b69ljz/__main__.py\", line 268, in main\n  File \"/tmp/ansible_vmware_category_payload_g4b69ljz/__main__.py\", line 134, in __init__\n  File \"/tmp/ansible_vmware_category_payload_g4b69ljz/ansible_vmware_category_payload.zip/ansible/module_utils/vmware_rest_client.py\", line 51, in __init__\n  File \"/tmp/ansible_vmware_category_payload_g4b69ljz/ansible_vmware_category_payload.zip/ansible/module_utils/vmware_rest_client.py\", line 125, in connect_to_vsphere_client\n  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/vsphere/client.py\", line 170, in create_vsphere_client\n    hok_token=hok_token, private_key=private_key)\n  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/vsphere/client.py\", line 111, in __init__\n    session_id = session_svc.create()\n  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/com/vmware/cis_client.py\", line 198, in create\n    return self._invoke('create', None)\n  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/bindings/stub.py\", line 345, in _invoke\n    return self._api_interface.native_invoke(ctx, _method_name, kwargs)\n  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/bindings/stub.py\", line 298, in native_invoke\n    self._rest_converter_mode)\ncom.vmware.vapi.std.errors_client.Unauthenticated: {challenge : None, messages : [LocalizableMessage(id='com.vmware.vapi.endpoint.method.authentication.required', default_message='Authentication required.', args=[], params=None, localized=None)], data : None, error_type : None}\nException ignored in: <function VsphereClient.__del__ at 0x7f9845c5fef0>\nTraceback (most recent call last):\n  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/vsphere/client.py\", line 136, in __del__\n    if hasattr(self, 'session'):\n  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/bindings/stub.py\", line 443, in __getattr__\n    return getattr(self._stub_factory, name)\n  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/bindings/stub.py\", line 443, in __getattr__\n    return getattr(self._stub_factory, name)\n  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/bindings/stub.py\", line 443, in __getattr__\n    return getattr(self._stub_factory, name)\n  [Previous line repeated 496 more times]\nRecursionError: maximum recursion depth exceeded while calling a Python object\n",                                                                           
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

The same error with expended \n:

    "module_stderr": "/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
Traceback (most recent call last):
  File \"/home/goneri/.ansible/tmp/ansible-tmp-1564671235.268164-193770822526206/AnsiballZ_vmware_category.py\", line 139, in <module>
    _ansiballz_main()
  File \"/home/goneri/.ansible/tmp/ansible-tmp-1564671235.268164-193770822526206/AnsiballZ_vmware_category.py\", line 131, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File \"/home/goneri/.ansible/tmp/ansible-tmp-1564671235.268164-193770822526206/AnsiballZ_vmware_category.py\", line 65, in invoke_module
    spec.loader.exec_module(module)
  File \"<frozen importlib._bootstrap_external>\", line 728, in exec_module
  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed
  File \"/tmp/ansible_vmware_category_payload_g4b69ljz/__main__.py\", line 273, in <module>
  File \"/tmp/ansible_vmware_category_payload_g4b69ljz/__main__.py\", line 268, in main
  File \"/tmp/ansible_vmware_category_payload_g4b69ljz/__main__.py\", line 134, in __init__
  File \"/tmp/ansible_vmware_category_payload_g4b69ljz/ansible_vmware_category_payload.zip/ansible/module_utils/vmware_rest_client.py\", line 51, in __init__
  File \"/tmp/ansible_vmware_category_payload_g4b69ljz/ansible_vmware_category_payload.zip/ansible/module_utils/vmware_rest_client.py\", line 125, in connect_to_vsphere_client
  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/vsphere/client.py\", line 170, in create_vsphere_client
    hok_token=hok_token, private_key=private_key)
  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/vsphere/client.py\", line 111, in __init__
    session_id = session_svc.create()
  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/com/vmware/cis_client.py\", line 198, in create
    return self._invoke('create', None)
  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/bindings/stub.py\", line 345, in _invoke
    return self._api_interface.native_invoke(ctx, _method_name, kwargs)
  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/bindings/stub.py\", line 298, in native_invoke
    self._rest_converter_mode)
com.vmware.vapi.std.errors_client.Unauthenticated: {challenge : None, messages : [LocalizableMessage(id='com.vmware.vapi.endpoint.method.authentication.required', default_message='Authentication required.', args=[], params=None, localized=None)], data : None, error_type : None}
Exception ignored in: <function VsphereClient.__del__ at 0x7f9845c5fef0>
Traceback (most recent call last):
  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/vsphere/client.py\", line 136, in __del__
    if hasattr(self, 'session'):
  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/bindings/stub.py\", line 443, in __getattr__
    return getattr(self._stub_factory, name)
  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/bindings/stub.py\", line 443, in __getattr__
    return getattr(self._stub_factory, name)
  File \"/home/goneri/git_repos/ansible_projects/a/.virtualenv/py37/lib/python3.7/site-packages/vmware/vapi/bindings/stub.py\", line 443, in __getattr__
    return getattr(self._stub_factory, name)
  [Previous line repeated 496 more times]
RecursionError: maximum recursion depth exceeded while calling a Python object
ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_category

ANSIBLE VERSION
devel
@ansibot
Copy link
Contributor

ansibot commented Aug 1, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Aug 1, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. python3 support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. vmware VMware community labels Aug 1, 2019
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Aug 1, 2019
@Akasurde
Copy link
Member

Akasurde commented Aug 1, 2019

@goneri Seems related to #55804

@Akasurde
Copy link
Member

@goneri Can we close one of them since they are duplicate? Thanks.

@goneri
Copy link
Contributor Author

goneri commented Jan 17, 2020

Sure.

@goneri goneri closed this as completed Jan 17, 2020
@ansible ansible locked and limited conversation to collaborators Feb 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. python3 support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. vmware VMware community
Projects
None yet
Development

No branches or pull requests

3 participants