Bug 1068789 - rhq scripts won't work in Ubuntu derived distributions
Summary: rhq scripts won't work in Ubuntu derived distributions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Launch Scripts
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ER01
: RHQ 4.10
Assignee: Jirka Kremser
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-21 21:51 UTC by Michael Burman
Modified: 2014-04-23 12:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-23 12:31:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Michael Burman 2014-02-21 21:51:09 UTC
Description of problem: Operations using internal/rhq-server.sh will not work in latest snapshot of RHQ 4.10 (4ec41696e0b3271bfd3d78fa1f5a57e08d4f88c2) in any Ubuntu derived systems, meaning the RHQ can't be installed on any Ubuntu-systems either (Mint included).

The rhq-server.sh uses substitutions and causes the following error:

./rhq-server.sh: 190: ./rhq-server.sh: Bad substitution

This is because in Ubuntu distributions the /bin/sh points to /bin/dash, which doesn't support these.

At least rhqctl start causes the same issue in different script:

michael@grace-mint ~/projects/rhq/dev-container/rhq-server/bin $ ./rhqctl start
 ____  _   _  ___  
|  _ \| | | |/ _ \ 
| |_) | |_| | | | |
|  _ <|  _  | |_| |
|_| \_\_| |_|\__\_\

23:49:15,072 INFO  [org.jboss.modules] JBoss Modules version 1.2.0.CR1
 INFO 23:49:15,423 Logging initialized
Trying to start the RHQ Server...
RHQ Server                     (pid 19772  ) is starting
./rhq-agent-wrapper.sh: 84: ./rhq-agent-wrapper.sh: Bad substitution
michael@grace-mint ~/projects/rhq/dev-container/rhq-server/bin $

Version-Release number of selected component (if applicable):
4.10-SNAPSHOT, 4ec41696e0b3271bfd3d78fa1f5a57e08d4f88c2

How reproducible: Always.


Steps to Reproduce:
1. rhqctl install
2. 
3.

Actual results:


Expected results: RHQ would install correctly.


Additional info: Replacing /bin/sh -> /bin/bash seems to do the trick in the rhq-server.sh, but it doesn't sound like an universal solution.

Comment 1 Michael Burman 2014-02-21 22:05:09 UTC
Commit 2b82ca62621b45c8117a31b365a98646637cf4d6 looks to be the reason (it adds coloring and those substitutes are not working).

Comment 2 John Mazzitelli 2014-02-21 22:16:02 UTC
Assigning to jirka, he introduced all the colors and graphics. We need to revert that until we are assured this works on all linux platforms that we support (like AIX, Solaris, and linux flavors).

Comment 3 John Mazzitelli 2014-02-21 22:17:28 UTC
making this high priority - it appears we are now broken on (at least) ubuntu

Comment 4 Michael Burman 2014-02-21 22:29:33 UTC
And a small wish, remove the RHQ logo from every rhqctl command ;)

Comment 5 Jirka Kremser 2014-02-24 20:30:47 UTC
branch:  master
link:    http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=785b0e7e1
time:    2014-02-24 21:27:26 +0100
commit:  785b0e7e198fe59c2e49413cc5af5d14452a2657
author:  Jirka Kremser - jkremser
message: [BZ 1068789] - rhq scripts won't work in Ubuntu derived distributions -
         Using only shell commands from posix standard sub set, because
         on Debian based distros the /bin/sh points to Dash that had
         problems with the previous version.

tested on Lucid Lynx

Comment 6 Heiko W. Rupp 2014-04-23 12:31:24 UTC
Bulk closing of 4.10 issues.

If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.


Note You need to log in before you can comment on or make changes to this bug.