-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3006.x] Handle permissions access error when calling ls_release
with the salt user
#65024
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
s0undt3ch
commented
Aug 22, 2023
salt-project-bot-prod-environment
bot
changed the title
Handle permissions access error when calling
[3006.x] Handle permissions access error when calling Aug 22, 2023
ls_release
with the salt userls_release
with the salt user
s0undt3ch
force-pushed
the
hotfix/photonos-4-arm64
branch
from
August 22, 2023 08:09
9b5b345
to
f1655dc
Compare
dmurphy18
reviewed
Aug 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering about missing grains such as os_family if early return
s0undt3ch
force-pushed
the
hotfix/photonos-4-arm64
branch
3 times, most recently
from
August 24, 2023 08:34
90718ca
to
fed0dae
Compare
dmurphy18
previously approved these changes
Aug 24, 2023
Ch3LL
suggested changes
Aug 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add a regression test here?
…alt user ``` [ERROR ] [SaltMaster(id='master-NkEYGW')] An un-handled exception was caught by Salt's global exception handler: CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 126. Traceback (most recent call last): File "/usr/bin/salt-master", line 11, in <module> sys.exit(salt_master()) File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/scripts.py", line 88, in salt_master master.start() File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/cli/daemons.py", line 204, in start self.master.start() File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 723, in start chan = salt.channel.server.PubServerChannel.factory(opts) File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/channel/server.py", line 721, in factory return cls(opts, transport, presence_events=presence_events) File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/channel/server.py", line 727, in __init__ self.aes_funcs = salt.master.AESFuncs(self.opts) File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 1233, in __init__ self.mminion = salt.minion.MasterMinion( File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/minion.py", line 974, in __init__ self.opts = salt.config.mminion_config( File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/config/__init__.py", line 2332, in mminion_config opts["grains"] = salt.loader.grains(opts) File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/__init__.py", line 1116, in grains ret = funcs[key]() 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/grains/core.py", line 2602, in os_data grains.update(_linux_distribution_data()) File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/grains/core.py", line 2189, in _linux_distribution_data return _legacy_linux_distribution_data(grains, os_release, lsb_has_error) File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/grains/core.py", line 2324, in _legacy_linux_distribution_data x.strip('"').strip("'") for x in _linux_distribution() File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/platform.py", line 21, in linux_distribution return distro.name(), distro.version(best=True), distro.codename() File "/opt/saltstack/salt/lib/python3.10/site-packages/distro.py", line 287, in version return _distro.version(pretty, best) File "/opt/saltstack/salt/lib/python3.10/site-packages/distro.py", line 741, in version self.lsb_release_attr('release'), File "/opt/saltstack/salt/lib/python3.10/site-packages/distro.py", line 903, in lsb_release_attr return self._lsb_release_info.get(attribute, '') File "/opt/saltstack/salt/lib/python3.10/site-packages/distro.py", line 556, in __get__ ret = obj.__dict__[self._fname] = self._f(obj) File "/opt/saltstack/salt/lib/python3.10/site-packages/distro.py", line 1014, in _lsb_release_info stdout = subprocess.check_output(cmd, stderr=devnull) File "/opt/saltstack/salt/lib/python3.10/subprocess.py", line 421, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/opt/saltstack/salt/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 126. ``` Signed-off-by: Pedro Algarvio <[email protected]>
Signed-off-by: Pedro Algarvio <[email protected]>
s0undt3ch
force-pushed
the
hotfix/photonos-4-arm64
branch
from
August 25, 2023 08:23
fed0dae
to
ccd490e
Compare
Ch3LL
approved these changes
Aug 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.