saltstack / saltstack/salt

[Bug]: vSphere module functions error

Open
#68,427 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

What happened?

We've got the vCenter Proxy Minion setup and working. Noticing inconsistent behavior with the vSphere Module functions. For example, list_vms & get_vm_config are successful whereas update_vm fails as below.

When run on Salt Master-
[root@rhel-master ~]# salt 'vcenter-proxy' vsphere.update_vm vm_name=RHEL9 datacenter=DC-01A cpu='{count: 4, nested: False}'
vcenter-proxy:
ERROR: 'vcenter' proxy is not supported by function update_vm
ERROR: Minions returned with non-zero exit code
[root@rhel-master ~]#

When run on vCenter Proxy-
[root@salt-proxy ~]# salt-call vsphere.update_vm vm_name=RHEL9 datacenter=DC-01A cpu='{count: 4, nested: False}'
/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/vsphere.py:310: FutureWarning: The 'vsphere' functionality in Salt has been deprecated and its functionality will be removed in version 3008 in favor of the saltext.vmware Salt Extension. (https://github.com/saltstack/salt-ext-modules-vmware)
salt.utils.versions.warn_until(
Error running 'vsphere.update_vm': '' proxy is not supported by function update_vm

Type of salt install

Official deb

Major version

3006.x

What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)

rhel-9

salt --versions-report output
Salt Version:
          Salt: 3006.7

Python Version:
        Python: 3.10.13 (main, Feb 19 2024, 03:31:20) [GCC 11.2.0]

Dependency Versions:
          cffi: 1.14.6
      cherrypy: unknown
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.3
       libgit2: Not Installed
  looseversion: 1.0.2
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 22.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: Not Installed
  python-gnupg: 0.4.8
        PyYAML: 6.0.1
         PyZMQ: 23.2.0
        relenv: 0.15.1
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

Salt Extensions:
        SSEAPE: 8.17.0.6

System Versions:
          dist: rhel 8.6 Ootpa
        locale: utf-8
       machine: x86_64
       release: 4.18.0-372.19.1.el8_6.x86_64
        system: Linux
       version: Red Hat Enterprise Linux 8.6 Ootpa

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in salt/modules/vsphere.py, using the reported update_vm calls and the existing list_vms and get_vm_config behavior as comparison points. Reproduce the commands against the vCenter Proxy Minion and proxy, then trace why update_vm rejects the proxy; done means the function works consistently through the proxy or its supported behavior is clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.