[MB-5203] collect_info should include "diag" information Created: 01/May/12  Updated: 31/Jan/14  Resolved: 31/May/12

Status: Resolved
Project: Couchbase Server
Component/s: tools
Affects Version/s: 1.8.0
Fix Version/s: 2.0-beta
Security Level: Public

Type: Bug Priority: Major
Reporter: Perry Krug Assignee: Bin Cui
Resolution: Fixed Votes: 0
Labels: customer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
To prevent having to ask the customer for two different sets of output, can we please include the information contained within http://<host>:8091/diag in the collect_info output? I don't think we "need" to just call that URL, but that might be easiest (though very inefficient since we're already calling browse_logs). It's just the top part of the 'diag' that's necessary

 Comments   
Comment by Thuan Nguyen [ 02/May/12 ]
Integrated in github-ns-server-2-0 #344 (See [http://qa.hq.northscale.net/job/github-ns-server-2-0/344/])
    allow /diag without logs (for MB-5203) (Revision bfa74c9beea17a612703850f7ca3e3751487748c)

     Result = SUCCESS
Aliaksey Kandratsenka :
Files :
* src/diag_handler.erl
Comment by Dipti Borkar [ 07/May/12 ]
Steve, I think you have had a chance to investigate the work that's needed here. Can you please post comments to this bug?
Comment by Steve Yen [ 08/May/12 ]
Current cmd-line is...

  cbcollect_info output.zip

Proposed cmd-line...

  cbcollect_info [--user Administrator] [--password password] output.zip

If the user & password is provided, then do the optional HTTP $host:8091/diag request, probably with HTTP basic auth.

Might be able to use curl.

Comment by Perry Krug [ 08/May/12 ]
Is that really necessary? Surely we can get the same information out of erlang without requiring the username/pass? It will just add to the complexity of support having to explain how to use this tool to the user...and all of the ones that currently use it a) will have to change and b) might forget to and defeat the purpose altogether.

I'm going to have to push back on requiring the username/pass since we currently get all that we need without it.
Comment by Bin Cui [ 08/May/12 ]
Perry's concerns are legit. We won't change the current arguments for cbcollect_info. And we will add the missing upper part to collect_info result.
Comment by Thuan Nguyen [ 10/May/12 ]
Integrated in github-ns-server-2-0 #349 (See [http://qa.hq.northscale.net/job/github-ns-server-2-0/349/])
    mb-5203 add manifest to collect_info (Revision a6689681145c038f878c6fd26d565e50aac858ce)

     Result = SUCCESS
Comment by Steve Yen [ 10/May/12 ]
http://review.couchbase.org/#change,15763
Comment by Steve Yen [ 10/May/12 ]
Bin did this is a way where optional user/pswd aren't needed.

Bin just looked at what /diag was providing above and beyond cbcollect_info and added what he could to cbcollect_info in a way such that he didn't need to query a running ns_server process.
Comment by Steve Yen [ 11/May/12 ]
reopening to remind farshid about the 1.8.1 manifest update that's needed if this can still make 1.8.1
Comment by Steve Yen [ 15/May/12 ]
The last comment was wrong - meant for a different bug.
Comment by Steve Yen [ 30/May/12 ]
looks like collecting /diag is important...

reopening this bug to get these additional steps...

1) get the REST user/pswd out of the cbdumpconfig.escript (rest_creds).
2) using the REST user/pswd to grab a CURL /diag output into the cbcollect_info zip file.
Comment by Thuan Nguyen [ 05/Jun/12 ]
Integrated in github-ns-server-2-0 #364 (See [http://qa.hq.northscale.net/job/github-ns-server-2-0/364/])
    MB-5203 Include diag in collect_info (Revision 10f86975df888e2860dc7007e110dc988e5103bc)

     Result = SUCCESS
Aliaksey Kandratsenka :
Files :
* cbcollect_info
Generated at Sun Apr 20 22:00:29 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.