refs #7264 - check for java, unless installing for capsule #110
Conversation
cfdc1a4
to
1ba56e0
Compare
|
Tested this to ensure we also bail if you have the IBM JVM installed. Works perfectly. Talked to @bbuckingham via IRC and mentioned dumping the conflicting package names in the error message so the user knows exactly what is causing the conflict. If that proves difficult, ACK to the above |
1ba56e0
to
ead284c
Compare
|
Currently, we are determining the installed version using 'java -version'. Since that doesn't translate well to the rpm name that is in use, the PR was updated to inform the user to perform 'java -version' to get more details on what is currently installed. The user should be able to tell visually which flavor (ibm, openjdk...etc) of java is installed along with the version. |
|
👍 |
ead284c
to
021e1e9
Compare
| kafo.class.exit code | ||
| end | ||
|
|
||
| unless param('capsule', 'pulp') && param('capsule', 'pulp').value |
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 may be interpreting this wrong, but isn't this saying if we are deploying a capsule without a Pulp node do a version check of Java? What happens if I am deploying just a TFTP Capsule?
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.
@ehelms, we should apply this to any capsule. What is the proper way to identify this as a capsule install?
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.
@ehelms, would checking "param('capsule')" accomplish that? (i.e apply this hook to any capsule install)
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.
That should do it.
On Aug 26, 2014 6:43 PM, "Brad Buckingham" notifications@github.com wrote:
In hooks/pre/15-check_java.rb:
@@ -0,0 +1,24 @@
+JAVA_VERSION = %q(An OpenJDK version of Java greater than 1.7 should be installed. For more details on the version currently installed, run 'java -version')
+
+OPENJDK = %q(A version of java which is not OpenJDK is installed.
+
+Please install an OpenJDK version greater than 1.7. For more details on the version currently installed, run 'java -version')
+
+
+def error_exit(message, code)
- $stderr.puts message
- kafo.class.exit code
+end
+unless param('capsule', 'pulp') && param('capsule', 'pulp').value
@ehelms https://github.com/ehelms, would checking "param('capsule')"
accomplish that? (i.e apply this hook to any capsule install)—
Reply to this email directly or view it on GitHub
https://github.com/Katello/katello-installer/pull/110/files#r16747669.
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.
Although, you may need to also check that Katello exists to identify a
server install.
On Aug 26, 2014 6:49 PM, "Eric D Helms" eric.d.helms@gmail.com wrote:
That should do it.
On Aug 26, 2014 6:43 PM, "Brad Buckingham" notifications@github.com
wrote:In hooks/pre/15-check_java.rb:
@@ -0,0 +1,24 @@
+JAVA_VERSION = %q(An OpenJDK version of Java greater than 1.7 should be installed. For more details on the version currently installed, run 'java -version')
+
+OPENJDK = %q(A version of java which is not OpenJDK is installed.
+
+Please install an OpenJDK version greater than 1.7. For more details on the version currently installed, run 'java -version')
+
+
+def error_exit(message, code)
- $stderr.puts message
- kafo.class.exit code
+end
+unless param('capsule', 'pulp') && param('capsule', 'pulp').value
@ehelms https://github.com/ehelms, would checking "param('capsule')"
accomplish that? (i.e apply this hook to any capsule install)—
Reply to this email directly or view it on GitHub
https://github.com/Katello/katello-installer/pull/110/files#r16747669.
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.
@ehelms, it looks like https://github.com/Katello/katello-installer/blob/master/hooks/post/10-post_install.rb#L9 (module_enabled?) might be a reasonable alternative as well. Going to test with that approach.and will update the PR in the morning when I complete the tests. Thanks for the feedback.
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.
Updated to use module_enabled?('katello'). The result is that we'll only check for java, when katello is enabled (i.e. server install).
021e1e9
to
ae848f3
Compare
…lasticsearch This commit moves the java check from a check to a hook, so that we can more easily differentiate the behavior for a capsule vs server install. In addition, if the installer is being run for the capsule, skip the java check, since the capsule does not require it. This commit is also updating the elasticsearch module to address the second item raised by issue 7264.
ae848f3
to
2022a15
Compare
|
LGTM |
|
ACK |
|
re-tested, works perfectly |
refs #7264 - check for java, unless installing for capsule
Merging master into content-views
This commit moves the java check from a check to a hook, so that
we can more easily differentiate the behavior for a capsule vs
server install. In addition, if the installer is being run for
the capsule, skip the java check, since the capsule does not require
it.