Commit Graph

6931 Commits

Author SHA1 Message Date
Thomas Lamprecht
9f43a9febf datastore: rustfmt
Fixes: d2aff935 ("update to nix 0.26")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-19 11:37:24 +01:00
Thomas Lamprecht
c4f3677957 client: task log: use fstrings for shorter code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-19 11:37:24 +01:00
Thomas Lamprecht
22fc132a73 client: task log: only encode upid once
Instead of percent-encoding the UPID on every loop iteration plus on
abort, just encode it once before entering the loop.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-19 10:38:19 +01:00
Fabian Grünbichler
158db8c01f fix #4483: fix task log command interrupt handling
`proxmox-backup-client task log ..` and `proxmox-backup-manager task log ..`
are used to view the logs of tasks that have been started by another client, so
interrupting the task progress view should not forward the interrupt to the
running task. other call sites of the same helper(s) that spawn a task and then
print its progress should keep the old behaviour of interrupting the spawned
task on C^c.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-19 10:11:25 +01:00
Fiona Ebner
07151513fa api: apt: versions: add proxmox-mail-forward to package list
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-01-18 11:26:25 +01:00
Stefan Hanreich
35e80f3e52 docs: fix typo in garbage collection section
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-01-18 08:36:44 +01:00
Thomas Lamprecht
0b160cfdec tape inventory: code cleanup listing media assigned to a pool
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-16 11:05:35 +01:00
Thomas Lamprecht
7792507a12 tape inventory: code cleanup media pool look-up
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-16 11:05:35 +01:00
Thomas Lamprecht
6905bd3735 tape inventory: make both media list methods use same appraoch
Was a bit odd that the very similar (same return type) methods used
a for+if/else+push and a iter+filter+collect approach.

Switch both to the latter and use a match instead of if/else for
shorter code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-16 11:05:35 +01:00
Dominik Csapak
025523c059 fix #4466: show snapshots in media content again
while refactoring the the empty media set checks, we accidentally
reversed one check from !is_empty to unassigned, which now never
included the right media sets.

reversing the condition fixes that.

fixes
52517f7b: ("tape: hide internal use of all zero uuid for unassigned tapes")

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-01-16 10:48:31 +01:00
Thomas Lamprecht
f564ba0e4e cargo: update proxmox-openid to 0.9.9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-11 18:45:25 +01:00
Fabian Grünbichler
d2aff935c9 update to nix 0.26
and corresponding proxmox-* dependencies to their versions depending on nix
0.26.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-05 13:16:21 +01:00
Fiona Ebner
73809d55b7 http client: suppress "storing login ticket"-error when not using a TTY
as a stop-gap measure. Otherwise, task logs for PVE backups started
via non-CLI will have the message
> storing login ticket failed: $XDG_RUNTIME_DIR must be set
show up when running a proxmox-backup-client command (e.g. setting
notes and when uploading the log). This is confusing to users[0].

[0]: https://forum.proxmox.com/threads/120492/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-01-05 12:29:13 +01:00
Wolfgang Bumiller
a2055c38fe fix non-camel-case enums
This should have never been started to begin with...
2023-01-05 11:13:46 +01:00
Dominik Csapak
79de842ca3 disk: zfs: improve error logging for zfs commands
zfs errors might include a newline in the output (e.g. when trying to
create a mirror on two differently sized disks), which trips up our
task log status parser since that expectes a 'TASK {status}' on the
beginning of the first line.

print the error from zfs into the log and bail out with a short notice
to check the task log

this fixes the 'unknown error' issue in the ui when an error happnes
during the zfs commands

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-01-05 10:36:57 +01:00
Christoph Heiss
ff2910666b api2/node/services: Handle optional services and expose unit-state
.. in the same way the PVE api does, esp. regarding the logic to handle
oneshot and missing services.

This then allows re-using the GUI parts from there as well, so that the
services page in PVE and PBS looks the same.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-01-05 10:12:48 +01:00
Fabian Grünbichler
7be0a3fd1f fix typo
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-04 12:05:58 +01:00
Thomas Lamprecht
867ce3587b ui: verify jobs: set/improve min-width for datastore and namespace columns
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-04 11:19:29 +01:00
Thomas Lamprecht
b2a9d6a71c fix #4448: ui: verify jobs: add namespace and max-depth columns
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-04 11:14:06 +01:00
Thomas Lamprecht
25f7d2a91a fix #4448: ui: prune jobs: rename Store to Datastore for consitency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-04 11:03:40 +01:00
Fabian Grünbichler
e6120a8f6f bump version to 2.3.2-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-22 11:35:51 +01:00
Wolfgang Bumiller
35869de526 fixup doc string formatting and line-wrap comments
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-12-20 10:35:11 +01:00
Hannes Laimer
f6d6b5a317 fix #4256: api2: remove datastore ACL-node on removal of datastore
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2022-12-20 10:09:09 +01:00
Hannes Laimer
3cba7a9bdd pbs-config: add delete_node for ACL-tree
... needed for the deletion of datastore ACL-nodes when the datastore
is removed.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2022-12-20 10:09:08 +01:00
Hannes Laimer
ca1da2cb3c fix #4256: api2: remove prune jobs on datastore delete
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2022-12-20 10:09:06 +01:00
Hannes Laimer
2b8b5d0fb3 fix #4387: pbs-client: print task-logs to stdout
... since those logs are the result of the command.
2022-12-20 09:26:56 +01:00
Dietmar Maurer
aca9222e35 derive Clone and PartialEq for some API types
This is useful for react-lik GUI toolkits which need to do VDOM diffs.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2022-12-15 17:34:13 +01:00
Fiona Ebner
6c03b0ae4c d/postinst: check if datastore lockfile actually exists
On an installation that never had any datastores, dkpg would fail to
configure the package.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-12-15 10:19:29 +01:00
Fiona Ebner
f082fa7351 d/control: add jq as a build dependency
It's used in the Makefile and building will fail without it.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-12-15 10:19:27 +01:00
Christoph Heiss
70b22b624d fix #4346: pbs-client: don't fail silently when storing ticket
Instead, report an error if storing the ticket info failed, so that the
user is informed that something went wrong and follow-up commands might
require authentication again.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2022-12-13 14:32:56 +01:00
Wolfgang Bumiller
f72ccdd65d move pbs_tools::ticket to pbs_ticket
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-12-13 13:58:09 +01:00
Fabian Grünbichler
6ea62b0a49 build: drop pbs-buildcfg version hack
no longer needed, it inherits the workspace/proxmox-backup version now, there
is no risk of forgetting to update its version anymore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-13 09:52:46 +01:00
Fabian Grünbichler
f23d10ec5d build: use workspace member list for SUBCRATES
similar to what's done in the proxmox repo/workspace, to avoid them getting out
of sync. before this change, the recently introduced pbs-key-config was
missing.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-13 09:52:01 +01:00
Wolfgang Bumiller
8ebb984fbe move pbs_config::tape_encryption_keys to pbs crate lib
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-12-12 14:26:02 +01:00
Wolfgang Bumiller
1104d2a268 move pbs_config::key_config to pbs-key-config
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-12-12 14:19:52 +01:00
Wolfgang Bumiller
28917c7127 update for new proxmox-api-macro
A #[default] attribute now conflicts with an explicitly
defined #[api(default: ...)] value for obvious reasons.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-12-12 11:40:13 +01:00
Fabian Grünbichler
21d4a68255 sort dependencies
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:08:56 +01:00
Fabian Grünbichler
1c447cb881 switch remaining member dependencies to workspace
these are only used by a single member at the moment, but we can move them to
the workspace to have a single location for version + base feature set
specification.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:08:36 +01:00
Fabian Grünbichler
2d49e9c218 make main crate dependencies workspace dependencies
these 10 crates are only used by the main crate itself, make them workspace
dependencies to reduce churn if they are every used by a member as well.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:08:05 +01:00
Fabian Grünbichler
1613835315 update d/control
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:07:18 +01:00
Fabian Grünbichler
781294e4b5 switch regular dependencies to workspace ones
where applicable.

notable changes:
- serde now uses 'derive' feature across the board
- serde removed from pbs-tools (not used)
- openssl bumped to 0.40 (and patched comment removed)
- removed invalid zstd comment

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:07:12 +01:00
Fabian Grünbichler
2059af3305 update d/control
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:05:27 +01:00
Fabian Grünbichler
1fbdf8ef79 switch proxmox dependencies to workspace
besides harmonizing versions, the only global change is that the tokio-io
feature of pxar is now implied since its default anyway, instead of being
spelled out.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:05:27 +01:00
Fabian Grünbichler
83a67d5fa3 add pbs-api-types to Cargo.toml
else the next commit would drop its dependencies for d/control generation.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:05:27 +01:00
Fabian Grünbichler
e938db2bf1 restore-daemon: add missing tokio feature
hidden by the top-level crate enabling it.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:05:27 +01:00
Fabian Grünbichler
cb33ed9ca5 workspace: inherit metadata
pbs-buildcfg is the only one that needs to inherit the version as well, since
it stores it in the compiled crate.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-12 09:05:27 +01:00
Lukas Wagner
8a8def934e manager: remove accidentally committed ldap.rs
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2022-12-09 14:59:15 +01:00
Wolfgang Bumiller
f5e0497ebc bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-12-09 14:39:48 +01:00
Lukas Wagner
86e002c71e debug cli: move parameters into the function signature
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2022-12-09 13:38:38 +01:00
Lukas Wagner
f345d32fac debug cli: add colored output for diff archive
This commit adds the `--color` flag to the `diff archive` tool.
Valid values are `always`, `auto` and `never`. `always` and
`never` should be self-explanatory, whereas `auto` will enable
colors unless one of the following is true:
  - STDOUT is not a tty
  - TERM=dumb is set
  - NO_COLOR is set

The tool will highlight changed file attributes in yellow.
Furthermore, (A)dded files are highlighted in green,
(M)odified in yellow and (D)eleted in red.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2022-12-09 13:38:35 +01:00