Comments (3)
Confirming am also affected by this problem.
- Puppet: 4.6.2
- Distribution: CentOS 7.3.11
- Module version: v1.1.0
I have to call alternatives directly via exec, e.g.:
exec { 'install keytool alternatives':
command => "/usr/sbin/alternatives --install /usr/bin/keytool keytool ${::java_default_home}/jre/bin/keytool 20000",
unless => "/usr/sbin/alternatives --list | grep keytool",
}
from puppet-alternatives.
Further detail on this problem is that the first invocation of any alternative_entry{} resource triggers "Prefetching rpm resources for alternative_entry," whereby the module runs "/usr/sbin/alternatives --display ..." on all defined entries. Return value >0 on any of these instances apparently causes the entire catalog to fail. This seems unreasonably fragile.
from puppet-alternatives.
My recurring problem is openjdk rpm under RHEL/CentOS sometimes leaves a broken alternatives entry for keytool. My resolution is have an exec remove the broken alternatives entry prior to any alternative_entry{} resource gets declared, which is awkward.
include java
# Remove broken alternatives entry before *any* alternative_entry{} resource
exec {
'remove broken keytool alternatives entry':
command => "rm -rf /var/lib/alternatives/keytool",
path => ['/usr/bin', '/usr/sbin', '/bin'],
onlyif => "egrep '^/usr/bin/keytool' /var/lib/alternatives/keytool",
unless => 'test -f /usr/bin/keytool';
}
Exec['remove broken keytool alternatives entry'] -> Alternative_Entry<| |>
# Now let puppet/alternatives add the keytools entry
alternative_entry { "${::java_default_home}/jre/bin/keytool":
ensure => present,
altlink => '/usr/bin/keytool',
altname => 'keytool',
priority => 20000, # This is priority set by puppetlabs/java
require => Class['java'],
}
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
- Could not evaluate: undefined method `[]' for nil:NilClass HOT 7
- 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
- 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.