Repository navigation
[FEATURE REQUEST] Debian grains do not report minor version #70516
Replies: 10 comments
|
@nf-brentsaner Just ran |
|
Note: /etc/debian_version is where the minor is |
|
@nf-brentsaner I understand where the /etc/debian_version is where the minor version is, but the grains for Debian / Ubuntu platforms make use of lsb_release, which is providing the information. It used to provide the minor version, thinking back to 8.6 being reported, but it is now only reporting major versions |
|
What then is the purpose of then |
|
@nf-brentsaner Not all platforms have lsb_release support, so osrelease grains are there in general, and lsb_release also provided on those platforms which do. The grains handling for operating systems was re-architected a few years ago, to more accurately utilize the information provided by the OS, that is /etc/os-release etc. The fact that Debian and lsb_release or /etc/os-release on Debian 12 is no longer providing minor versions is beyond the control of Salt, esp. when it used to, go look at Note: Ubuntu And understand this not reporting minor version has been around since Debian 10, but missed. So first to notice this, thanks for bringing it to attention. Also wanted to draw your attention to the understanding on using /etc/os-release, Lines 2221 to 2224 in 58c89a8 |
|
As for Rocky 9, and suggestion on osfinger, there is no information as to patch level etc in /etc/os-release For Ubuntu 24.04 For osfinger suggestion, could grab the 24.04.1 for patch level etc. If interested in this, then please add a 'Feature Request' against the master branch for the added functionality, detailing the additional functionality and how it would work on RedHat, Debian/Ubuntu, Windows and MacOS families. |
|
@nf-brentsaner Are you interested in adding the feature request, if so, please turn this into a feature request otherwise please consider closing this issue, given the current code is replying with the contents from the underlying OS. |
|
Potentially- the issue I have here is ultimately if /etc/os-release is intended to be the authoritative source, then this is functionally a Debian bug- but it's still release info useful to Salt. So this would likely need to be fixed upstream, but the alternative would be a new grain- something like Add onto that, including the minor in Would it then make more sense to target a future version of Salt or a future release of the distro for such breaking changes? etc. So kind of.. unsure what the decision process on that typically is. |
|
@nf-brentsaner It would be in a future version of Salt, for example: 3008 which isn't shipping and the next version of Salt. All new features are going into that future version. Could add to the code for Debian to read |
|
This feature request was moved out of the issue tracker as part of a backlog cleanup — there is no active development commitment behind it. If you intend to implement this, please leave a comment and a maintainer can convert the discussion back to an issue to track the PR. |
Uh oh!
There was an error while loading. Please reload this page.
Description
See below; Debian does not include minor version in grains.
Setup
N/A
Steps to Reproduce the behavior
# salt --out=json 'DEBIAN_MINION' grains.items | grep -Ev '^jid:' | jq '.[] | with_entries(if (.key|test("^(os|lsb)")) then ( {key: .key, value: .value } ) else empty end )'{ "os": "Debian", "os_family": "Debian", "oscodename": "bookworm", "osfullname": "Debian GNU/Linux", "lsb_distrib_id": "Debian GNU/Linux", "lsb_distrib_release": "12", "lsb_distrib_codename": "bookworm", "osrelease": "12", "osarch": "amd64", "osrelease_info": [ 12 ], "osmajorrelease": 12, "osfinger": "Debian-12" }Yet, e.g.:
Expected behavior
e.g. on AlmaLinux:
# salt --out=json 'ALMA_MINION' grains.items | grep -Ev '^jid:' | jq '.[] | with_entries(if (.key|test("^(os|lsb)")) then ( {key: .key, value: .value } ) else empty end )'{ "os": "AlmaLinux", "os_family": "RedHat", "oscodename": "Cerulean Leopard", "osfullname": "AlmaLinux", "lsb_distrib_id": "AlmaLinux", "lsb_distrib_release": "8.10", "lsb_distrib_codename": "Cerulean Leopard", "osrelease": "8.10", "osarch": "x86_64", "osrelease_info": [ 8, 10 ], "osmajorrelease": 8, "osfinger": "AlmaLinux-8" }Both the major and minor are available via
lsb_distrib_release,osrelease, andosrelease_info.(One may argue the
osfingershould include any minor/patch/revision version info as well, but c'est la vie.)Screenshots
N/A
Versions Report
N/A, see above
Additional context
N/A
All reactions