module grains.set not updating grains
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
I am trying to use grains.set to add some grains.
I can see that /usr/local/etc/salt/grains successfully updated, but I can not see it from grains.ls or grains.items. I also tried saltutil.refresh_grains with no avail.
To reproduce:
on minion:
salt-call grains.set carp master
salt-call saltutil.refresh_pillar
then, in /usr/local/etc/salt/grains
carp: master
salt-call grains.get carp
returns nothing
version report
Salt Version:
Salt: 2018.3.3
Dependency Versions:
cffi: 1.12.3
cherrypy: unknown
dateutil: 2.8.0
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10.1
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.33.0
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.1
mysql-python: 1.4.2.post1
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, May 15 2019, 05:26:05)
python-gnupg: Not Installed
PyYAML: 5.1
PyZMQ: 18.0.2
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist:
locale: UTF-8
machine: amd64
release: 11.2-RELEASE-p10
system: FreeBSD
version: Not Installed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with salt-call grains.set, salt-call saltutil.refresh_grains, and salt-call grains.get, checking /usr/local/etc/salt/grains as described. Trace the grains.set, saltutil.refresh_grains, and grains.get entry points to determine why the persisted grain is not loaded. Done means a grain set through grains.set is returned by grains.get, grains.ls, and grains.items.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100