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_guest_tools_info: AttributeError: 'NoneType' object has no attribute 'toolsInstallType' #2081

Open
shrutebattlestargalactica opened this issue May 21, 2024 · 1 comment

Comments

@shrutebattlestargalactica
Copy link

shrutebattlestargalactica commented May 21, 2024

SUMMARY

Unable to run the community.vmware.vmware_guest_tools_info module - errors out due to missing attribute

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_guest_tools_info

ANSIBLE VERSION

Running in AWX version 23.9.0

COLLECTION VERSION
Collection       Version
---------------- -------
community.vmware 4.2.0
CONFIGURATION
CONFIG_FILE() = None
OS / ENVIRONMENT

AWS EKS, kubernetes version 1.29, eks.6 platform version running AWX through the awx-operator

STEPS TO REPRODUCE
- name: Gather VMware tools info installed in VM specified by name
      community.vmware.vmware_guest_tools_info:
        name: "{{ name | lower }}"
      delegate_to: localhost
      become: no
      register: vm_tools_version
      ignore_errors: true
EXPECTED RESULTS

return values from the module about the vmtools version thats installed on the target host

ACTUAL RESULTS

Task fails due to a python error

{
  "module_stdout": "",
  "module_stderr": "Traceback (most recent call last):\n  File \"/home/runner/.ansible/tmp/ansible-tmp-1716324891.2512481-41-181414159233244/AnsiballZ_vmware_guest_tools_info.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/home/runner/.ansible/tmp/ansible-tmp-1716324891.2512481-41-181414159233244/AnsiballZ_vmware_guest_tools_info.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/runner/.ansible/tmp/ansible-tmp-1716324891.2512481-41-181414159233244/AnsiballZ_vmware_guest_tools_info.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.community.vmware.plugins.modules.vmware_guest_tools_info', init_globals=dict(_module_fqn='ansible_collections.community.vmware.plugins.modules.vmware_guest_tools_info', _modlib_path=modlib_path),\n  File \"/usr/lib64/python3.8/runpy.py\", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.8/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib64/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_community.vmware.vmware_guest_tools_info_payload_c4gm3bx6/ansible_community.vmware.vmware_guest_tools_info_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest_tools_info.py\", line 198, in <module>\n  File \"/tmp/ansible_community.vmware.vmware_guest_tools_info_payload_c4gm3bx6/ansible_community.vmware.vmware_guest_tools_info_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest_tools_info.py\", line 193, in main\n  File \"/tmp/ansible_community.vmware.vmware_guest_tools_info_payload_c4gm3bx6/ansible_community.vmware.vmware_guest_tools_info_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest_tools_info.py\", line 147, in gather_vmtools_info\nAttributeError: 'NoneType' object has no attribute 'toolsInstallType'\n",
  "exception": "Traceback (most recent call last):\n  File \"/home/runner/.ansible/tmp/ansible-tmp-1716324891.2512481-41-181414159233244/AnsiballZ_vmware_guest_tools_info.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/home/runner/.ansible/tmp/ansible-tmp-1716324891.2512481-41-181414159233244/AnsiballZ_vmware_guest_tools_info.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/runner/.ansible/tmp/ansible-tmp-1716324891.2512481-41-181414159233244/AnsiballZ_vmware_guest_tools_info.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.community.vmware.plugins.modules.vmware_guest_tools_info', init_globals=dict(_module_fqn='ansible_collections.community.vmware.plugins.modules.vmware_guest_tools_info', _modlib_path=modlib_path),\n  File \"/usr/lib64/python3.8/runpy.py\", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.8/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib64/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_community.vmware.vmware_guest_tools_info_payload_c4gm3bx6/ansible_community.vmware.vmware_guest_tools_info_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest_tools_info.py\", line 198, in <module>\n  File \"/tmp/ansible_community.vmware.vmware_guest_tools_info_payload_c4gm3bx6/ansible_community.vmware.vmware_guest_tools_info_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest_tools_info.py\", line 193, in main\n  File \"/tmp/ansible_community.vmware.vmware_guest_tools_info_payload_c4gm3bx6/ansible_community.vmware.vmware_guest_tools_info_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest_tools_info.py\", line 147, in gather_vmtools_info\nAttributeError: 'NoneType' object has no attribute 'toolsInstallType'\n",
  "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
  "rc": 1,
  "_ansible_no_log": false,
  "changed": false,
  "_ansible_delegated_vars": {
    "ansible_host": "localhost",
    "ansible_port": null,
    "ansible_user": "myusernameforthevcenterapi",
    "ansible_connection": "local"
  }
}
@shrutebattlestargalactica shrutebattlestargalactica changed the title AttributeError: 'NoneType' object has no attribute 'toolsInstallType' vmware_guest_tools_info: AttributeError: 'NoneType' object has no attribute 'toolsInstallType' May 21, 2024
@shrutebattlestargalactica
Copy link
Author

maybe this is related? #2078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant