Bug 1034963 - cannot launch agent using rhqctl on linux if you need to enter a password
Summary: cannot launch agent using rhqctl on linux if you need to enter a password
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent, Launch Scripts
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1036960
TreeView+ depends on / blocked
 
Reported: 2013-11-26 18:54 UTC by John Mazzitelli
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1036960 (view as bug list)
Environment:
Last Closed:


Attachments (Terms of Use)

Description John Mazzitelli 2013-11-26 18:54:29 UTC
The agent launcher script lets you start the agent with your own custom command via RHQ_AGENT_START_COMMAND. If you set that to do a sudo, you can tell it to prompt the user for the password to sudo. for example:

RHQ_AGENT_START_COMMAND="su -m test -c '${RHQ_AGENT_HOME}/bin/rhq-agent.sh'"

If you want the user to be prompted, you can tell the launcher script to output the prompt on stdout via:

RHQ_AGENT_PASSWORD_PROMPT=true

However, if this is an agent running colocated on the server, you start the agent via rhqctl. This introduces the problem that stdin isn't redirected to the agent process so none of this prompting works. The user needs to make sure the start command does not require user input during startup.

This probably requires a release notes blurb and some additional documentation.


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