Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Dec 9, 2024
1 parent 5e43674 commit 6e1b37d
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 37 deletions.
26 changes: 18 additions & 8 deletions config/commands/debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,29 @@ description: |
Display help for debug commands and exit.
include_options: [global/*]
subcommands:
- name: diagnose
description: |
XXX
# - name: diagnose
# description: |
# XXX
- name: dump
links: [skupper/debug_dumps]
description: |
Generate a debug dump file.
Generate a debug dump file. Debug dumps collect the details of
a site so another party can identify and fix a problem.
examples: |
# Generate a debug dump file
$ skupper debug dump ~/dump.tar.gz
Debug dump file generated at /home/fritz/dump.tar.gz.
# Generate a dump file
$ skupper debug dump
Debug dump file: /home/fritz/skupper-dump-west-2024-12-09.tar.gz
# Generate a dump file to a particular path
$ skupper debug dump /tmp/abc.tar.gz
Debug dump file: /tmp/abc.tar.gz
include_options: [context/*, global/*]
options:
- name: file
type: string
required: true
positional: true
default: "`skupper-dump-<site-name>-<date>.tar.gz`"
description: |
The name of the file to generate.
The command exits with an error if the file already exists.
26 changes: 18 additions & 8 deletions input/commands/debug/dump.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ refdog_object_toc:

<section>

Generate a debug dump file.
Generate a debug dump file. Debug dumps collect the details of
a site so another party can identify and fix a problem.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Linux</td></table>

Expand All @@ -32,7 +33,7 @@ Generate a debug dump file.
## Usage

~~~ shell
skupper debug dump <file> [options]
skupper debug dump [file] [options]
~~~

</section>
Expand All @@ -42,9 +43,13 @@ skupper debug dump <file> [options]
## Examples

~~~ console
# Generate a debug dump file
$ skupper debug dump ~/dump.tar.gz
Debug dump file generated at /home/fritz/dump.tar.gz.
# Generate a dump file
$ skupper debug dump
Debug dump file: /home/fritz/skupper-dump-west-2024-12-09.tar.gz

# Generate a dump file to a particular path
$ skupper debug dump /tmp/abc.tar.gz
Debug dump file: /tmp/abc.tar.gz
~~~

</section>
Expand All @@ -55,13 +60,18 @@ Debug dump file generated at /home/fritz/dump.tar.gz.

<div class="attribute">
<div class="attribute-heading">
<h3 id="option-file">&lt;file&gt;</h3>
<h3 id="option-file">[file]</h3>
<div class="attribute-type-info">string</div>
<div class="attribute-flags">required</div>
<div class="attribute-flags">optional</div>
</div>
<div class="attribute-body">

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Linux</td></table>
The name of the file to generate.

The command exits with an error if the file already exists.

<table class="fields"><tr><th>Default</th><td><p><code>skupper-dump-&lt;site-name&gt;-&lt;date&gt;.tar.gz</code></p>
</td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Linux</td></table>

</div>
</div>
Expand Down
2 changes: 0 additions & 2 deletions input/commands/debug/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ skupper debug [subcommand] [options]
## Subcommands

<table class="objects">
<tr><th><a href="diagnose.html">Debug diagnose</a></th><td><p>XXX</p>
</td></tr>
<tr><th><a href="dump.html">Debug dump</a></th><td><p>Generate a debug dump file</p>
</td></tr>
</table>
Expand Down
2 changes: 0 additions & 2 deletions input/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ refdog_object_links:

<table class="objects">
<tr><th><a href="{{site_prefix}}/commands/debug/index.html">Debug</a></th><td>Overview of debug commands</td></tr>
<tr><th><a href="{{site_prefix}}/commands/debug/diagnose.html">Debug diagnose</a></th><td><p>XXX</p>
</td></tr>
<tr><th><a href="{{site_prefix}}/commands/debug/dump.html">Debug dump</a></th><td><p>Generate a debug dump file</p>
</td></tr>
</table>
Expand Down
43 changes: 26 additions & 17 deletions input/topics/debug-dumps.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,36 @@
- Key elements include site resources and status; component versions,
config files, and logs; and info about the environment where Skupper
is running.

- Should we include workloads in the namespace? Services, deployments, pods?
- .txt file summaries for some things?
- What details about the overall network should we get?
- Links from other sites?

~~~
versions.yaml # Same as the output of 'skupper version --output yaml'
platform.yaml # Info about the platform and namespace hosting the site
network.yaml # ??
components/
controller/
<config file>
controller.log
router/
<config file>
router.log
kube-adaptor.log
network-observer/
<config file>
network-observer.log
resources/
<kind>-<name>.yaml for each Skupper resource
# Same as the output of 'skupper version -o yaml'
version.yaml
# Same as the output of 'kubectl -n <site-namespace> get <kind>/<name> -o yaml'
resources/<kind>-<name>.yaml
# Same as the output of 'kubectl -n <skupper-namespace> get <kind>/<name> -o yaml'
resources/<kind>-<name>.yaml
~~~

<!-- components/controller/pods/<name>/log.txt -->
<!-- components/controller/pods/<name>/log.txt -->
<!-- components/router/log.txt -->

<!-- platform.yaml # Info about the platform and namespace hosting the site -->

<!-- components/ -->
<!-- controller/ -->
<!-- <config file> -->
<!-- controller.log -->
<!-- router/ -->
<!-- <config file> -->
<!-- router.log -->
<!-- kube-adaptor.log -->
<!-- network-observer/ -->
<!-- <config file> -->
<!-- network-observer.log -->
1 change: 1 addition & 0 deletions input/topics/site-linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Using tokens and the CLI
- Using tokens and YAML
- Token distribution methods
- Using link generation
- Using a network-scoped CA
- Special concerns for non-Kube sites

0 comments on commit 6e1b37d

Please sign in to comment.