Skip to content

Backport of NET-4519 Collecting journald logs in "consul debug" bundle into release/1.16.x#18882

Closed
hc-github-team-consul-core wants to merge 2 commits into
release/1.16.xfrom
backport/NET-4519/deadly-precise-jawfish
Closed

Backport of NET-4519 Collecting journald logs in "consul debug" bundle into release/1.16.x#18882
hc-github-team-consul-core wants to merge 2 commits into
release/1.16.xfrom
backport/NET-4519/deadly-precise-jawfish

Conversation

@hc-github-team-consul-core
Copy link
Copy Markdown
Collaborator

Backport

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

🚨

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

@hashicorp-cla
Copy link
Copy Markdown

hashicorp-cla commented Sep 19, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved Consul Bot automated PR

@vercel vercel Bot temporarily deployed to Preview – consul September 19, 2023 10:00 Inactive
@asheshvidyut asheshvidyut marked this pull request as ready for review September 19, 2023 10:31
@asheshvidyut asheshvidyut requested a review from a team as a code owner September 19, 2023 10:31
backport of commit 4dfc0c5

Co-authored-by: Chris S. Kim <ckim@hashicorp.com>

no-op commit due to failed cherry-picking
* 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>

removed unwanted files
@asheshvidyut asheshvidyut force-pushed the backport/NET-4519/deadly-precise-jawfish branch from 04952c7 to 1e5dea7 Compare September 19, 2023 10:33
@asheshvidyut asheshvidyut requested a review from a team as a code owner September 19, 2023 10:33
@github-actions github-actions Bot deleted the backport/NET-4519/deadly-precise-jawfish branch August 29, 2025 06:06
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

Successfully merging this pull request may close these issues.

4 participants