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
Fix windows osrelease grain #36379
Fix windows osrelease grain #36379
Conversation
Hi @twangboy The code that was copied from StackOverflow needs to be linted so that it passes tests, please. As far as the overall change goes, are you certain that you want to change core grains in a point release? Traditionally, this has been something that we have not done. This may make more sense in a major release. |
@cachedout, this grain has already changed in a point release, as a result of updating the Python version distributed with Windows. For example, what used to return However, I would personally prefer to maintain the grain value that was returned previously... e.g. |
I agree with @lorengordon, we should restore the grain to what it was before |
How does PY3 behavior? |
Py3 returns the same as Py2.7.12 |
PY3 also depends on the python version:
|
How are we all feeling about the latest changes here? |
Works for me if it works for you. I tested the patch and it does fix the issue.
|
Thanks, @lorengordon. I'll go ahead and get this in then. |
What does this PR do?
Properly gets the osrelease grain for Server versions of Windows.
What issues does this PR fix or reference?
#36307
Previous Behavior
OS name was removed in the python command platform.uname(). Python version 2.7.8 would return a value of "2008ServerR2" for Windows Server 2008 R2. We moved to Python 2.7.11 and later to 2.7.12 which both report the Desktop version of 7 instead of the server name of 2008ServerR2.
New Behavior
Properly detect windows server os release grain along with any applied service packs.
Tests written?
No