Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug archive is not gzipped #5141

Closed
destornillador opened this issue Dec 28, 2018 · 4 comments
Closed

Debug archive is not gzipped #5141

destornillador opened this issue Dec 28, 2018 · 4 comments

Comments

@destornillador
Copy link

Overview of the Issue

consul debug should create a tar.gz file but it creates just a tar file.

Reproduction Steps

  1. Run consul debug
  2. Press Ctrl + C (just stop recording)
  3. Check output file type

Consul info for both Client and Server

Client info
build:
	prerelease = 
	revision = 0bddfa23
	version = 1.4.0

Log Fragments

# consul debug
[WARN] Unable to capture pprof. Set enable_debug to true on target agent to enable profiling.
==> Starting debugger and capturing static information...
     Agent Version: '1.4.0'
          Interval: '30s'
          Duration: '2m0s'
            Output: 'consul-debug-1546020008.tar.gz'
           Capture: 'metrics, logs, host, agent, cluster'
==> Beginning capture interval 2018-12-28 18:00:08.142939519 +0000 UTC (0)
^C
==> Error encountered during collection: stopping collection due to shutdown signal
    Saved debug archive: consul-debug-1546020008.tar.gz

# file consul-debug-1546020008.tar.gz 
consul-debug-1546020008.tar.gz: POSIX tar archive
@Zyqsempai
Copy link
Contributor

Zyqsempai commented Jan 1, 2019

@destornillador Hi, as far as I can see from logs provided by you, it creates consul-debug-1546020008.tar.gz it kind of mismatch with your bug report, can you clarify this?

@destornillador
Copy link
Author

Hello @Zyqsempai .

It creates consul-debug-1546020008.tar.gz but look at the file command output; it is a tar file which is not gzipped.

Some more proofs:

# consul debug
    2019/01/02 01:36:59 [DEBUG] http: Request GET /v1/agent/self (976.894µs) from=127.0.0.1:58686
==> Starting debugger and capturing static information...
     Agent Version: '1.4.0'
          Interval: '30s'
          Duration: '2m0s'
            Output: 'consul-debug-1546393019.tar.gz'
           Capture: 'metrics, logs, pprof, host, agent, cluster'
    2019/01/02 01:36:59 [DEBUG] http: Request GET /v1/agent/host (2.344773ms) from=127.0.0.1:58686
    2019/01/02 01:36:59 [DEBUG] http: Request GET /v1/agent/self (797.235µs) from=127.0.0.1:58686
    2019/01/02 01:36:59 [DEBUG] http: Request GET /v1/agent/members?wan=1 (117.709µs) from=127.0.0.1:58686
==> Beginning capture interval 2019-01-02 01:36:59.400673594 +0000 UTC (0)
    2019/01/02 01:36:59 [DEBUG] http: Request GET /v1/agent/metrics (1.926844ms) from=127.0.0.1:58688
^C==> Error encountered during collection: stopping collection due to shutdown signal
    Saved debug archive: consul-debug-1546393019.tar.gz
    2019/01/02 01:37:02 [DEBUG] http: Request GET /v1/agent/monitor?loglevel=DEBUG (3.177846343s) from=127.0.0.1:58686

# file consul-debug-1546393019.tar.gz 
consul-debug-1546393019.tar.gz: POSIX tar archive

# tar zxf consul-debug-1546393019.tar.gz 

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

# tar xf consul-debug-1546393019.tar.gz
# ls -l
total 44
drwxr-xr-x. 3 root root    97 Jan  2 01:37 consul-debug-1546393019
-rw-------. 1 root root 44567 Jan  2 01:37 consul-debug-1546393019.tar.gz

@Zyqsempai
Copy link
Contributor

@destornillador Confirm your issue, opened PR with a fix!

@pearkes
Copy link
Contributor

pearkes commented Jan 3, 2019

Thanks for fixing this @Zyqsempai!

@pearkes pearkes closed this as completed Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants