Bug 863937 - Need update rhc app tail to rhc tail for output of rhc threaddump command
Need update rhc app tail to rhc tail for output of rhc threaddump command
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: chris alfonso
libra bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-08 02:36 EDT by Mengjiao Gao
Modified: 2016-01-31 21:35 EST (History)
6 users (show)

See Also:
Fixed In Version: fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_213
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:49:53 EST
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 Mengjiao Gao 2012-10-08 02:36:31 EDT
Description of problem:
When I created a app named "ruby19" on devenv_2295, I run "rhc threaddump ruby19" and got messages as follows:

"Success

The thread dump file will be available via: rhc app tail -a ruby19 -f
ruby-1.9/logs/error_log-20121008-000000-EST -o '-n 250' "

While the rhc app tail command was invalid in the fact.


Version-Release number of selected component (if applicable):
server:devenv_2295
client: built from fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_209


How reproducible:
always

Steps to Reproduce:
1.Created a app.
2.execute
 $ rhc threaddump <appname>
3.
  
Actual results:
The given command "rhc app tail " in the threaddump success message was invalid.

Expected results:
The given command in the threaddump success message should be correct.

Additional info:
The correct command to check thread dump file should be "rhc tail <application>".
Comment 1 John (J5) Palmieri 2012-10-09 10:23:52 EDT
Reassigning to Chris who worked on threaddump
Comment 2 John (J5) Palmieri 2012-10-10 16:43:26 EDT
fixed
Comment 3 chris alfonso 2012-10-10 16:47:49 EDT

*** This bug has been marked as a duplicate of bug 863963 ***
Comment 4 Xiaoli Tian 2012-10-15 07:21:23 EDT
Don't think this bug is an duplicate of bug 863963, this bug focus on the output of the thread dump command
Comment 5 Johnny Liu 2012-10-15 07:27:08 EDT
This bug is different with BZ 863963. 
BZ 863963 is about rhc tail functionality issue, while this bug is about invalid command output issue.

When user run threaddump command, the command succeed, but its output tell user that:
The thread dump file will be available via: rhc app tail -a ruby19 -f
ruby-1.9/logs/error_log-20121008-000000-EST -o '-n 250'

If user follow this instruction, rhc will give the following message:
$ rhc app tail -a ruby19 -f
ruby-1.9/logs/error_log-20121008-000000-EST -o '-n 250'/tmp/jbosseap-6.0.log -o '-n 250'
invalid option: -a

Usage: rhc tail <application>

Tail the logs of an application

So the instruction for checking threaddump log file mislead user, need to be updated.
Comment 6 John (J5) Palmieri 2012-10-15 10:57:03 EDT
Ah, should be updated to send back rhc tail ruby19 -f
ruby-1.9/logs/error_log-20121008-000000-EST -o '-n 250'

Also in the tail command the app argument needs to support the legacy switches.  There are times when people want to use the switches to be explicit on what they are sending in:

- argument :app, "Application name  (alphanumeric - max 32 chars) (required)", []
+ argument :app, "Name of application you wish to view the logs of", ["-a", "--app app"]


Refrain from adding words like 'required' to the documentation as they can be added programatically for more constancy if needed in the future.
Comment 7 chris alfonso 2012-10-15 13:41:03 EDT
The fixes are in openshift/{roc,origin-server} master branch
Comment 8 Rony Gong 2012-10-16 06:21:38 EDT
verified on devenv_2329
1.[qgong@localhost Downloads]$ rhc threaddump -a qruby19
Password: 

Success

The thread dump file will be available via: rhc tail qruby19 -f ruby-1.9/logs/error_log-20121016-000000-EST -o '-n
250'

2. [qgong@localhost Downloads]$ rhc tail qruby19 -f ruby-1.9/logs/error_log-20121016-000000-EST -o '-n 250'
Password: 

[Tue Oct 16 01:26:09 2012] [notice] SELinux policy enabled; httpd running as context system_u:system_r:libra_t:s0:c0,c522
[Tue Oct 16 01:26:09 2012] [notice] mod_bw : Memory Allocated 32 bytes (each conf takes 32 bytes)
[Tue Oct 16 01:26:09 2012] [notice] mod_bw : Version 0.8 - Initialized [1 Confs]
[Tue Oct 16 01:26:09 2012] [notice] Apache/2.2.17 (Unix) Phusion_Passenger/3.0.12 configured -- resuming normal operations
[Tue Oct 16 01:36:42 2012] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:libra_t:s0:c0,c522
[Tue Oct 16 01:36:42 2012] [notice] mod_bw : Memory Allocated 32 bytes (each conf takes 32 bytes)
[Tue Oct 16 01:36:42 2012] [notice] mod_bw : Version 0.8 - Initialized [1 Confs]
[Tue Oct 16 01:36:43 2012] [notice] Apache/2.2.17 (Unix) Phusion_Passenger/3.0.12 configured -- resuming normal operations
[ pid=28244 thr=3567740 file=abstract_request_handler.rb:445 time=2012-10-16 01:42:08.856 ]: ========== Process 28244: backtrace dump ==========
------------------------------------------------------------
# Current thread: #<Thread:0x000000006ce0f8 run>
------------------------------------------------------------
    /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:445:in `block in install_useful_signal_handlers'
    /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:456:in `call'
    /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:456:in `select'
    /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:456:in `accept_and_process_next_request'
    /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'

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