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

3004: Ignore non utf8 characters while reading files with core grains module #558

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.

Note: No need to backport it. As it makes sense for salt running with Python 3

Previous Behavior

Possible tracebacks on invoking core grains module.

New Behavior

Normal behavior with ignoring characters causing the tracebacks.

What issues does this PR fix or reference?

Upstream PR: saltstack/salt#62633
Tracks: https://github.com/SUSE/spacewalk/issues/18668

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 force-pushed the ignore-non-utf8-with-core-grains-3004 branch from 3383b03 to 777fcaa Compare September 13, 2022 19:44
@agraul
Copy link
Member

agraul commented Sep 14, 2022

Let's try again!

@agraul agraul merged commit b4945a0 into openSUSE:openSUSE/release/3004 Sep 14, 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

2 participants