salt
salt copied to clipboard
[BUG] Setting `enable_fqdns_grains: False` does not work
Description
On a standalone minion, when setting enable_fqdns_grains: False
grains with fqdns
in their name are loaded upon running salt-call grains.items -l all
.
Setup
The minion is setup in a VM managed via ProxMox, CentOS Stream 8.
Steps to Reproduce the behavior
- Setup standalone minion
- Configure minion
sed -e 's/.*enable_fqdns_grains:.*/enable_fqdns_grains: False/' -i /etc/salt/minion
- Run
salt-call grains.items -l all
- See that fqdn related grains are loaded
... [TRACE ] Loading core.append_domain grain [TRACE ] Loading core.cwd grain [TRACE ] Loading core.default_gateway grain [TRACE ] Loading core.dns grain [TRACE ] Loading core.fqdns grain <<<<< [TRACE ] Loading core.get_machine_id grain [TRACE ] Loading core.get_master grain [TRACE ] Loading core.get_server_id grain [TRACE ] Loading core.hostname grain [TRACE ] Loading core.hwaddr_interfaces grain [TRACE ] Loading core.id_ grain [TRACE ] Loading core.ip4_interfaces grain [TRACE ] Loading core.ip6_interfaces grain [TRACE ] Loading core.ip_fqdn grain <<<<< [TRACE ] Loading core.ip_interfaces grain [TRACE ] Loading core.kernelparams grain [TRACE ] Loading core.locale_info grain [TRACE ] Loading core.os_data grain ...
Expected behavior I would expect that no fqdn related grains are loaded after setting this option.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3004.2
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: 4.0.9
gitpython: 3.1.27
Jinja2: 3.1.2
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.4
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: 3.15.0
pygit2: Not Installed
Python: 3.9.13 (main, Jun 24 2022, 15:32:51)
python-gnupg: Not Installed
PyYAML: 6.0
PyZMQ: 21.0.2
smmap: 5.0.0
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.3
System Versions:
dist: centos 8
locale: utf-8
machine: x86_64
release: 4.18.0-365.el8.x86_64
system: Linux
version: CentOS Stream 8
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:
- Community Wiki
- Salt’s Contributor Guide
- Join our Community Slack
- IRC on LiberaChat
- Salt Project YouTube channel
- Salt Project Twitch channel
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 [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!
@MLNW Thanks for the report. To be clear, if enable_fqdns_grains
is set to False the grain module will still be loaded by the Salt loader but the network.fqdns
function will not run and the fqdns
grain will not be populated. Are you seeing the grain populated even with enable_fqdns_grains
set to False?