[
https://issues.apache.org/jira/browse/CLOUDSTACK-7476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14125223#comment-14125223
]
ASF GitHub Bot commented on CLOUDSTACK-7476:
--------------------------------------------
Github user karuturi commented on the pull request:
https://github.com/apache/cloudstack/pull/17#issuecomment-54777280
4.4:packaging/debian/init/cloud-usage already has the new logic to set
$JAVA_HOME (e77da80e01b0774951e5c2ab1b23539af002b8b4)
Given that it is already in 4.3(3bf4c294313eb0bdb9597f0a2222f2cf6b81a8b4)
and master(c468228fe807c621decc5919dadae9bcbb38c753), I think we should port
the change to the file 4.4:packaging/centos63/cloud-usage.rc as well
> centos cloudstack-usage script does not always pass along $JAVA_HOME
> --------------------------------------------------------------------
>
> Key: CLOUDSTACK-7476
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7476
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Usage
> Affects Versions: 4.5.0
> Environment: secured centos/redhat
> Reporter: Leo Simons
> Fix For: 4.5.0
>
>
> /etc/init.d/cloudstack-usage finds a $JAVA_HOME and makes sure the
> environment variable is set, then assumes this variable will be picked up by
> JSVC.
> However, on a secured environment (selinux w/ env_reset enabled in sudoers),
> the runuser command that is invoked by the daemon() function does not pass
> along environment variables, so $JAVA_HOME is empty, and JSVC falls back to
> its default behavior, which may not find java or may not find the intended
> java.
> The simple solution is to pass -home to JSVC, passing it on the command line
> instead of as an environment variable.
> I'll provide a patch.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)