Bug 863937 - Need update rhc app tail to rhc tail for output of rhc threaddump command
Summary: Need update rhc app tail to rhc tail for output of rhc threaddump command
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: chris alfonso
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-08 06:36 UTC by Mengjiao Gao
Modified: 2016-02-01 02:35 UTC (History)
6 users (show)

Fixed In Version: fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_213
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-06 18:49:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mengjiao Gao 2012-10-08 06:36:31 UTC
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 14:23:52 UTC
Reassigning to Chris who worked on threaddump

Comment 2 John (J5) Palmieri 2012-10-10 20:43:26 UTC
fixed

Comment 3 chris alfonso 2012-10-10 20:47:49 UTC

*** This bug has been marked as a duplicate of bug 863963 ***

Comment 4 Xiaoli Tian 2012-10-15 11:21:23 UTC
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 11:27:08 UTC
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 14:57:03 UTC
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 17:41:03 UTC
The fixes are in openshift/{roc,origin-server} master branch

Comment 8 Rony Gong 🔥 2012-10-16 10:21:38 UTC
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.