sg_collect does not package archived log files (*.log.gz)
Description
I have run Sync Gateway system test for 3 days. when test completes, Sync Gateway is stopped by test framework.
I went to /opt/couchbase-sync-gateway/tools/ run sg_collect by pointing an output location, and leave everything else default
The sg_collect output package (attached) only contains the most current log files in the sync gateway home directory, archived logs *.log.gz are not included in the package.
system test installs Sync Gateway on CentOS 7 VM. Sync Gateway version used is 2.8.2-1
Attachments
1
Activity
Show:
Eunice Huang May 9, 2021 at 5:56 AM
verified the fix, closed
Eunice Huang May 9, 2021 at 5:55 AM
verified SGW 3.0.0-186, used this version in CBL system test job for a large number docs and long run. the issue got fixed.
CB robot May 3, 2021 at 4:21 PM
Build sync_gateway-3.0.0-186 contains sync_gateway commit 0dcb34e with commit message: sg_collect does not package archived log files (*.log.gz) (#4990)
Ben Brooks April 14, 2021 at 10:46 AM
I tried a quick repro on a running Sync Gateway in a Docker container and it managed to find the rotated logs correctly, so next steps for repro are running sgcollect on a stopped Sync Gateway.
Reading through the sgcollect_info code, there's a different path where it looks in "default" paths (lookup_std_log_files), which doesn't have the rotated log file pattern matching like the "discovered"/running config-based log file path code does.
Fixed
Pinned fields
Click on the next to a field label to start pinning.
I have run Sync Gateway system test for 3 days. when test completes, Sync Gateway is stopped by test framework.
I went to /opt/couchbase-sync-gateway/tools/ run sg_collect by pointing an output location, and leave everything else default
The sg_collect output package (attached) only contains the most current log files in the sync gateway home directory, archived logs *.log.gz are not included in the package.
system test installs Sync Gateway on CentOS 7 VM. Sync Gateway version used is 2.8.2-1