Bug #11658
Noticed operatingsystemrelease isn't trying to use lsbdistrelease on Linux boxes
| Status: | Accepted | Start date: | 12/31/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | library | |||
| Target version: | - | |||
| Keywords: | Affected Facter version: | 1.6.4 | ||
| Branch: | ||||
| Votes: | 2 |
Description
Causing some of my code to fail on the upcoming Ubuntu LTS 12.04. Basically it’s got a ton of conditionals in this file, which I can see the utility of having in case LSB isn’t available. However, I think the more clever, and proper way to handle this, is on Facter.value(:kernel) == “Linux”, first try to use lsbdistrelease to fill in operatingsystemrelease if it’s there, then fall back to these sort of rough around the edges determination methods if it’s not available.
This is what the fact operatingsystemrelease shows on my 12.04 test box:
operatingsystemrelease => 3.2.0-2-generic
This is cause it can’t glean the info from /etc/issue (which is a pretty unreliable place to look for OS info) so it uses kernelrelease… I am kind of depending on a version here which is the other problem. Should this fact contain strings? I’d have a patch ready for you guys but I think this is a design question really…
Related issues
History
Updated by Daniel Pittman 5 months ago
- Status changed from Unreviewed to Needs Decision
- Assignee set to Ken Barber
Ken, it feels to me like this is a reasonable expectation, but you might have better insight into why it isn’t that way already.
Updated by Ken Barber 3 months ago
- Category set to library
- Status changed from Needs Decision to Accepted
- Target version set to 186
Agreed. But this is 2 issues …
- Use lsb as a fallback, we already do this for amazon it looks like
- Handle Ubuntu LTS 12 properly without LSB (as not everyone has LSB)
I’ve created a ticket for the second issue: #12504.
Updated by Daniel Pittman 2 months ago
- Target version deleted (
186)
Updated by Hailee Kenney 11 days ago
- Assignee changed from Ken Barber to Hailee Kenney
Updated by Hailee Kenney 10 days ago
Doing lsbdistrelease first for all Linuxes seems like a reversal of the confine logic, where it starts at most specific and then generalizes. Are we sure that’s what we want?
Updated by Hailee Kenney 10 days ago
Facter works the way it should on the release version of Ubuntu 12.04:
puppet@ubuntu-12-04: /etc/apt$ facter operatingsystemrelease 12.04
We still have the question about lsbdistrelease, but at least it’s returning the right thing Ubuntu 12.04.