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

PBM-887 Documented pbm diagnostic command #226

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nastena1606
Copy link
Collaborator

modified: docs/reference/pbm-commands.md
new file: docs/troubleshoot/pbm-report.md
modified: mkdocs-base.yml

modified:   docs/reference/pbm-commands.md
	new file:   docs/troubleshoot/pbm-report.md
	modified:   mkdocs-base.yml
docs/reference/pbm-commands.md Outdated Show resolved Hide resolved
docs/reference/pbm-commands.md Outdated Show resolved Hide resolved
docs/troubleshoot/pbm-report.md Outdated Show resolved Hide resolved
docs/troubleshoot/pbm-report.md Outdated Show resolved Hide resolved
docs/troubleshoot/pbm-report.md Outdated Show resolved Hide resolved
docs/reference/pbm-commands.md Outdated Show resolved Hide resolved
@it-percona it-percona temporarily deployed to PBM-887-pbm-diagnostic - pbm-docs PR #226 November 14, 2024 16:29 — with Render Destroyed
| `--path` | The path where to save the report. If the directory doesn’t exist, PBM creates it during the report generation. Make sure that the user that runs PBM CLI has write access to the specified path |
| `--name` | The name of the required backup or a restore |
| `--opid` | The unique Operation ID of the specified command. You can retrieve it from the `pbm logs`, `pbm describe-backup` / `pbm describe-restore` output. |
| `--archive` | Creates teh .zip archive of the report in the specified path.|
Copy link
Contributor

@radoslawszulgo radoslawszulgo Nov 14, 2024

Choose a reason for hiding this comment

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

Suggested change
| `--archive` | Creates teh .zip archive of the report in the specified path.|
| `--archive` | Creates a .zip archive in the specified path.|


Generates the report with the detailed information about a a specific backup, restore, or other commands. The report includes the following information:

* The information about the environment: pbm-agents statuses, cluster members, etc.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we may skip most of the introduction here as it's described in the dedicated page. I think 1 sentence about what it does, may be enough. Then we can proceed to details with different parameters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Reworded, left the link to the feature description.

```{.bash data-prompt="$"}
$ pbm diagnostic --path=path --opid=<OPID>
```

Copy link
Contributor

Choose a reason for hiding this comment

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

I miss here a real-life example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean the sample output? The cluster env report is huge that's why I haven't pasted it. As a workaround we can list the files that are generated.

@@ -402,6 +402,33 @@ The output document contains the following fields:
| `replsets` | The list of replica sets included in the restore. Each replica set has the following fields: <br> - `name` - the replica set name <br> - `status` - the restore status on this replica set <br> - `error` - the error message for failed restore <br> - `last_transition_time` - the human-readable indication of the time when the restore process changed its status <br> - `nodes` - the list of nodes included in the restore. |
| `replsets.nodes` | The list of nodes included in the restore. Each node has the following fields: <br> - `name` - the node name and port <br> - `status` - the restore status on the node <br> - `error` - the error message for failed restore <br> - `last_transition_time` - the human-readable indication of the time when the restore process changed its status |

## pbm diagnostic

Generates the report with the detailed information about a a specific backup, restore, or other commands. The report includes the following information:
Copy link
Contributor

@radoslawszulgo radoslawszulgo Nov 14, 2024

Choose a reason for hiding this comment

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

I'm against using "report" - as there's no report generated - it doesn't contain any answers or analysis, just a set of diagnostic files. Let's call it a "diagnostic archive".

Suggested change
Generates the report with the detailed information about a a specific backup, restore, or other commands. The report includes the following information:
Generates a diagnostic archive with detailed information about a specific command. The archive includes the following information:

Copy link
Member

@defbin defbin Nov 14, 2024

Choose a reason for hiding this comment

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

without --archive flag, it will be just files.

the command also works for other commands. it is not specific for backup or restore.

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should drop "--archive" and always create a zip archive ?

Copy link
Member

@defbin defbin Nov 14, 2024

Choose a reason for hiding this comment

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

if cleanup, delete-backup, config --force-resync etc fails, the report of the command will be helpful for us

Copy link
Contributor

Choose a reason for hiding this comment

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

Eventually we may name it "Diagnostic Dump"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So what's the outcome of this discussion?:)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd stick to report. An archive is also a report, only archived


<i warning>:material-alert: Warning:</i> Physical restore is not supported in version 2.8.0.

To learn more, refer to the [Diagnostics report](../troubleshoot/pbm-report.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To learn more, refer to the [Diagnostics report](../troubleshoot/pbm-report.md).
To learn more, refer to the [Diagnostics archive](../troubleshoot/pbm-report.md).

Copy link
Member

Choose a reason for hiding this comment

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

again, to generate a zip archive you need to explicitly ask by providing --archive flag

@@ -402,6 +402,33 @@ The output document contains the following fields:
| `replsets` | The list of replica sets included in the restore. Each replica set has the following fields: <br> - `name` - the replica set name <br> - `status` - the restore status on this replica set <br> - `error` - the error message for failed restore <br> - `last_transition_time` - the human-readable indication of the time when the restore process changed its status <br> - `nodes` - the list of nodes included in the restore. |
| `replsets.nodes` | The list of nodes included in the restore. Each node has the following fields: <br> - `name` - the node name and port <br> - `status` - the restore status on the node <br> - `error` - the error message for failed restore <br> - `last_transition_time` - the human-readable indication of the time when the restore process changed its status |

## pbm diagnostic

Generates the report with the detailed information about a a specific backup, restore, or other commands. The report includes the following information:
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should drop "--archive" and always create a zip archive ?

@@ -402,6 +402,33 @@ The output document contains the following fields:
| `replsets` | The list of replica sets included in the restore. Each replica set has the following fields: <br> - `name` - the replica set name <br> - `status` - the restore status on this replica set <br> - `error` - the error message for failed restore <br> - `last_transition_time` - the human-readable indication of the time when the restore process changed its status <br> - `nodes` - the list of nodes included in the restore. |
| `replsets.nodes` | The list of nodes included in the restore. Each node has the following fields: <br> - `name` - the node name and port <br> - `status` - the restore status on the node <br> - `error` - the error message for failed restore <br> - `last_transition_time` - the human-readable indication of the time when the restore process changed its status |

## pbm diagnostic

Generates the report with the detailed information about a a specific backup, restore, or other commands. The report includes the following information:
Copy link
Contributor

Choose a reason for hiding this comment

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

Eventually we may name it "Diagnostic Dump"

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