You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Tyler Hobbs (JIRA)" <ji...@apache.org> on 2011/04/18 22:39:05 UTC
[jira] [Created] (CASSANDRA-2499) cassandra-env.sh pattern matching
for OpenJDK broken in some cases
cassandra-env.sh pattern matching for OpenJDK broken in some cases
------------------------------------------------------------------
Key: CASSANDRA-2499
URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
Project: Cassandra
Issue Type: Bug
Components: Core
Affects Versions: 0.8
Reporter: Tyler Hobbs
With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
{noformat}
bin/../conf/cassandra-env.sh: 99: [[: not found
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2499) cassandra-env.sh pattern matching
for OpenJDK broken in some cases
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-2499:
--------------------------------------
Fix Version/s: 0.8
Assignee: Eric Evans
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8
> Reporter: Tyler Hobbs
> Assignee: Eric Evans
> Fix For: 0.8
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CASSANDRA-2499) cassandra-env.sh pattern
matching for OpenJDK broken in some cases
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-2499.
---------------------------------------
Resolution: Fixed
committed
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Packaging
> Affects Versions: 0.8 beta 1
> Reporter: Tyler Hobbs
> Assignee: Jackson Chung
> Priority: Minor
> Fix For: 0.8.0
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2499) cassandra-env.sh pattern matching
for OpenJDK broken in some cases
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-2499:
--------------------------------------
Reviewer: thobbs
Assignee: Jackson Chung (was: Eric Evans)
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8
> Reporter: Tyler Hobbs
> Assignee: Jackson Chung
> Fix For: 0.8
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2499) cassandra-env.sh pattern
matching for OpenJDK broken in some cases
Posted by "Jackson Chung (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021889#comment-13021889 ]
Jackson Chung commented on CASSANDRA-2499:
------------------------------------------
chances are the default /bin/sh is linked to dash, please run a ls -al /bin/sh to confirm
a minor fix could be remove the [[ and add "" around the variables and values.
-if [[ $java_version != *OpenJDK* ]]
+if [ "$java_version" != "*OpenJDK*" ]
a more drastic fix is to update all the /bin/sh with /bin/bash (if desired to only support on bash)
see ref: https://wiki.ubuntu.com/DashAsBinSh
suggest to be reviewed to make a decision.
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8
> Reporter: Tyler Hobbs
> Assignee: Eric Evans
> Fix For: 0.8
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CASSANDRA-2499) cassandra-env.sh
pattern matching for OpenJDK broken in some cases
Posted by "Tyler Hobbs (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022196#comment-13022196 ]
Tyler Hobbs edited comment on CASSANDRA-2499 at 4/20/11 4:28 PM:
-----------------------------------------------------------------
/bin/sh was a link to dash, and the current script seems to work fine with bash.
{noformat}
[ "$java_version" != "*OpenJDK*" ]
{noformat} works for me in both dash and bash.
was (Author: thobbs):
/bin/sh was a link to dash, and the current script seems to work fine with bash.
[ "$java_version" != "*OpenJDK*" ] works for me in both dash and bash.
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8
> Reporter: Tyler Hobbs
> Assignee: Eric Evans
> Fix For: 0.8
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2499) cassandra-env.sh pattern
matching for OpenJDK broken in some cases
Posted by "Jackson Chung (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022254#comment-13022254 ]
Jackson Chung commented on CASSANDRA-2499:
------------------------------------------
try this:
-java_version=`java -version 2>&1`
-if [[ $java_version != *OpenJDK* ]]
+check_openjdk=$(java -version 2>&1 | awk '{if (NR == 2) {print $1}}')
+if [ "$check_openjdk" != "OpenJDK" ]
{noformat}$ bash /tmp/testjdk java
version: Java(TM)
not OpenJDK
$ dash /tmp/testjdk /usr/bin/java
version: OpenJDK
yes OpenJDK
$ cat /tmp/testjdk
check_openjdk=$($1 -version 2>&1 | awk '{if (NR ==2) {print $1}}')
echo "version: $check_openjdk"
if [ "$check_openjdk" != "OpenJDK" ]
then
echo "not OpenJDK"
JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.1.jar"
else
echo "yes OpenJDK"
fi
{noformat}
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8
> Reporter: Tyler Hobbs
> Assignee: Jackson Chung
> Fix For: 0.8
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CASSANDRA-2499) cassandra-env.sh
pattern matching for OpenJDK broken in some cases
Posted by "Jackson Chung (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021889#comment-13021889 ]
Jackson Chung edited comment on CASSANDRA-2499 at 4/20/11 1:11 AM:
-------------------------------------------------------------------
chances are the default /bin/sh is linked to dash, please run a ls -al /bin/sh to confirm
a minor fix could be remove the [[ and add "" around the variables and values.
-if [[ $java_version != \*OpenJDK\* ]]
+if [ "$java_version" != "\*OpenJDK\*" ]
a more drastic fix is to update all the /bin/sh with /bin/bash (if desired to only support on bash)
see ref: https://wiki.ubuntu.com/DashAsBinSh
suggest to be reviewed to make a decision.
was (Author: cywjackson):
chances are the default /bin/sh is linked to dash, please run a ls -al /bin/sh to confirm
a minor fix could be remove the [[ and add "" around the variables and values.
-if [[ $java_version != *OpenJDK* ]]
+if [ "$java_version" != "*OpenJDK*" ]
a more drastic fix is to update all the /bin/sh with /bin/bash (if desired to only support on bash)
see ref: https://wiki.ubuntu.com/DashAsBinSh
suggest to be reviewed to make a decision.
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8
> Reporter: Tyler Hobbs
> Assignee: Eric Evans
> Fix For: 0.8
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2499) cassandra-env.sh pattern
matching for OpenJDK broken in some cases
Posted by "Tyler Hobbs (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022218#comment-13022218 ]
Tyler Hobbs commented on CASSANDRA-2499:
----------------------------------------
Correction: the suggested replacement does *not* seem to detect OpenJDK.
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8
> Reporter: Tyler Hobbs
> Assignee: Jackson Chung
> Fix For: 0.8
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2499) cassandra-env.sh pattern
matching for OpenJDK broken in some cases
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022345#comment-13022345 ]
Hudson commented on CASSANDRA-2499:
-----------------------------------
Integrated in Cassandra-0.8 #30 (See [https://builds.apache.org/hudson/job/Cassandra-0.8/30/])
fix jdk verison check for sh/dash
patch by Jackson Chung; reviewed by thobbs and jbellis for CASSANDRA-2499
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Packaging
> Affects Versions: 0.8 beta 1
> Reporter: Tyler Hobbs
> Assignee: Jackson Chung
> Priority: Minor
> Fix For: 0.8.0
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2499) cassandra-env.sh pattern matching
for OpenJDK broken in some cases
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-2499:
--------------------------------------
Component/s: (was: Core)
Packaging
Priority: Minor (was: Major)
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Packaging
> Affects Versions: 0.8
> Reporter: Tyler Hobbs
> Assignee: Jackson Chung
> Priority: Minor
> Fix For: 0.8
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2499) cassandra-env.sh pattern
matching for OpenJDK broken in some cases
Posted by "Tyler Hobbs (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022196#comment-13022196 ]
Tyler Hobbs commented on CASSANDRA-2499:
----------------------------------------
/bin/sh was a link to dash, and the current script seems to work fine with bash.
[ "$java_version" != "*OpenJDK*" ] works for me in both dash and bash.
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8
> Reporter: Tyler Hobbs
> Assignee: Eric Evans
> Fix For: 0.8
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the JDK distribution seems to have some kind of syntax error. I get the following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira