Description of problem: After launching the agent wrapper, and subsequent exit, the user may find his terminal a bit messed up - hitting the Enter key no longer provides a CRLF. Version-Release number of selected component (if applicable): 1.4 How reproducible: Every time Steps to Reproduce: 1. Launch rhq-agent-wrapper.sh on a linux system - not sure if this requires a linux terminal program at this point, too. 2. After it exits, hit your enter key a few times 3. View results. Actual results: [root@rlx-0-12 ~]# rhq-agent/bin/rhq-agent-wrapper.sh start Starting RHQ Agent... RHQ Agent (pid 2888) is running [root@rlx-0-12 ~]# [root@rlx-0-12 ~]# [root@rlx-0-12 ~]# Expected results: User should be able to hit enter and get correct CRLFs. Additional info: This is a recent development that I have seen over the last few weeks/months but I was never able to definitively determine what was causing it.
(i.e., this is a regression.)
Corey, on what OS and version did you see this behavior? I was able to reproduce it on F12 but did not reproduce it on Mac OS X. I will try and see if I can test on some other platforms as well.
I was on F12; i saw it occur ssh'ed into a linux and a solaris system. Wonder if it could be an issue with the term program, not the agent? I'll investigate that too.
Doesn't look to be the fault of my term program. I have reproduced this using 'terminate', 'terminal' and 'xterm'. Also note that it doesn't appear to happen with 'stop', only 'start'. The following output is using 'terminal', ssh'ed into a solaris box. bash-2.05# bin/rhq-agent-wrapper.sh stop Stopping RHQ Agent... RHQ Agent (pid=18942) is stopping... RHQ Agent has stopped. bash-2.05# bash-2.05# bash-2.05# bin/rhq-agent-wrapper.sh start Starting RHQ Agent... RHQ Agent (pid 24218) is running bash-2.05# bash-2.05# bash-2.05#
I just replicated this on F11. It only happens if you use "start" (and "restart", which effectively does the "start" code internally). This doesn't happen when using the stop, kill or status options. Need to check what changed recently in either rhq-agent.sh (which is what "start" option uses) or the wrapper's start code. This definitely did not happen in previous versions so something changed to cause this.
I confirmed the problem here is the new jline integration. If you use jline but put the agent in the background, for some reason, jline is eating up the echo'ed characters to the console. To test: export RHQ_AGENT_CMDLINE_OPTS="--daemon --console=java" rhq-agent-wrapper.sh start You will notice this starts fine. Now stop the agent and try sigar: rhq-agent-wrapper.sh stop export RHQ_AGENT_CMDLINE_OPTS="--daemon --console=sigar" rhq-agent-wrapper.sh start Again, works fine. Now try jline: rhq-agent-wrapper.sh stop export RHQ_AGENT_CMDLINE_OPTS="--daemon --console=jline" rhq-agent-wrapper.sh start Now you see the console is screwed up. Need to figure out a way to disable jline when running as a daemon. This should not be difficult to do, just have to find out the proper place to do it (either in AgentMain or in one of the scripts).
git commit in master: 6e1b30927baa58b7ee02741731b6f2ffc8e3f26f
QA Verified.
Mass-closure of verified bugs against JON.