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

Consistently receiving "500 - Internal Server Error" errors when using vsphere_copy #2069

Open
robbinscp opened this issue May 11, 2024 · 1 comment

Comments

@robbinscp
Copy link

SUMMARY

Consistently receiving "500 - Internal Server Error" errors when using vsphere_copy

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vsphere_copy

ANSIBLE VERSION
ansible [core 2.15.1]
  config file = None
  configured module search path = ['/Users/robbinsc/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/robbinsc/Library/Python/3.9/lib/python/site-packages/ansible
  ansible collection location = /Users/robbinsc/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/robbinsc/Library/Python/3.9/bin/ansible
  python version = 3.9.6 (default, Feb  3 2024, 15:58:27) [Clang 15.0.0 (clang-1500.3.9.4)] (/Library/Developer/CommandLineTools/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
Collection       Version
---------------- -------
community.vmware 3.7.0  
CONFIGURATION
ansible-config dump --only-changed
CONFIG_FILE() = None
OS / ENVIRONMENT

I am attempting to upload ISOs to a vSphere 8 environment (8.0.2.00300). This has failed irrespective of the platform used (Mac / Linux / WSL).

STEPS TO REPRODUCE
  • Create Ansible playbook to upload file using vsphere_copy
  • Observe failure as indicated below

Example playbook shown below

  - name: upload Windows ISO
    when: iso_exists.state == "absent"
    vsphere_copy:
      hostname: "{{ vsphere_hostname }}"
      username: "{{ vsphere_username }}"
      password: "{{ vsphere_password }}"
      datacenter: "{{ vsphere_datacenter }}"
      datastore: "{{ vsphere_iso_datastore }}"
      src: "{{ iso_image}}.iso"
      path: "{{ vsphere_iso_directory }}/{{  iso_image }}.iso"
      timeout: 360
      validate_certs: false
      delegate_to: localhost
EXPECTED RESULTS

The copy/upload of ISO completes to the datastore successfully

ACTUAL RESULTS

The copy/upload fails as shown below

fatal: [test-win10 -> localhost]: FAILED! => {
    "changed": false,
    "errno": null,
    "headers": {
        "connection": "close",
        "content-length": "37",
        "content-security-policy": "upgrade-insecure-requests",
        "content-type": "text/plain; charset=utf-8",
        "date": "Sat, 11 May 2024 22:39:36 GMT",
        "set-cookie": "vmware_soap_session=\"9a259e138970d9406a0c037a88d3aa8858c725c3\"; Path=/; HttpOnly; Secure;",
        "strict-transport-security": "max-age=31536000",
        "x-content-type-options": "nosniff",
        "x-envoy-upstream-service-time": "30030",
        "x-frame-options": "DENY",
        "x-xss-protection": "1"
    },
    "invocation": {
        "module_args": {
            "datacenter": "Datacenter",
            "datastore": "datastore",
            "host": "SANITIZED",
            "hostname": "SANITIZED",
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "path": "iso/Win10_21H1_English_x64.iso-no-prompt.iso",
            "state": "file",
            "timeout": 600,
            "username": "[email protected]",
            "validate_certs": false
        }
    },
    "msg": "Failed to query for file 'iso/Win10_21H1_English_x64.iso-no-prompt.iso'",
    "path": "iso/Win10_21H1_English_x64.iso-no-prompt.iso",
    "reason": "Internal Server Error",
    "size": null,
    "state": "file",
    "status": 500,
    "url": "https://SANITIZED/folder/iso/Win10_21H1_English_x64.iso-no-prompt.iso?dsName=datastore&dcPath=Datacenter"
}
...ignoring
@ihumster
Copy link
Collaborator

@robbinscp Typically, such errors are a consequence of a problem on the server side (in your case, vCenter Server). Have you tried copying the same operation with the same file to the same datastore via vSphere Client?

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

2 participants