salt icon indicating copy to clipboard operation
salt copied to clipboard

[master] set the osfullname grain on *BSD

Open rnagy opened this issue 3 years ago • 5 comments

What does this PR do?

Fixes a runtime error because osfullname was not set on *BSD

Previous Behavior

Traceback (most recent call last): File "/usr/local/bin/salt-master", line 33, in sys.exit(load_entry_point('salt==3006.0', 'console_scripts', 'salt-master')()) File "/usr/local/lib/python3.10/site-packages/salt/scripts.py", line 89, in salt_master master.start() File "/usr/local/lib/python3.10/site-packages/salt/cli/daemons.py", line 204, in start self.master.start() File "/usr/local/lib/python3.10/site-packages/salt/master.py", line 723, in start chan = salt.channel.server.PubServerChannel.factory(opts) File "/usr/local/lib/python3.10/site-packages/salt/channel/server.py", line 721, in factory return cls(opts, transport, presence_events=presence_events) File "/usr/local/lib/python3.10/site-packages/salt/channel/server.py", line 727, in init self.aes_funcs = salt.master.AESFuncs(self.opts) File "/usr/local/lib/python3.10/site-packages/salt/master.py", line 1233, in init self.mminion = salt.minion.MasterMinion( File "/usr/local/lib/python3.10/site-packages/salt/minion.py", line 974, in init self.opts = salt.config.mminion_config( File "/usr/local/lib/python3.10/site-packages/salt/config/init.py", line 2328, in mminion_config opts["grains"] = salt.loader.grains(opts) File "/usr/local/lib/python3.10/site-packages/salt/loader/init.py", line 1116, in grains ret = funcskey File "/usr/local/lib/python3.10/site-packages/salt/loader/lazy.py", line 149, in call return self.loader.run(run_func, *args, **kwargs) File "/usr/local/lib/python3.10/site-packages/salt/loader/lazy.py", line 1232, in run return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs) File "/usr/local/lib/python3.10/site-packages/salt/loader/lazy.py", line 1247, in _run_as return _func_or_method(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/salt/grains/core.py", line 2682, in os_data _osrelease_data(grains["os"], grains["osfullame"], grains["osrelease"]) KeyError: 'osfullame'

New Behavior

working as expected

rnagy avatar Apr 28 '23 17:04 rnagy

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 [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

welcome[bot] avatar Apr 28 '23 17:04 welcome[bot]

Can you please add test coverage around the newly added keys to the grains dictionary?

There is already test coverage for the osfullname grain.

rnagy avatar May 05 '23 13:05 rnagy

Closing this due to inactivity. Anyone should feel free to re-open it if they want to see it through to the end in one release cycle.

@rnagy Feel free to re-open this and add a changelog.

dwoz avatar Dec 11 '23 21:12 dwoz

Can we reopen this please? I have prepped the missing changelog for this to move forward.

rnagy avatar Dec 10 '25 10:12 rnagy

It will also need a test, please. It also might be a good idea to get this into the 3006.x branch as it is an issue there as well. We try to fix bugs on the oldest supported branch where the bug exists.

twangboy avatar Dec 10 '25 14:12 twangboy