Skip to content
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

Ignore non utf8 characters while reading files with core grains module #62633

Merged
merged 7 commits into from
Sep 19, 2022

Conversation

vzhestkov
Copy link
Contributor

What does this PR do?

UnicodeDecodeError exception is possible while reading one of the following files if there is any non utf8 character (for example 0x80):

  • /proc/1/environ
  • /proc/1/cmdline
  • /proc/cmdline

It's safe just to ignore these characters.

Previous Behavior

Possible tracebacks on invoking core grains module.

New Behavior

Normal behavior with ignoring characters causing the tracebacks.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes/No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@vzhestkov vzhestkov requested a review from a team as a code owner September 7, 2022 14:26
@vzhestkov vzhestkov requested review from MKLeb and removed request for a team September 7, 2022 14:26
@vzhestkov vzhestkov force-pushed the ignore-non-utf8-with-core-grains branch 2 times, most recently from c627b68 to bf3a593 Compare September 8, 2022 08:14
@vzhestkov vzhestkov force-pushed the ignore-non-utf8-with-core-grains branch from 57dfeac to 2db2ef6 Compare September 12, 2022 08:52
@vzhestkov vzhestkov force-pushed the ignore-non-utf8-with-core-grains branch from 2db2ef6 to e0fd5f6 Compare September 12, 2022 08:57
@Ch3LL Ch3LL merged commit 7ab9b06 into saltstack:master Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants