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

FATAL vmware_content_deploy_template - RC1 #62957

Closed
markatdxb opened this issue Sep 30, 2019 · 8 comments
Closed

FATAL vmware_content_deploy_template - RC1 #62957

markatdxb opened this issue Sep 30, 2019 · 8 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. support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. vmware VMware community

Comments

@markatdxb
Copy link

SUMMARY

Unable to deploy simple VM from Content library with new module

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_content_deploy_template

ANSIBLE VERSION
ansible 2.9.0rc1
  config file = /root/myplatform/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /root/.local/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Aug  7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

CONFIGURATION
DEFAULT_HOST_LIST(/root/myplatform/ansible.cfg) = [u'/root/myplatform/hosts']
DEFAULT_JINJA2_NATIVE(/root/myplatform/ansible.cfg) = True
DEFAULT_ROLES_PATH(/root/myplatform/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible
HOST_KEY_CHECKING(/root/myplatform/ansible.cfg) = False
RETRY_FILES_ENABLED(/root/myplatform/ansible.cfg) = False

OS / ENVIRONMENT

VCS 6.5

STEPS TO REPRODUCE

Created simple playbook from module examples - see below

tasks:
    
    - name: Deploy Virtual Machine from template in content library
      vmware_content_deploy_template:
        hostname: '{{ vcenter_hostname }}'
        username: '{{ vcenter_username }}'
        password: '{{ vcenter_password }}'
        template: TEST_TEMPLATE
        datastore: DATASTORE1
        folder: vm
        datacenter: DC1
        name: Sample_VM
        host: host1.mydomain.com
        validate_certs: False
      delegate_to: localhost
EXPECTED RESULTS

expected to get new VM deployed

ACTUAL RESULTS

long error message

fatal: [localhost -> localhost]: FAILED! => {"changed": false, "module_stderr": "/usr/lib/python2.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)\n/usr/lib/python2.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)\n/usr/lib/python2.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)\n/usr/lib/python2.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)\n/usr/lib/python2.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)\n/usr/lib/python2.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)\n/usr/lib/python2.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)\n/usr/lib/python2.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)\n/usr/lib/python2.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)\n/usr/lib/python2.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 \"/root/.ansible/tmp/ansible-tmp-1569828474.28-91866160367568/AnsiballZ_vmware_content_deploy_template.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1569828474.28-91866160367568/AnsiballZ_vmware_content_deploy_template.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1569828474.28-91866160367568/AnsiballZ_vmware_content_deploy_template.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.cloud.vmware.vmware_content_deploy_template', init_globals=None, run_name='__main__', alter_sys=False)\n  File \"/usr/lib64/python2.7/runpy.py\", line 180, in run_module\n    fname, loader, pkg_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n    exec code in run_globals\n  File \"/tmp/ansible_vmware_content_deploy_template_payload_wtO03s/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py\", line 271, in <module>\n  File \"/tmp/ansible_vmware_content_deploy_template_payload_wtO03s/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py\", line 258, in main\n  File \"/tmp/ansible_vmware_content_deploy_template_payload_wtO03s/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py\", line 209, in deploy_vm_from_template\n  File \"/usr/lib/python2.7/site-packages/com/vmware/vcenter/vm_template_client.py\", line 2119, in deploy\n    'spec': spec,\n  File \"/usr/lib/python2.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 \"/usr/lib/python2.7/site-packages/vmware/vapi/bindings/stub.py\", line 298, in native_invoke\n    self._rest_converter_mode)\ncom.vmware.vapi.std.errors_client.OperationNotFound: {error_type : None, messages : [LocalizableMessage(default_message=\"Cannot find service 'com.vmware.vcenter.vm_template.library_items'.\", args=['com.vmware.vcenter.vm_template.library_items'], params=None, id='vapi.method.input.invalid.interface', localized=None)], data : None}\n/usr/lib/python2.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)\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

@ansibot
Copy link
Contributor

ansibot commented Sep 30, 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 Sep 30, 2019

@ansibot
Copy link
Contributor

ansibot commented Sep 30, 2019

@markatdxb, just so you are aware we have a dedicated Working Group for vmware.
You can find other people interested in this in #ansible-vmware on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 cloud bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. vmware VMware community labels Sep 30, 2019
@pgbidkar
Copy link
Contributor

pgbidkar commented Sep 30, 2019

Cannot find service 'com.vmware.vcenter.vm_template.library_items

Please can you try installing vsphere-automation-python-sdk? One of the requirement for this module

Please refer documentation https://github.com/vmware/vsphere-automation-sdk-python, installation step: pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git

Thanks

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Sep 30, 2019
@markatdxb
Copy link
Author

markatdxb commented Sep 30, 2019

hello,
Installing collected packages: vSphere-Automation-SDK Found existing installation: vSphere-Automation-SDK 1.7.0 Uninstalling vSphere-Automation-SDK-1.7.0: Successfully uninstalled vSphere-Automation-SDK-1.7.0 Running setup.py install for vSphere-Automation-SDK ... done Successfully installed vSphere-Automation-SDK-1.7.0
Seems that SDK is installed OK

@pgbidkar
Copy link
Contributor

pgbidkar commented Sep 30, 2019

Hi @markatdxb , Sorry for the confusion. com.vmware.vcenter.vm_template.library_items service is introduced after 6.5. APIs are updated after 6.7
I did typo mistake in Module tested section. 6.5 should not be mentioned in that.

Sorry again for the wrong info

Thanks

@pgbidkar
Copy link
Contributor

has_pr #62965

@markatdxb
Copy link
Author

Thanks for clarification @pgbidkar

@ansible ansible locked and limited conversation to collaborators Oct 28, 2019
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. 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