Bug 1153373 - RHQ fails to do dev startup after new install on Mac OS/X
Summary: RHQ fails to do dev startup after new install on Mac OS/X
Keywords:
Status: ON_QA
Alias: None
Product: RHQ Project
Classification: Other
Component: Installer
Version: 4.12
Hardware: Unspecified
OS: Mac OS
unspecified
unspecified
Target Milestone: ---
: RHQ 4.13
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1095508
TreeView+ depends on / blocked
 
Reported: 2014-10-15 21:44 UTC by Mike Thompson
Modified: 2022-03-31 04:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1148186 0 unspecified CLOSED rhq-agent-wrapper's config and cleanconfig commands source RHQ_AGENT_START_COMMAND instead of executing it resulting in ... 2021-02-22 00:41:40 UTC

Internal Links: 1148186

Description Mike Thompson 2014-10-15 21:44:08 UTC
Description of problem:
Plain install/start fails to find the rhq-agent.sh on './rhqctl start'

No special options or anything like that.

NOTE: this has happened to a couple devs on macs not just one.


Version-Release number of selected component (if applicable):
Current master.


How reproducible:
Always

Steps to Reproduce:
1. ./rhqctrl install
2. ./rhqctrl start


Actual results:
Starting RHQ Agent...
ERROR! Cannot find the RHQ Agent start script
Not found: ./bin/rhq-agent.sh

NOTE: there is an extra bin directory in the rhq-agent/bin directory

Expected results:
It should start up like normal.


Additional info:
It appears  that commit: https://github.com/rhq-project/rhq/compare/3a5701178868...806230cd33d4
 
is the offender as the previous commit: ac288754cd94d566d97c5d2d12a239f4bc7b137a works fine.

Comment 1 Mike Thompson 2014-10-21 01:47:28 UTC
This regression disables startup on OS/X. For dev builds, one is unable to start up RHQ on Mac OS/X; making development a no-go on OS/X.

Comment 2 Mike Thompson 2014-10-21 01:54:33 UTC
Checked into master:

commit 04fd1353f62fc38839d82e229de8485a08b048cc
Author: Mike Thompson <mithomps>
Date:   Mon Oct 20 18:42:44 2014 -0700

    [BZ 1153373] RHQ fails to do dev startup after new install on Mac OS/X .
    I fixed the rhq-agent* scripts as these are the minimal changes to make a rhq install work on OS/X. Any more changes represent risk, especially at this late stage in JON release.

The core issue here is that OS/X implementation of readlink does not support any of the standard options such as '-e' or '-f', effectively rendering it useless for the intended purpose. The following Stack Overflow article details the solution: https://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in?lq=1.

Comment 3 Stefan Negrea 2014-10-21 16:01:40 UTC
The tools work properly on Linux after the changes noted above, so the fix targets the right system.I am +1 on the change. 

Also, I updated the target for this change to be RHQ 4.13. This change is only needed for the RHQ community release and should not be backported to JON at this time.

Comment 4 John Mazzitelli 2014-10-21 20:38:21 UTC
It was asked that we cherry pick this to the jon 3.3. branch as well:

commit 284763ea9a388f443dabb2a57171eee2a92eee44
Author: Mike Thompson <mithomps>
Date:   Mon Oct 20 18:42:44 2014 -0700

    [BZ 1153373] RHQ fails to do dev startup after new install on Mac OS/X .
    I fixed the rhq-agent* scripts as these are the minimal changes to make a rhq install work. Any mo
    (cherry picked from commit 04fd1353f62fc38839d82e229de8485a08b048cc)
    
    Signed-off-by: John Mazzitelli <mazz>


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