You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by swill <gi...@git.apache.org> on 2017/02/10 18:48:32 UTC

[GitHub] cloudstack pull request #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME ...

GitHub user swill opened a pull request:

    https://github.com/apache/cloudstack/pull/1938

    CLOUDSTACK-9780: Fixed the default JAVA_HOME value to be Java8 if not set

    Now that PR-1888 is merged, Java8 is required.  Unfortunately, the file pushed to `/etc/cloudstack/management/classpath.conf` on ACS install will default the version to Java7 instead of Java8 if JAVA_HOME is unset.  This fix sets the default to Java8 if JAVA_HOME is not set.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/swill/cloudstack classpath

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1938.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1938
    
----
commit 6ee4a195f27fe59c61e96d0ab1c56dee0c05a52b
Author: Will Stevens <wi...@gmail.com>
Date:   2017-02-10T18:42:58Z

    Fixed the default JAVA_HOME value to be Java8 if not set

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    Ok, got it.
    Maybe in CentOS logical links get created during the installation of Java. Or maybe during the installation of ACS. The computer  I am using is not used to run ACS, but I use Java here, and this is why I asked you.
    
    my output: 
    ```
    lrwxrwxrwx  1 root root   20 Dec  1 12:48 java-1.6.0-openjdk-amd64 -> java-6-ope                                                                                                                                                             njdk-amd64/
    -rw-r--r--  1 root root 2387 Dec  1 12:48 .java-1.6.0-openjdk-amd64.jinfo
    lrwxrwxrwx  1 root root   20 Feb  7 20:10 java-1.7.0-openjdk-amd64 -> java-7-ope                                                                                                                                                             njdk-amd64/
    -rw-r--r--  1 root root 2439 Feb  7 20:10 .java-1.7.0-openjdk-amd64.jinfo
    drwxr-xr-x  5 root root 4096 Feb 10 14:00 java-6-openjdk-amd64/
    drwxr-xr-x  3 root root 4096 Feb 10 13:59 java-6-openjdk-common/
    drwxr-xr-x  5 root root 4096 Feb 10 13:57 java-7-openjdk-amd64/
    ```
    Anyways, I understand that you are following the current pattern. So, we may let this problem (if it turns out to be a problem) for our future selves. If people start having problems when updating to java JRE version bigger than 1.8.0.
    
    Having said that, LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @Swill, I have a question (actually two) :)
    
    If \u201cJAVA_HOME\u201d is not set, or if \u201cJAVA_HOME\u201d content does not exist, we check if there is a java installation. I have a doubt about this last path we are checking. Is this path \u201c/usr/lib/jvm/jre-1.8.0\u201d default (some sort of standard)?
    
    I ask because (at least on Debian, or at least the Debian I am using) whenever I install using \u201captitude\u201d, the java versions were added to folders following the pattern: \u201c/usr/lib/jvm/java-<version>-openjdk-<processorArchiteture>/jre/\u201d. Of course, this is for OpenJDK installed with \u201captitude\u201d.
    
    Are we assuming that the user when installing manually (e.g. installing the JRE from Oracle) will put Java JRE files in a folder like \u201c/usr/lib/jvm/jre-1.8.0\u201d?
    
    This will also only work for Java JRE 1.8.0, if users install Java JRE 1.8.1 and use the version as the name of the folder, this would not work. Of course, all can be fixed by setting the JAVA_HOME. 
    
    Would not it be better to cause an exception and stop the deployment with a message saying that we require the \u201cJAVA_HOME\u201d to be set? Then, it feels that we will be consistent; otherwise, I can imagine a user complaining that she/he has installed the Java 8 (1.8.x; where x > 0), but still ACS does not work. 
    
    What do you think?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by borisstoyanov <gi...@git.apache.org>.
Github user borisstoyanov commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @karuturi unfortunately we've hit an issue with the ubuntu images, didn't manage to deploy the Trillian env.. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @borisstoyanov a Trillian-Jenkins test job (ubuntu mgmt + kvm-ubuntu) has been kicked to run smoke tests


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    Packaging result: \u2714centos6 \u2714centos7 \u2714debian. JID-479


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by swill <gi...@git.apache.org>.
Github user swill commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    So the short answer is that I ran into this issue when I upgraded and since `jenv` did not correctly set the `JAVA_HOME` directory, I ran into this, so I don't have a deep understanding for all the details.  I made this change in my environment and everything worked.  I understand this is not a good answer, but that is what I have.
    
    I don't install to that path either, but for some reason it was populated in my environment.  Can you do an `$ ll /usr/lib/jvm/` and post what you get?  I am curious what it would return.  
    
    Here is the result from my CentOS 6.8 setup.
    
    ![image](https://cloud.githubusercontent.com/assets/13644/22841453/ae384516-ef9f-11e6-835a-60736d6a03dc.png)
    
    The way I see it right now, people WILL run into this issue.  This at least reduces the number of people who have problems.  



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @swill in my point of view, users should set java8 as default if they have multiple versions (we can add it in user guide).
    Although this PR is a ideal solution, this LGTM +1.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @swill I agree with @rafaelweingartner . I suggest to use the following setting ?
    JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by borisstoyanov <gi...@git.apache.org>.
Github user borisstoyanov commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @BlueOrangutan package


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    If someone use ubuntu 16.04/14.04, could you test #1916 as well ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by borisstoyanov <gi...@git.apache.org>.
Github user borisstoyanov commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @blueorangutan test ubuntu kvm-ubuntu


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by swill <gi...@git.apache.org>.
Github user swill commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @ustcweizhou I am not comfortable with that change. If more than one java is installed and Java 8 is not the default, then this will incorrectly set java_home (if I understand correctly). 
    
    I will leave my pr as is. It solves the problem the same way it was done in the past. If you would like to introduce a new approach and test it against the different distributions, please open a new PR with your new implementation. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cloudstack/pull/1938


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by swill <gi...@git.apache.org>.
Github user swill commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @rhtyd, @wido, @nvazquez, @rafaelweingartner please review...
    
    This fixes an issue with #1888.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    good point @swill. Thanks @borisstoyanov.
    Since the fix is no different from the earlier version for 1.7, I am assuming it should work for 1.8 as well on ubuntu.
    merging this now


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Re: [GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by Will Stevens <wi...@gmail.com>.
I doubt the test environment will do a test without java_home set, so it is
unlikely this fix will to tested with a run of that test.

On Feb 12, 2017 11:36 PM, "karuturi" <gi...@git.apache.org> wrote:

> Github user karuturi commented on the issue:
>
>     https://github.com/apache/cloudstack/pull/1938
>
>     @borisstoyanov can you post ubuntu test results?
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastructure@apache.org or file a JIRA ticket
> with INFRA.
> ---
>

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @borisstoyanov can you post ubuntu test results?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by borisstoyanov <gi...@git.apache.org>.
Github user borisstoyanov commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    @blueorangutan package


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1938: CLOUDSTACK-9780: Fixed the default JAVA_HOME value t...

Posted by nvazquez <gi...@git.apache.org>.
Github user nvazquez commented on the issue:

    https://github.com/apache/cloudstack/pull/1938
  
    Thanks @swill!
    
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---