This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 536360 (RHQ-718)

Summary: Agent 'sending>' prompt is misleading - change prompt
Product: [Other] RHQ Project Reporter: Jeff Weiss <jweiss>
Component: AgentAssignee: John Mazzitelli <mazz>
Severity: medium Docs Contact:
Priority: low    
Version: 1.0.1CC: dajohnso
Target Milestone: ---Keywords: Improvement
Target Release: ---Flags: jweiss: archived+
Hardware: All   
OS: All   
Fixed In Version: 1.2 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Jeff Weiss 2008-08-06 17:43:00 EDT
I think most users will react as MikeD did, not recognizing that "sending>" is accepting input.  They'll probably sit there waiting for it to finish "sending" something.

Suggestion for improvement:

RHQ 1.1 (blah blah)
Enter agent commands at the prompt below. For a list of commands, enter $HELP_COMMAND.

<MikeD> When running: [demojon@jon2client-1 bin]$ ./ -u
 RHQ 1.0.0.GA (Mon May 05 14:09:44 EDT 2008)
 what is "sending>"
<jweiss> MikeD: thanks for reminding me, we wanted to bring that up too
<MikeD> and how long should I wait for it to return before hitting ctrl + c
<ghinkle> mikeD, by not passing "start" your asking for a prompt
 that prompt lets you type commands
<jweiss> ghinkle: qa's opinion is that "sending>" is not a prompt
 and MikeD's question shows that people do not recognize it as such
<ghinkle> well... it is a prompt... maybe you wish it not to be?
<MikeD> sounds like it is sending info to server
<jshaughn> sending.... is not a prompt, it's all about the '>' ; )
<MikeD> so what is proper command?
<jweiss> to me it looks like the user will expect it to finish sending
<jshaughn> MikeD: help
<MikeD> ./ -u start
<ghinkle> i agree that its not super intuitive
 we could change the default
<jweiss> i think just an angle bracket would be better
<jshaughn> rhq>
<jweiss> that's good too
<ghinkle> sending == the state of the connector
<jshaughn> there are two states/prompts
<ghinkle> try the command "sender stop"
<MikeD> how about bash> ;-)
<jweiss> hehe
<MikeD> or jon-console>
 you vi guy you
--- jshaughn is now known as jshaughn-away
<ghinkle> so. are we rolling back r1180?
<ips> maybe instead of putting the connection status in the prompt, they can use "sender status" to find out the current status
<jweiss> i'd be satisfied if we just print a message before the first prompt saying that it's a prompt.
<MikeD> so help me out on syntax, how do I nuke the agent and start it up?  ./ -u start
<jweiss> but i'd prefer to change the prompt (with or without the message)
Comment 1 John Mazzitelli 2008-10-07 11:11:46 EDT
suggest we just go with a ">" prompt. 

When in development/debug mode, I'll try to keep this as-is (because in debug mode, its useful to know if in shutdown/started/sending mode). But for normal customer operations, we can just use ">" as  the prompt.
Comment 2 John Mazzitelli 2008-10-10 16:21:46 EDT
here's the code that fixes this - will check in once svn is open again (this goes in AgentMain - its a new getDefaultPrompt() method):

     * Returns the default user prompt, which is dynamically determined based on the state of the agent and its client
     * command sender if the agent's logger is in debug mode.  If not, a standard prompt is used no matter
     * what state the sender object is in.
     * @return default prompt string
    private String getDefaultPrompt() {
        String prompt;

        if (LOG.isDebugEnabled()) {
            ClientCommandSender sender = m_clientSender;
            if ((sender != null) && isStarted()) {
                prompt = (sender.isSending()) ? PROMPT_SENDING : PROMPT_STARTED;
            } else {
                prompt = PROMPT_SHUTDOWN;
        } else {
            prompt = PROMPT_TINY;

        return prompt;

This requires a new constant defines at the top:

    private static final String PROMPT_TINY = "> ";
Comment 3 Red Hat Bugzilla 2009-11-10 16:15:27 EST
This bug was previously known as