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
Patch level of Suse Linux Enterprise Server (SLES) not reported #8428
Comments
It also seems like sles is not reporting the patchlevel with the lsb release:
Centos looks like this:
|
Just for the record and at the risk of getting beaten...seems like facter uses the distrospecific relase files to set operatingsystemrelease:
As far as I saw salt only uses these files if it fails to use the lsb relase library or the /etc/lsb-release file is not available. |
So the problem lies with python's platform library and lsb_release, right? And you would just like a workaround until those get fixed? Sounds reasonable, and it looks like it will be fairly straightforward. |
Yes lsb_release doesn’t give back a code name nor any indication to what service pack its running. So you don’t get the revision details like you do in redhat/centOS. Just checked this on my servers to confirm. Where is the code that checks for this patch level in the source? I couldn’t find it.. cat /etc/issue on my SLES box gives me the service pack level
|
The code setting the grain is in grains/core.py. I think it would be better to use /etc/SuSE-release to determine the version, as it would fit with the other solutions (and it would also be more easy to parse). I also think this is easy to implement, if it still is unsolved by next week I will porbably give it a shot. |
Makes sense! Ill have a look at the code tonight as have some spare time. And as you say it shouldn’t be that difficult. Thanks |
Knocked this together last night not sure how accurate it is as this is my first attempt at a patch. So have a couple of questions for you guys. Hope you can help.
What is standard practise to test this? Once its tested how do I attempt to merge it with development branch? |
I've not contributed to salt stack, but I guess the "standard" procedure is:
I'm happy to try your code once it is clear at which lines it is added. |
@hhenkel Nailed it. =) |
Right tested locally got it working will create pull request and get some feedback on it. |
Pull request in |
I know that I'm kind of late....hadn't had time to check if that fixes anything for me. For me the problem is still not fixed:
This is the actual version:
Looking at the code of core.py I would say this is related to this:
As this code here ( https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L800-809) is not throwing an exception I still not see the correct information. |
Okay just played around with the code (https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L800-809) and this is not the issue. Problem is, that "/etc/lsb-release" exists but does not include useful info:
Therefore the "/etc/SuSE-release" code is never reached. |
Yep just looking at it now. I cant now test this as I have actually moved jobs since submitting this don’t have nay SLES servers kicking around! But what your saying seems to be the case. I asked a SUSE engineer about this and they have responded saying that its working as designed and its not meant to respond like the RHEL lsb. So something permanent will need to be put in for this. Maybe shift the /etc/SUSE/ check before the lsb check? EDIT: Also this did work before for my SLES servers something been tweaked in this grain? |
Sorry for my slowness re-opening this one. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Running salt on centos / rhel the os release is reported with the minor version included:
Running the same on a SLES 11 SP3 you get:
It seems like this behavior is triggered by the python platform code:
Centos:
SLES:
Digging through the code revealed that there is code to look in the /etc/*-release files. That would help for SLES till upstream is fixed:
Almost forgot to mention, I'm running salt 0.17.1 ...
The text was updated successfully, but these errors were encountered: