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

Propose a command that amalgamates cmd+test+archive-logs #24

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions rfcs/store-results.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Add a command to store the results of command/query execution

While participating in a support escalation on a Kubernetes cluster, it
struck me how tedious and error-prone it was to execute queries across
nodes on the cluster and copy the results out for further analysis.

TPA has some pieces that could make this easier for its clusters:

* `tpaexec cmd` executes ad-hoc commands (including via `-m script`),
and `tpaexec playbook` executes playbooks.

* `tpaexec test` and other commands like `archive-logs` already know how
to copy things from the instances and store them in local directories
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 copy things from the instances and store them in local directories
to copy things from the instances and store them in local directories.


We could put these together into a slightly different form and provide a
command like the following:

tpaexec execute mycluster \
[--commands-from … | --queries-from … | --script …]

This would execute the given input on all applicable instances (and we
could support `--hosts role_xyz:!role_pqr` as well), and create local
directories in the style of `tpaexec test` and store the output there,
with unambiguous hostnames and timestamps.

Or perhaps we could have separate commands:

tpaexec execute-script mycluster xyz.sh
tpaexec execute-queries mycluster xyz.sql

(We don't need to do anything for playbooks, because `tpaexec playbook`
is good enough already.)
Loading