Comments (9)
It looks like this is happening because java/attribibutes/default.rb
is computing the value of node['java']['java_home']
before my override values take effect. This leaves java_home
in a bad state.
I've working around this issue by creating my own cookbook that depends on your cookbook but adds the following block first:
# java_home may have been computed too early. reload the attributes to fix it
b = ruby_block 'reset_java_home' do
block do
node.load_attribute_by_short_filename('default', 'java')
end
action :nothing
end
# run this action immediately. if I don't do this it either never runs (action :nothing)
# or runs too late (action :create)
b.run_action(:create)
Maybe java_home
should be computed inside the recipe after all attribute overrides have been applied?
from java.
What version of the cookbook are you using? I'm wondering if you see the same behavior with the latest, 1.16.2. If not, this is definitely a bug - JAVA_HOME should most certainly match the jdk you're actually using :(
from java.
This was with version 1.15.4.
I'm wondering if (pull request 95)[https://github.com//pull/95] will fix this issue though. It looks like it.
from java.
Yeah, that's what I was thinking. If you're still seeing issues after upgrading, there's a bug to fix.
from java.
Looks like it is fixed in 1.16.2.
from java.
@samperman it does sound like #95 would fix this -- it's one of the reasons I submitted that request
from java.
Thanks for the fix!
from java.
Glad this is sorted!
from java.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from java.
Related Issues (20)
- corretto_install extract directory problems HOT 3
- OpenJDK install with OS package manager (YUM) HOT 1
- Corretto checksums have changed HOT 5
- Custom resource name conflict HOT 1
- java_certificate resource :remove fails
- Please remove references to supporting Oracle/IBM HOT 3
- Cannot 'Include' in Run List HOT 3
- Corretto `version` property should accept specific versions, not just latest major versions HOT 7
- `archive_file` within `corretto_install` will not extract if directory already exists HOT 4
- AdoptOpenJDK install doesn't handle JAVA_HOME correctly HOT 10
- Feature: STARTTLS parameter for the java_certificate resource HOT 1
- Bad resource naming for openjdk_source_install HOT 1
- Chef Exceptions CookbookChefVersionMismatch: Cookbook 'java' version '8.5.0' depends on chef version [">= 15.0"], but the running chef version is 14.15.6 HOT 2
- Cannot upgrade java version HOT 12
- Multiple errors when upgrading from v4.0.0 to v8.4.0 HOT 7
- OpenJDK Alternatives don't set correctly on OpenSUSE HOT 2
- AdoptOpenJDK is now Adoptium Temurin and IBM Semeru HOT 2
- openjdk_pkg_install reset_alternatives all the times HOT 2
- Adoptium Temurin JDK 11 is breaking certificate install HOT 1
- Dependency Dashboard
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 java.