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 #556

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.

@SchoolGuy SchoolGuy changed the base branch from openSUSE-3004 to openSUSE/release/3004 September 12, 2022 11:25
@SchoolGuy SchoolGuy merged commit a6fb241 into openSUSE:openSUSE/release/3004 Sep 13, 2022
@agraul
Copy link
Member

agraul commented Sep 13, 2022

I had to remove a6fb241 for a clean history, let's reopen the PR.

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.

3 participants