You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vc01:
The minion function caused an exception: Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/salt/metaproxy/proxy.py", line 483, in thread_return
opts, data, func, args, kwargs
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
return callable(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/executors/direct_call.py", line 10, in execute
return func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
return callable(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/modules/state.py", line 793, in apply_
return sls(mods, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/modules/state.py", line 1392, in sls
ret = st_.state.call_high(high_, orchestration_jid)
File "/usr/lib/python3.6/site-packages/salt/state.py", line 3279, in call_high
ret = self.call_chunks(chunks)
File "/usr/lib/python3.6/site-packages/salt/state.py", line 2497, in call_chunks
running = self.call_chunk(low, running, chunks)
File "/usr/lib/python3.6/site-packages/salt/state.py", line 3003, in call_chunk
running[tag] = self.call(low, chunks, running)
File "/usr/lib/python3.6/site-packages/salt/utils/decorators/state.py", line 45, in _func
result = func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/state.py", line 2237, in call
self.check_refresh(low, ret)
File "/usr/lib/python3.6/site-packages/salt/state.py", line 1253, in check_refresh
if not ret["changes"]:
KeyError: 'changes'
vc01:
The minion function caused an exception: Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/salt/metaproxy/proxy.py", line 483, in thread_return
opts, data, func, args, kwargs
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
return callable(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/executors/direct_call.py", line 10, in execute
return func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
return callable(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/modules/state.py", line 793, in apply_
return sls(mods, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/modules/state.py", line 1392, in sls
ret = st_.state.call_high(high_, orchestration_jid)
File "/usr/lib/python3.6/site-packages/salt/state.py", line 3279, in call_high
ret = self.call_chunks(chunks)
File "/usr/lib/python3.6/site-packages/salt/state.py", line 2497, in call_chunks
running = self.call_chunk(low, running, chunks)
File "/usr/lib/python3.6/site-packages/salt/state.py", line 3003, in call_chunk
running[tag] = self.call(low, chunks, running)
File "/usr/lib/python3.6/site-packages/salt/utils/decorators/state.py", line 45, in _func
result = func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/state.py", line 2237, in call
self.check_refresh(low, ret)
File "/usr/lib/python3.6/site-packages/salt/state.py", line 1253, in check_refresh
if not ret["changes"]:
KeyError: 'changes'
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
Salt: 3004.1Dependency Versions:
cffi: 1.11.5cherrypy: unknowndateutil: 2.6.1docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 2.10.1libgit2: 0.26.8M2Crypto: 0.35.2Mako: Not Installedmsgpack: 0.6.2msgpack-pure: Not Installedmysql-python: Not Installedpycparser: 2.14pycrypto: Not Installedpycryptodome: Not Installedpygit2: 0.26.4Python: 3.6.8 (default, Nov 17 2021, 16:10:06)python-gnupg: Not InstalledPyYAML: 3.12PyZMQ: 19.0.0smmap: Not Installedtimelib: Not InstalledTornado: 4.5.3ZMQ: 4.3.4System Versions:
dist: almalinux 8.5 Arctic Sphynxlocale: UTF-8machine: x86_64release: 4.18.0-348.20.1.el8_5.x86_64system: Linuxversion: AlmaLinux 8.5 Arctic Sphynx
Additional context vcenter proxy minion against vSphere 7.0.3. pyVmomi 7.0.3
The text was updated successfully, but these errors were encountered:
ggiesen
changed the title
saltext.vmware.states.license_mgr.present fails with KeyError: 'changes'saltext.vmware.states.license_mgr.present and saltext.vmware.states.license_mgr.absent fail with KeyError: 'changes'May 21, 2022
A workaround is to use a jinja check with module.run:
{% if '1A1AA-AAAA-11AA1-11AA1-1A111' not in salt['vmware_license_mgr.list']()['licenses'] %}
saltmod_license_mgr_add-vsphere
module.run:
- vmware_license_mgr.add:
- license_key: '1A1AA-AAAA-11AA1-11AA1-1A111'
{% endif %}
This will throw an exception:
vc01:
----------
ID: saltmod_license_mgr_add-vsphere
Function: module.run
Result: True
Comment: vmware_license_mgr.add: Success
Started: 06:43:19.459083
Duration: 384.757 ms
Changes:
----------
vmware_license_mgr.add:
----------
message:
Failed to add a license key due to Exception 'A specified parameter was not correct: licenseKey'
result:
False
Summary for vc01
------------
Succeeded: 1 (changed=1)
Failed: 0
------------
Total states run: 1
Total run time: 384.757 ms
but will still add the licence if it's not present.
Using the
saltext.vmware.states.license_mgr.present
state module fails with fails withKeyError: 'changes'
.licence_present.sls:
Using a vcenter proxy:
licence_absent.sls:
The execution modules work, however:
salt vc01 vmware_license_mgr.list
:salt vc01 vmware_license_mgr.remove 1A1AA-AAAA-11AA1-11AA1-1A111
:salt vc01 vmware_license_mgr.list
:salt vc01 vmware_license_mgr.add 1A1AA-AAAA-11AA1-11AA1-1A111
:salt vc01 vmware_license_mgr.list
:Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
vcenter
proxy minion against vSphere 7.0.3. pyVmomi 7.0.3The text was updated successfully, but these errors were encountered: