Comments (7)
@bastelfreak @jsosic @vfoucault @treydock @alexjfisher @pseiler - It looks like you have all touched the chkconfig
provider. Does anyone have an idea why self.class.all[name][:path]
would be failing on EL9?
from puppet-alternatives.
Aww.
~ $ docker run -ti almalinux:8 alternatives --list
ld auto /usr/bin/ld.bfd
libnssckbi.so.x86_64 auto /usr/lib64/pkcs11/p11-kit-trust.so
python auto /usr/libexec/no-python
~ $ docker run -ti almalinux:9 alternatives --list
ld auto /usr/bin/ld.bfd
libnssckbi.so.x86_64 auto /usr/lib64/pkcs11/p11-kit-trust.so
from puppet-alternatives.
Still, it seems like the provider should fail with a more useful error message?
from puppet-alternatives.
That error message is a common problem and yeah makes it tough to debug. I remember it from puppetlabs/puppetlabs-docker#749 too.
from puppet-alternatives.
I think this is because of all files in lib/puppet/provider/*/{chkconfig,dpkg}.rb.
Debian started a more modern implementation of (update-)alternatives. But chkconfig also provided an implementation.
But it seems on RHEL9 basically RedHat also switched to the dpkg implementation. So we need to implement conditional statements into the *.rb files which I'm not able to do so at the moment.
So starting with RHEL9 we should enable dpkg.rb instead of chkconfig.rb for RedHat systems.
It's always in the first lines of code.
from puppet-alternatives.
I was able to get it working on EL9 with the chkconfig provider. The root cause of the breakage was that EL9 doesn't have a python alternative entry by default. This snippet got it to work:
if versioncmp($facts['os']['release']['major'],'8') >= 0 {
package { 'python3': }
-> alternatives { 'python':
path => '/usr/bin/python3',
}
}
if versioncmp($facts['os']['release']['major'],'9') >= 0 {
alternative_entry {'/usr/bin/python3':
ensure => present,
altlink => '/usr/bin/python',
altname => 'python',
priority => 30,
}
-> Alternatives['python']
}
However, I believe this is still a valid bug as the provider shouldn't be throwing a stack trace for what is probably a common mis-configuration.
from puppet-alternatives.
Constraining the dpkg
provider to work on EL9 might be a little tricky, as EL9 doesn't include chkconfig
in the base package set, it still has a package for it.
I suppose we could try to do it by version strings
EL8:
[root@49a3153f2133 /]# /usr/sbin/alternatives --version
alternatives version 1.19.1
EL9:
[root@1df906319d3c /]# /usr/sbin/alternatives --version
alternatives version 1.20
However, the EL9 /usr/sbin/alternatives
does not seem to have the --get-selections
flag used in the dpkg
provider.
from puppet-alternatives.
Related Issues (20)
- SLES 12 and 15 do not work with puppet-alternatives HOT 2
- Support slave links HOT 1
- No new version on Puppet Forge since 2019 HOT 2
- Could not determine mode after upgrade to 4.1.0
- Error: Could not autoload puppet/provider/alternatives/chkconfig HOT 1
- Add support for Puppet 8 HOT 1
- Warnings when using Module HOT 1
- Missing provider for AWS Linux
- manual install HOT 2
- How does one set alternative entry back to 'auto' mode? HOT 2
- Release to forge HOT 3
- plugin sync error? HOT 3
- alternative_entry keying to the wrong parameter?
- seting multiple alternatives to the same path HOT 6
- Debian 6 with Ruby 1.8.7 broken HOT 3
- missing alternatives is not added - it breaks instead HOT 3
- Using a full path for path is not always desirable. HOT 6
- check debian support
- Could not determine auto or manual mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-alternatives.