public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup v4 0/7] add 'proxmox-backup-debug api' commands
Date: Tue, 21 Sep 2021 12:11:11 +0200	[thread overview]
Message-ID: <20210921101118.2640200-1-d.csapak@proxmox.com> (raw)

this series is a successor to my previous 'pbs-shell' series [0]
code wise its mostly the same but now a subcommand of 'proxmox-backup-debug'

changes from v3:
* rebase on master (use normalize_path_uri from proxmox_rest_server)
* fix worker task log output (upid was not wrapped in {data:upid})

changes from v2:
* now subcommand api of proxmox-backup-debug
* use http api on localhost by default
* add PROXMOX_DEBUG_API_CODE env variable to execute code directly
* use a macro for the completion helper calls
* combine get/post/put/delete requests into one and use 'fixed_param'
* drop priviliges to the backup user when executing 'non-protected' api
  calls directly

changes from v1:
* rebase on master
* rename 'path' parameter to 'api-path' since it clashed with some
  api calls that had a 'path variable'
* better handle workers:
  we must always wait for the local workers and do not need to
  print their logs, since most workers print to stdout if the
  rpcenv type is CLI. Also catch Ctrl+C and try to abort the worker

0: https://lists.proxmox.com/pipermail/pbs-devel/2021-September/003974.html

Dominik Csapak (7):
  server: refactor abort_local_worker
  move proxmox-backup-debug back to main crate
  proxmox-backup-debug: add 'api' subcommands
  api2: add missing token list match_all property
  api2: make some workers log on CLI
  docs: add proxmox-backup-debug to the list of command line tools
  docs: proxmox-backup-debug: add info about the 'api' subcommand

 Cargo.toml                                    |   1 -
 Makefile                                      |   2 -
 debian/proxmox-backup-debug.bash-completion   |   1 -
 debian/proxmox-backup-server.bash-completion  |   1 +
 docs/command-line-tools.rst                   |   4 +
 docs/proxmox-backup-debug/description.rst     |  11 +
 proxmox-backup-debug/Cargo.toml               |  18 -
 proxmox-backup-debug/src/main.rs              |  13 -
 src/api2/access/user.rs                       |  66 ++-
 src/api2/admin/datastore.rs                   |   4 +-
 src/api2/admin/sync.rs                        |   6 +-
 src/api2/admin/verify.rs                      |   5 +-
 src/api2/config/datastore.rs                  |   5 +-
 src/api2/pull.rs                              |   3 +-
 src/api2/tape/backup.rs                       |   7 +-
 src/bin/proxmox-backup-debug.rs               |  24 +
 src/bin/proxmox-backup-proxy.rs               |   6 +-
 src/bin/proxmox_backup_debug/api.rs           | 503 ++++++++++++++++++
 .../bin/proxmox_backup_debug}/inspect.rs      |   0
 src/bin/proxmox_backup_debug/mod.rs           |   3 +
 .../bin/proxmox_backup_debug}/recover.rs      |   0
 src/bin/proxmox_backup_manager/user.rs        |   6 +-
 src/server/verify_job.rs                      |   3 +-
 src/server/worker_task.rs                     |  12 +-
 24 files changed, 627 insertions(+), 77 deletions(-)
 delete mode 100644 debian/proxmox-backup-debug.bash-completion
 delete mode 100644 proxmox-backup-debug/Cargo.toml
 delete mode 100644 proxmox-backup-debug/src/main.rs
 create mode 100644 src/bin/proxmox-backup-debug.rs
 create mode 100644 src/bin/proxmox_backup_debug/api.rs
 rename {proxmox-backup-debug/src => src/bin/proxmox_backup_debug}/inspect.rs (100%)
 create mode 100644 src/bin/proxmox_backup_debug/mod.rs
 rename {proxmox-backup-debug/src => src/bin/proxmox_backup_debug}/recover.rs (100%)

-- 
2.30.2





             reply	other threads:[~2021-09-21 10:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 10:11 Dominik Csapak [this message]
2021-09-21 10:11 ` [pbs-devel] [PATCH proxmox-backup v4 1/7] server: refactor abort_local_worker Dominik Csapak
2021-09-21 10:11 ` [pbs-devel] [PATCH proxmox-backup v4 2/7] move proxmox-backup-debug back to main crate Dominik Csapak
2021-09-21 10:11 ` [pbs-devel] [PATCH proxmox-backup v4 3/7] proxmox-backup-debug: add 'api' subcommands Dominik Csapak
2021-09-21 10:11 ` [pbs-devel] [PATCH proxmox-backup v4 4/7] api2: add missing token list match_all property Dominik Csapak
2021-09-21 10:11 ` [pbs-devel] [PATCH proxmox-backup v4 5/7] api2: make some workers log on CLI Dominik Csapak
2021-09-21 10:11 ` [pbs-devel] [PATCH proxmox-backup v4 6/7] docs: add proxmox-backup-debug to the list of command line tools Dominik Csapak
2021-09-21 10:11 ` [pbs-devel] [PATCH proxmox-backup v4 7/7] docs: proxmox-backup-debug: add info about the 'api' subcommand Dominik Csapak
2021-09-21 13:45 ` [pbs-devel] applied-series: [PATCH proxmox-backup v4 0/7] add 'proxmox-backup-debug api' commands Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210921101118.2640200-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal