Skip to content
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

Upgrade function not respecting JAVA8_HOME settings. #341

Open
kien-truong opened this issue Jun 14, 2017 · 2 comments
Open

Upgrade function not respecting JAVA8_HOME settings. #341

kien-truong opened this issue Jun 14, 2017 · 2 comments

Comments

@kien-truong
Copy link

Upgrading presto server will fail with custom JDK location due to java's version check.

@akshatnair
Copy link
Member

Can you post the command you ran and also the error you are seeing?

@kien-truong
Copy link
Author

On a Centos 7 server with a custom jdk version 1.8_131 I ran

presto-admin server upgrade presto-server-rpm-0.179.rpm

The command failed during pre_install check because the default java7 was detected, instead of the custom jdk8 specified in java8_home. Checking the _rpm_upgrade function in package.py reveals that the variable is not sourced.

def _rpm_upgrade(package_name):
    return sudo('rpm -U %s%s' % (_nodeps_rpm_option(), package_name))

It should be similar to the _rpm_install, such as

def _rpm_upgrade(package_name):
    nodeps = _nodeps_rpm_option()
    if 'java8_home' not in env or env.java8_home is None:
        return sudo('rpm -U %s%s' % (nodeps, package_name))
    else:
        with shell_env(JAVA8_HOME='%s' % env.java8_home):
            return sudo('rpm -U %s%s' % (nodeps, package_name))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants