Bug 973782 - Agent startup script fails at reboot
Agent startup script fails at reboot
Status: NEW
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
4.5
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-12 13:47 EDT by Elias Ross
Modified: 2013-06-18 11:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Elias Ross 2013-06-12 13:47:04 EDT
/etc/rc3.d/S93rhq-agent: line 160: cd: ../init.d: No such file or directory
Starting RHQ Agent...
ERROR! Cannot find the RHQ Agent start script
Not found: //bin/rhq-agent.sh

-bash-4.1$ ls -l /etc/rc3.d/S93rhq-agent
lrwxrwxrwx 1 root root 19 Nov  8  2012 /etc/rc3.d/S93rhq-agent -> ../init.d/rhq-agent

I'm guessing because there's a double link here, it's causing confusion:

_DOLLARZERO=`readlink $_READLINK_ARG "$0" 2>/dev/null|| echo "$0"`
RHQ_AGENT_WRAPPER_BIN_DIR_PATH=`dirname "$_DOLLARZERO"`
debug_wrapper_msg "RHQ_AGENT_WRAPPER_BIN_DIR_PATH=$RHQ_AGENT_WRAPPER_BIN_DIR_PATH"

$_READLINK_ARG needs to be -f (at least on systems that support it.)
Comment 1 Heiko W. Rupp 2013-06-18 08:30:26 EDT
Elias,
what is your system in question here? OS/X 10.7 does not know about -f, so this can't be it :)

Red Hat Enterprise Linux 6 also seems to do fine with option -e

-f, --canonicalize
              canonicalize by following every symlink in every component of the given name recursively; all but the last
              component must exist

-e, --canonicalize-existing
              canonicalize by following every symlink in every component of the given name recursively,  all  components
              must exist
Comment 2 Elias Ross 2013-06-18 11:18:58 EDT
Looks like this is from my patched version, not the version in the main RHQ tree. Looks like I commented it out because the agent wasn't working on RHEL 5. But this is needed of course.

# -e option not supported on RHEL 5.4
# if [ "x${_LINUX}${_SOLARIS}${_CYGWIN}" != "x" ]; then
   # _READLINK_ARG="-e"
# fi

You can close this out, if you aren't supported RHEL 5.
Comment 3 Elias Ross 2013-06-18 11:20:54 EDT
Also, for those finding this issue, the fix seems to be to update coreutils on those systems:

http://rhn.redhat.com/errata/RHBA-2011-1074.html

but I haven't confirmed this.

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