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
Description
When calling the module btrfs.resize from a module.runstanza it fails with NameError: name '__salt__' is not defined Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
on-prem machine
VM (Virtualbox, KVM, etc. please specify)
[X ] EC2 instance on ARM
container (Kubernetes, Docker, containerd, etc. please specify)
ID: resize /data filesystem
Function: module.run
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/state.py", line 2423, in call
ret = self.states[cdata["full"]](
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 159, in __call__
ret = self.loader.run(run_func, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1245, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1260, in _run_as
return _func_or_method(*args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1293, in wrapper
return f(*args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/module.py", line 396, in run
return _run(**kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/module.py", line 451, in _run
func_ret = _call_function(
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/module.py", line 497, in _call_function
mret = salt.utils.functools.call_function(__salt__[name], *func_args, **func_kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/functools.py", line 174, in call_function
return salt_function(*function_args, **function_kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 159, in __call__
ret = self.loader.run(run_func, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1245, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1260, in _run_as
return _func_or_method(*args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/btrfs.py", line 394, in resize
if not salt.utils.fsutils._is_device(mountpoint):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/fsutils.py", line 115, in _is_device
out = __salt__["cmd.run_all"]("file -i {}".format(path))
NameError: name '__salt__' is not defined
Started: 05:56:38.877384
Duration: 2.188 ms
Changes:
Expected behavior
it should work, it seems that if I specify a size and not max it's not erroring.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
salt-call --versions-reportSalt Version:
Salt: 3006.6Python Version:
Python: 3.10.13 (main, Nov 15 2023, 04:37:53) [GCC 11.2.0]Dependency Versions:
cffi: 1.14.6cherrypy: 18.6.1dateutil: 2.8.1docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 3.1.3libgit2: Not Installedlooseversion: 1.0.2M2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.2msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 22.0pycparser: 2.21pycrypto: Not Installedpycryptodome: 3.19.1pygit2: Not Installedpython-gnupg: 0.4.8PyYAML: 6.0.1PyZMQ: 23.2.0relenv: 0.14.2smmap: Not Installedtimelib: 0.2.4Tornado: 4.5.3ZMQ: 4.3.4System Versions:
dist: ubuntu 22.04.3 jammylocale: utf-8machine: aarch64release: 6.2.0-1018-awssystem: Linuxversion: Ubuntu 22.04.3 jammy
The text was updated successfully, but these errors were encountered:
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!
Description
When calling the module
btrfs.resize
from amodule.run
stanza it fails withNameError: name '__salt__' is not defined
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior
Have a sls file with this content:
When
/data
is a mountedbtrfs
filesystem.I'm getting
Expected behavior
it should work, it seems that if I specify a size and not max it's not erroring.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)The text was updated successfully, but these errors were encountered: