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
"Alternatives" not being set on Amazon AMI #120
Comments
Looks like all of the other java tools are being pointed at Java 7 properly, but
|
@awesometown, out of curiosity, can you try using the latest from master? I'm wondering if #119 may have fixed it. We really need to figure out a better way to have test coverage for upgrades... |
I was able to replicate this (at least installing openjdk-7 fresh). It looks like the home directory isn't being set properly for RHEL families. @awesometown, could you try the latest from master? Specifically: 71dadbd |
Doesn't look like it.
|
Yeah, that was my fix - Can you figure out what the alternative priority for |
We're pushing the bounds of my linux knowledge here, but if I do
Which I guess is saying that Java 6 has a priority of 16000 while Java 7 only has 1700? |
Yep, that explains it. How it ever got into that state, I'm not sure - the cookbook only sets things at around 1600 or 1700. Amazon Linux must use different priority defaults. I suppose the alternatives logic should be rewritten to set the alternatives at the next-highest priority so that they take effect for sure. |
So, I'm not convinced priority is an issue here at all. It looks like the alternatives code uses |
This should be fixed in v1.19.2 |
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. |
I'm trying to launch an Amazon Linux instance in OpsWorks and have it get upgraded to Java 7. It appears that it's getting installed fine, but the call to set it as the default version using alternatives isn't taking. When I log into the instance and run "java -version" I still get:
If I run
sudo alternatives --config java
I seeSelecting
2
makes the change as expected.I believe I've included the relevant bits of the log below, and there are no obvious errors. If I switch the instance type in OpsWorks to be Ubuntu, everything works fine (but then some other recipes that are more finicky break).
The only custom json I'm passing in is to specify java 7:
Sorry if I've missed something obvious; I'm pretty new to all of this, but as far as I can tell, this should just work?
The text was updated successfully, but these errors were encountered: