Skip to content

NET-4519 Collecting journald logs in "consul debug" bundle (#18797)#18885

Merged
asheshvidyut merged 1 commit intorelease/1.15.xfrom
NET-4519-1.15.x
Sep 19, 2023
Merged

NET-4519 Collecting journald logs in "consul debug" bundle (#18797)#18885
asheshvidyut merged 1 commit intorelease/1.15.xfrom
NET-4519-1.15.x

Conversation

@asheshvidyut
Copy link
Contributor

Backport

This PR is auto-generated from #18797 to be assessed for backporting due to the inclusion of the label backport/1.15.

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@absolutelightning
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.

merge conflict error: POST https://api.github.com/repos/hashicorp/consul/merges: 409 Merge conflict []

The below text is copied from the body of the original PR.


Description

Fixes NET-4519 Collecting journald logs in "consul debug" bundle.
Adds a flag to consul debug command named -since. It accepts go time duration.
Internally hcdiag is called with args - -consul and -since=since.

Testing & Reproduction steps

make dev
./bin/consul debug -since 1m

asheshvidyut@asheshvidyut-H2GX766V9T ~/consul (NET-4519 %) » ./bin/consul debug -since 1m
==> Starting debugger and capturing static information...
     Agent Version: '1.17.0'
2023-09-14T17:09:09.532+0530 [INFO]  hcdiag: Ensuring destination directory exists: directory=.
2023-09-14T17:09:09.532+0530 [INFO]  hcdiag: Checking product availability
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag: Gathering diagnostics
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: Running operations for: product=host
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: product=host runner="do host"
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: Running operations for: product=consul
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: product=consul runner="do consul"
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag: running operation: runner="consul version"
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag: running operation: runner="consul operator raft list-peers -stale=true"
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: runner="uname -v"
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: runner=disks
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: runner=info
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: runner=memory
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: runner=process
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: runner=network
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: runner=iptables
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: runner=/etc/hosts
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: runner="/proc/ files"
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag.product: running operation: runner=/etc/fstab
2023-09-14T17:09:09.609+0530 [INFO]  hcdiag: running operation: runner=ConsulDebug
2023-09-14T17:09:09.611+0530 [INFO]  hcdiag: running operation: runner="GET /v1/agent/self"
2023-09-14T17:09:09.611+0530 [INFO]  hcdiag: running operation: runner="GET /v1/agent/metrics"
2023-09-14T17:09:09.611+0530 [INFO]  hcdiag: running operation: runner="GET /v1/catalog/datacenters"
2023-09-14T17:09:09.611+0530 [INFO]  hcdiag: running operation: runner="GET /v1/catalog/services"
2023-09-14T17:09:09.611+0530 [INFO]  hcdiag: running operation: runner="GET /v1/namespace"
2023-09-14T17:09:09.611+0530 [INFO]  hcdiag: running operation: runner="GET /v1/status/leader"
2023-09-14T17:09:09.611+0530 [INFO]  hcdiag: running operation: runner="GET /v1/status/peers"
2023-09-14T17:09:09.611+0530 [INFO]  hcdiag: running operation: runner="GET /v1/agent/members?cached"
2023-09-14T17:09:09.611+0530 [INFO]  hcdiag: running operation: runner="log/docker consul"
2023-09-14T17:09:09.611+0530 [INFO]  hcdiag: running operation: runner=journald
2023-09-14T17:09:09.651+0530 [INFO]  hcdiag: Product done: product=host statuses="map[skip:3 success:8]"
2023-09-14T17:09:21.734+0530 [INFO]  hcdiag: Product done: product=consul statuses="map[skip:2 success:10 unknown:2]"
2023-09-14T17:09:21.734+0530 [INFO]  hcdiag: Recording manifest
2023-09-14T17:09:21.736+0530 [INFO]  hcdiag: Created results.json file: dest=/Users/asheshvidyut/consul/hcdiag-2023-09-14T113909Z2967109506/results.json
2023-09-14T17:09:21.737+0530 [INFO]  hcdiag: Created manifest.json file: dest=/Users/asheshvidyut/consul/hcdiag-2023-09-14T113909Z2967109506/manifest.json
2023-09-14T17:09:21.745+0530 [INFO]  hcdiag: Compressed and archived output file: dest=hcdiag-2023-09-14T113909Z.tar.gz
The diagnostic run has completed. The results bundle can be found at hcdiag-2023-09-14T113909Z.tar.gz.
product  success  fail  skip  canceled  timeout  unknown  total
consul   10       0     2     0         0        2        14
host     8        0     3     0         0        0        11

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

Overview of commits

* debug since

* fix docs

* chagelog added

* fix go mod

* debug test fix

* fix test

* tabs test fix

* Update .changelog/18797.txt

Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com>

---------

Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com>
@asheshvidyut asheshvidyut requested a review from a team as a code owner September 19, 2023 11:58
@github-actions github-actions bot added type/docs Documentation needs to be created/updated/clarified theme/cli Flags and documentation for the CLI interface pr/dependencies PR specifically updates dependencies of project labels Sep 19, 2023
@hc-github-team-consul-core
Copy link
Collaborator

🤔 This PR has changes in the website/ directory but does not have a type/docs-cherrypick label. If the changes are for the next version, this can be ignored. If they are updates to current docs, attach the label to auto cherrypick to the stable-website branch after merging.

@asheshvidyut asheshvidyut merged commit 8f299ac into release/1.15.x Sep 19, 2023
@asheshvidyut asheshvidyut deleted the NET-4519-1.15.x branch September 19, 2023 12:13
@asheshvidyut asheshvidyut added the consul-india PRs/Issues assigned to Consul India team label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consul-india PRs/Issues assigned to Consul India team pr/dependencies PR specifically updates dependencies of project pr/no-backport theme/cli Flags and documentation for the CLI interface type/docs Documentation needs to be created/updated/clarified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants