Bug 1126680

Summary: rabbitmq-plugins is not in the default $PATH and need for detailed information for those plug-in setting.
Product: Red Hat OpenStack Reporter: Yoshinori Takahashi <hkim>
Component: rabbitmq-serverAssignee: John Eckersberg <jeckersb>
Status: CLOSED ERRATA QA Contact: Ami Jeain <ajeain>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 5.0 (RHEL 7)CC: aberezin, ajeain, apevec, dnavale, dyocum, jeckersb, lhh, mburns, nyechiel, yeylon
Target Milestone: z4Keywords: ZStream
Target Release: 5.0 (RHEL 7)Flags: jeckersb: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rabbitmq-server-3.3.5-3.el7ost Doc Type: Bug Fix
Doc Text:
Previously, the rabbitmq-plugins command was not available in the default path. As a result, trying to run rabbitmq-plugins command would result in a 'Command Not Found' error. With this update, the rabbitmq-plugins command is added to the default path and it executes as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-16 14:37:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 John Eckersberg 2014-11-05 15:54:52 UTC
Fedora bug 1033305

Comment 3 Dan Yocum 2014-11-06 12:53:56 UTC
Ah! Yoshinori must have run into the same issue that I did at the same time!  

Additionally, the rabbitmq puppet module in puppetforge requires rabbitmq-env and rabbitmq-defaults to exist in /usr/sbin, too.

Comment 4 Dan Yocum 2014-11-06 14:51:31 UTC
Also, please fix this for RHELv6, too.

Comment 5 John Eckersberg 2014-11-12 15:30:05 UTC
(In reply to Dan Yocum from comment #3)
> Ah! Yoshinori must have run into the same issue that I did at the same time!
> 
> 
> Additionally, the rabbitmq puppet module in puppetforge requires
> rabbitmq-env and rabbitmq-defaults to exist in /usr/sbin, too.

Can you elaborate on this?  I don't see where this is the case in the puppetforge module.

Comment 6 Dan Yocum 2014-11-17 18:55:17 UTC
rabbitmq-env is required in the config.pp, lines 80-88:

https://github.com/puppetlabs/puppetlabs-rabbitmq/blob/master/manifests/config.pp#L80-L88

And rabbitmq-env spurces rabbitmq-default on line 41:

## Set defaults
. ${SCRIPT_DIR}/rabbitmq-defaults

Comment 7 John Eckersberg 2014-11-17 20:48:04 UTC
(In reply to Dan Yocum from comment #6)
> rabbitmq-env is required in the config.pp, lines 80-88:
> 
> https://github.com/puppetlabs/puppetlabs-rabbitmq/blob/master/manifests/
> config.pp#L80-L88
> 
> And rabbitmq-env spurces rabbitmq-default on line 41:
> 
> ## Set defaults
> . ${SCRIPT_DIR}/rabbitmq-defaults

Ok, I don't believe we need these in the path.  The puppet referenced relates to /etc/rabbitmq/rabbitmq-env.conf, not to the rabbitmq-env script under /usr/lib/rabbitmq/bin.  This gets pulled in like this:

- systemd starts rabbitmq-server via /usr/lib/rabbitmq/bin/rabbitmq-server

- /usr/lib/rabbitmq/bin/rabbitmq-server sources the rabbitmq-env script with:

  . `dirname $0`/rabbitmq-env

  Which will expand to /usr/lib/rabbitmq/bin/rabbitmq-env and thus doesn't need to be present in /usr/sbin/

- /usr/lib/rabbitmq/bin/rabbitmq-env sources rabbitmq-defaults with (abbreviated):

  SCRIPT_PATH="$0"
  SCRIPT_DIR=`dirname $SCRIPT_PATH`
  . ${SCRIPT_DIR}/rabbitmq-defaults

- rabbitmq-defaults sets:

  CONF_ENV_FILE=${SYS_PREFIX}/etc/rabbitmq/rabbitmq-env.conf

- And finally, back in rabbitmq-env it does:

  [ -f ${CONF_ENV_FILE} ] && . ${CONF_ENV_FILE} || true

So it all hinges on the fact that everything else is relative to the original directory that rabbitmq-server is in (/usr/lib/rabbitmq/bin) and the fact that CONF_ENV_FILE is (mostly) hardcoded in /usr/lib/rabbitmq/bin/rabbitmq-env.  For now, I'm going to just fix the rabbitmq-plugins bit.  If it turns out that I'm wrong somewhere in the twists and turns above, we can certainly revisit the other bits.

Comment 10 Ami Jeain 2015-03-30 12:32:29 UTC
verified:
rabbitmq-plugins is now in the default $PATH (/usr/sbin)

Comment 12 errata-xmlrpc 2015-04-16 14:37:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0825.html