Bug 1540707
Summary: | rhq-agent-wrapper.sh is stuck on Solaris 11 SPARC | ||||||
---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Operations Network | Reporter: | Filip Brychta <fbrychta> | ||||
Component: | Launch Scripts | Assignee: | Michael Burman <miburman> | ||||
Status: | CLOSED ERRATA | QA Contact: | Filip Brychta <fbrychta> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | JON 3.3.9, JON 3.3.10 | CC: | fbrychta, spinder | ||||
Target Milestone: | CR02 | Keywords: | Triaged | ||||
Target Release: | JON 3.3.11 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-10-16 17:06:49 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: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1635114, 1635115 | ||||||
Attachments: |
|
Description
Filip Brychta
2018-01-31 20:01:43 UTC
Adding complete list of processes. JVM is not started. Created attachment 1390236 [details]
list of processes
Added -x to #!/bin/sh -x in rhq-agent-wrapper.sh so it prints all commands. Running ./rhq-agent-wrapper.sh status [fbrychta@dev32-01 ~]$ rhq-agent/bin/rhq-agent-wrapper.sh status + uname + _SOLARIS=true + command -v readlink + 1> /dev/null 2>& 1 + [ 0 -ne 0 ] + [ -n true ] + _READLINK_ARG=-e + readlink -e rhq-agent/bin/rhq-agent-wrapper.sh + 2> /dev/null + _DOLLARZERO=/qa/home/fbrychta/rhq-agent/bin/rhq-agent-wrapper.sh + [ -z '' ] + dirname /qa/home/fbrychta/rhq-agent/bin/rhq-agent-wrapper.sh + RHQ_AGENT_HOME=/qa/home/fbrychta/rhq-agent/bin + dirname /qa/home/fbrychta/rhq-agent/bin + RHQ_AGENT_HOME=/qa/home/fbrychta/rhq-agent + export RHQ_AGENT_HOME + dirname /qa/home/fbrychta/rhq-agent/bin/rhq-agent-wrapper.sh + RHQ_AGENT_WRAPPER_BIN_DIR_PATH=/qa/home/fbrychta/rhq-agent/bin + debug_wrapper_msg RHQ_AGENT_WRAPPER_BIN_DIR_PATH=/qa/home/fbrychta/rhq-agent/bin + [ -n '' ] + [ -f /qa/home/fbrychta/rhq-agent/bin/rhq-agent-env.sh ] + debug_wrapper_msg 'Loading environment script: /qa/home/fbrychta/rhq-agent/bin/rhq-agent-env.sh' + [ -n '' ] + . /qa/home/fbrychta/rhq-agent/bin/rhq-agent-env.sh status + RHQ_AGENT_UMASK=007 + [ -z 007 ] + umask 007 + 1> /dev/null + [ 0 -ne 0 ] + found_daemon_option=0 + [ 0 '=' 0 ] + RHQ_AGENT_CMDLINE_OPTS='--daemon ' + export RHQ_AGENT_CMDLINE_OPTS + cd /qa/home/fbrychta/rhq-agent/bin + pwd + _THIS_SCRIPT_DIR=/qa/home/fbrychta/rhq-agent/bin + basename /qa/home/fbrychta/rhq-agent/bin/rhq-agent-wrapper.sh + _THIS_SCRIPT=/qa/home/fbrychta/rhq-agent/bin/rhq-agent-wrapper.sh + cd /qa/home/fbrychta/rhq-agent + [ ! -d /qa/home/fbrychta/rhq-agent/logs ] + [ -z '' ] + RHQ_AGENT_PIDFILE_DIR=/qa/home/fbrychta/rhq-agent/bin + _PIDFILE=/qa/home/fbrychta/rhq-agent/bin/rhq-agent.pid + debug_wrapper_msg 'pidfile will be located at /qa/home/fbrychta/rhq-agent/bin/rhq-agent.pid' + [ -n '' ] + check_status + [ -f /qa/home/fbrychta/rhq-agent/bin/rhq-agent.pid ] + printf '%-30s (no pid file) is down' 'RHQ Agent' + _STATUS='RHQ Agent (no pid file) is down' + _RUNNING=0 + add_colors + tput colors + 2> /dev/null + _COLORS_NUM=256 + [ 0 '=' 0 ] + [ 256 -gt 2 ] + _COLOR=true + 1> /dev/null 2>& 1 It's stuck on 1> /dev/null 2>& 1 It's not really stuck on that last one, but that one pushes all the output to /dev/null Removing that line might give an indication what the program is trying to say.. Problem is on following line: (sh --version | grep bash) 1> /dev/null 2>&1 'sh --version' is on solaris not printing anything but actually starting new shell I did quick search but I did not find any reliable way how to determine if we are running bash for both solaris and rhel. Following is working fine on rhel: add_colors () { # find out if terminal support colors _COLORS_NUM=`tput colors 2> /dev/null` if [ $? = 0 ] && [ $_COLORS_NUM -gt 2 ]; then _COLOR=true _UP_SYMBOL=`[ ! "X$BASH_VERSION" = "X" ] && echo ✔` _DOWN_SYMBOL=`[ ! "X$BASH_VERSION" = "X" ] && echo ✘` _STATUS=`echo "${_STATUS}" | green running "${_UP_SYMBOL}"` _STATUS=`echo "${_STATUS}" | red down "${_DOWN_SYMBOL}"` fi } and it's not blocking on solaris. Worst case scenario should be that those UP and DOWN symbols are not printed. Fixed in the master: commit 29a5ccd25661bcb800276303ea6d452a12033dbf (HEAD -> master) Author: Michael Burman <miburman> Date: Tue Mar 20 21:46:26 2018 +0200 [BZ 1540707] Improve sh/bash detection to support Solaris sh also Moving to ON_QA. Available to test with http://download.eng.bos.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/186/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip. * This maps to CR02 build of 3.3.11. 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://access.redhat.com/errata/RHSA-2018:2930 |