-
Notifications
You must be signed in to change notification settings - Fork 73
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
Install lsb-release on Ubuntu 16/18 docker images #244
Conversation
Codecov Report
@@ Coverage Diff @@
## master #244 +/- ##
=========================================
- Coverage 0.52% 0.52% -0.01%
=========================================
Files 14 14
Lines 2477 2486 +9
=========================================
Hits 13 13
- Misses 2464 2473 +9
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this really works. It's not a deep merge so this part will overwrite it:
beaker-hostgenerator/lib/beaker-hostgenerator/hypervisor/docker.rb
Lines 40 to 42 in 08f6074
docker_commands << "apt-get install -y net-tools wget #{extra_packages_to_install.join(' ')}" | |
docker_commands << 'locale-gen en_US.UTF-8' | |
docker_commands << 'echo LANG=en_US.UTF-8 > /etc/default/locale' |
Please change it there.
e7c3dfb
to
d4ef3d4
Compare
Wouldn't the rest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking a step back: doing so gives the impression you can always count on these facts. That can lead to subtle breakages. For example, I think in the case of Zabbix the solution is to use safer methods that don't fail as hard (voxpupuli/puppet-zabbix#813 (comment)). Nginx now passes so I no longer see why it failed. It may need a similar treatment.
I think I'm generally more in favor of that than pretending it's always present. For example, now it won't be in the README and users may run into it and find out the hard way.
IMO these facts on Puppet 7 are supposed to be always present like I agree, though, that accessing facts in a more secure way should become a coding guideline here in Voxpupuli. E.g we already have the "no topscope variables for facts" maybe we should enforce I still believe this PR still has its value since multiple modules' PRs are failing due to this right now and migrating away from these facts or accessing them with |
IMHO if modules fail on this, that's legitimate. They should be dealing with it differently. My reasoning is that you may have the following code: package { 'lsb-release':
ensure => installed,
} Then you would eventually be consistent. However, because the catalog fails to compile when using Perhaps we should have a lint rule that says "Don't ever write |
That's a good point actually. I believe that Linting this is a good idea for Voxpupuli. Puppet Inc. uses these facts on some their modules as well: So some our workflows will still fail because of external modules. |
Soooooo, what's the recommended solution for this? :) puppet-prometheus is running into this as well. For me it sounds totally valid that hostgenerator adds lsb-release for Ubuntu 16.04/18.04 as those Docker images contained it before. |
I'm still 👎 on this. If a module needs lsb-release, it should clearly state this and deal with it. It's not something you can count on. I don't have |
lsb_release
tools is now missing from Ubuntu 16/18 docker images causing acceptance puppet 6 tests to fail.Facter 3.x utilizes
lsb_release
tool for obtainingos.distro
fact.Some PRs that are failing due to this:
And probably all of the modules that use
os.distro
fact will fail on Ubuntu 16/18 platforms.P.S it's the first time touching this utility so any help is appreciated it 😄