[MB-7242] cbcollect_info stores output file in wrong folder Created: 22/Nov/12  Updated: 19/Feb/14  Resolved: 26/Nov/12

Status: Closed
Project: Couchbase Server
Component/s: tools
Affects Version/s: 2.0
Fix Version/s: 2.0
Security Level: Public

Type: Bug Priority: Blocker
Reporter: Pavel Paulau Assignee: Bin Cui
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: CentOS 5.8
build 1956


 Description   
When I run:
  /opt/couchbase/bin/cbcollect_info output_file.zip

It doesn't save zip archive to current working directory, but for some reason it stores file in "/data/default/" ("/data" is custom data path).

 Comments   
Comment by Bin Cui [ 23/Nov/12 ]
What if you run cbcollect_info and specify outputfile.zip in a different directory?
Comment by Bin Cui [ 23/Nov/12 ]
I mean you run it under /opt/couchbase/bin directory?
Comment by Bin Cui [ 23/Nov/12 ]
Something wrong with the api call ZipFile(filename, mode='w', compression=ZIP_DEFLATED) on your setup?
Comment by Pavel Paulau [ 26/Nov/12 ]
Bin,

This is regression in https://github.com/membase/ns_server/commit/48e86857b4bdd88043a96561f14ed7a0fd72da43

By "os.chdir(path)" you change current working directory which is used by ZipFile(). Just try build 1956 on any Linux platform.
Comment by Bin Cui [ 26/Nov/12 ]
Yes, i put the fix on http://review.couchbase.org/#/c/22826/
Comment by Steve Yen [ 26/Nov/12 ]
gerrit change submitted
Generated at Fri Oct 24 19:09:27 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.