]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
23 months agoproxmox-backup-client: replace print with log macro
Hannes Laimer [Wed, 15 Jun 2022 08:19:52 +0000 (08:19 +0000)]
proxmox-backup-client: replace print with log macro

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agopbs-fuse+pbs-tape: replace print with log macro
Hannes Laimer [Wed, 15 Jun 2022 08:19:51 +0000 (08:19 +0000)]
pbs-fuse+pbs-tape: replace print with log macro

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agopbs-datastore: replace print with log macro
Hannes Laimer [Wed, 15 Jun 2022 08:19:50 +0000 (08:19 +0000)]
pbs-datastore: replace print with log macro

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agopbs-client: replace print with log macro
Hannes Laimer [Wed, 15 Jun 2022 08:19:49 +0000 (08:19 +0000)]
pbs-client: replace print with log macro

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobins: init cli logger
Hannes Laimer [Wed, 15 Jun 2022 08:19:48 +0000 (08:19 +0000)]
bins: init cli logger

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobump proxmox-router dep to 1.2.4
Wolfgang Bumiller [Tue, 21 Jun 2022 08:43:11 +0000 (10:43 +0200)]
bump proxmox-router dep to 1.2.4

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoui: disks: show partitions by default
Hannes Laimer [Wed, 8 Jun 2022 08:51:53 +0000 (08:51 +0000)]
ui: disks: show partitions by default

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
23 months agodisks: use builder pattern for querying disk usage
Hannes Laimer [Wed, 15 Jun 2022 06:17:14 +0000 (06:17 +0000)]
disks: use builder pattern for querying disk usage

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
23 months agoapi2: disks endpoint return partitions
Hannes Laimer [Wed, 8 Jun 2022 08:51:51 +0000 (08:51 +0000)]
api2: disks endpoint return partitions

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
23 months agoremove outdated comment
Wolfgang Bumiller [Tue, 14 Jun 2022 11:00:14 +0000 (13:00 +0200)]
remove outdated comment

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agofix #3867: server/api: send emails on certificate renewal failure
Stefan Sterz [Tue, 14 Jun 2022 08:09:45 +0000 (10:09 +0200)]
fix #3867: server/api: send emails on certificate renewal failure

the superuser's email will be used to notify them that certificate
renewal has failed.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobump proxmox-fuse dep to 0.1.3
Wolfgang Bumiller [Mon, 13 Jun 2022 13:12:07 +0000 (15:12 +0200)]
bump proxmox-fuse dep to 0.1.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobump d/control
Wolfgang Bumiller [Mon, 13 Jun 2022 08:05:44 +0000 (10:05 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoui: add MetricServerView and use it
Dominik Csapak [Fri, 10 Jun 2022 11:17:57 +0000 (13:17 +0200)]
ui: add MetricServerView and use it

simple CRUD interface to show/add/edit/delete metric servers

it's a bit different from PVE's so it's harder to reuse that than to
copy it. If we need it again, we can still refactor and combine them.

introduce 'PBS.Schema' class to hold the server type/xtype mappings

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoui: add window/InfluxDbEdit
Dominik Csapak [Fri, 10 Jun 2022 11:17:56 +0000 (13:17 +0200)]
ui: add window/InfluxDbEdit

contains both windows for HTTP and UDP

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoapi: add metricserver endpoints
Dominik Csapak [Fri, 10 Jun 2022 11:17:55 +0000 (13:17 +0200)]
api: add metricserver endpoints

but in contrast to pve, we split the api by type of the section config,
since we cannot handle multiple types in the updater

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoproxmox-backup-proxy: send metrics to configured metrics server
Dominik Csapak [Fri, 10 Jun 2022 11:17:54 +0000 (13:17 +0200)]
proxmox-backup-proxy: send metrics to configured metrics server

and keep the data as similar as possible to pve (tags/fields)

datastores get their own 'object' type and reside in the "blockstat"
measurement

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobackup-proxy: decouple stats gathering from rrd update
Dominik Csapak [Fri, 10 Jun 2022 11:17:53 +0000 (13:17 +0200)]
backup-proxy: decouple stats gathering from rrd update

that way we can reuse the stats gathered

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agopbs-config: add metrics config class
Dominik Csapak [Fri, 10 Jun 2022 11:17:52 +0000 (13:17 +0200)]
pbs-config: add metrics config class

a section config like in pve

also adds a helper to get Metrics structs for all configured servers

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agopbs-api-types: add metrics api types
Dominik Csapak [Fri, 10 Jun 2022 11:17:51 +0000 (13:17 +0200)]
pbs-api-types: add metrics api types

InfluxDbUdp and InfluxDbHttp for now

introduces schemas for host:port and https urls

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoconfig: remove duplicate privilege lookup in cached_user_info
Stefan Sterz [Fri, 10 Jun 2022 08:13:25 +0000 (10:13 +0200)]
config: remove duplicate privilege lookup in cached_user_info

`lookup_privs` just uses `lookup_privs_details` but ignores the
propagated privileges it returns. thus, the lookup here is redundant
as it is immediately followed by a call to `lookup_privs_details` with
the same parameters.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
23 months agod/lintian-overrides: ignore some expected warnings
Thomas Lamprecht [Wed, 8 Jun 2022 12:51:03 +0000 (14:51 +0200)]
d/lintian-overrides: ignore some expected warnings

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agobump version to 2.2.3-2
Thomas Lamprecht [Wed, 8 Jun 2022 12:23:25 +0000 (14:23 +0200)]
bump version to 2.2.3-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoconfig: acl get child paths: make tests more specific
Thomas Lamprecht [Wed, 8 Jun 2022 12:04:33 +0000 (14:04 +0200)]
config: acl get child paths: make tests more specific

to avoid that extra paths "sneak" in in some regression

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoconfig: re-enable efficient mixed acl path/slice support
Thomas Lamprecht [Wed, 8 Jun 2022 12:01:53 +0000 (14:01 +0200)]
config: re-enable efficient mixed acl path/slice support

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoacl: fix any_priv_below when used with API tokens
Fabian Grünbichler [Wed, 8 Jun 2022 09:27:24 +0000 (11:27 +0200)]
acl: fix any_priv_below when used with API tokens

The previous implementation had one issue with not handling API
tokens correctly.

In general, AclTree(Node) operates on the role level, not the priv
level - the latter is handled by cached_user_info.rs

Accordingly, the ACL tree helpers now return a list of paths where *any*
role is defined for the given AuthId, and any_priv_below then maps those
paths to privs via the regular helpers for priv lookup/checking. this
approach should also be robust if groups and group ACLs are ever
introduced.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoacl: rename get_node to get_node_mut
Fabian Grünbichler [Wed, 8 Jun 2022 09:26:36 +0000 (11:26 +0200)]
acl: rename get_node to get_node_mut

get_node will be re-introduced with the next patch, which requires a
non-mut accessor.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agocargo fmt/format variable inlining
Thomas Lamprecht [Tue, 7 Jun 2022 12:34:55 +0000 (14:34 +0200)]
cargo fmt/format variable inlining

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoapi: tape restore: warn if snapshot could not get parsed
Thomas Lamprecht [Tue, 7 Jun 2022 12:18:46 +0000 (14:18 +0200)]
api: tape restore: warn if snapshot could not get parsed

unlikely, but cost is far too low to not do it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoapi: tape restore: code cleanup to reduce indentation level
Thomas Lamprecht [Tue, 7 Jun 2022 12:12:00 +0000 (14:12 +0200)]
api: tape restore: code cleanup to reduce indentation level

No semantic change intended. IMO the interface of "both a datastore
and NS mapping must be present" is still a bit weird, at least in how
its used here to decide what to skip and what not, maybe we can
implement this in a more clear way (or maybe I'm just overlooking
something that makes it clearer as is).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agotree wide: typo fixes through codespell
Thomas Lamprecht [Tue, 7 Jun 2022 07:22:45 +0000 (09:22 +0200)]
tree wide: typo fixes through codespell

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoaccess: fix typo in RPC env wrong-type error
Thomas Lamprecht [Tue, 7 Jun 2022 06:53:24 +0000 (08:53 +0200)]
access: fix typo in RPC env wrong-type error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agod/changelog: fix typos in historical entries
Thomas Lamprecht [Tue, 7 Jun 2022 06:52:34 +0000 (08:52 +0200)]
d/changelog: fix typos in historical entries

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoreplace 'disk_usage' with 'fs_info' from proxmox-sys
Dominik Csapak [Thu, 2 Jun 2022 12:18:04 +0000 (14:18 +0200)]
replace 'disk_usage' with 'fs_info' from proxmox-sys

Use the moved 'fs_info' helpers from the proxmox-sys crate (available
from there since proxmox-sys 0.3.0) as replacement for 'disk_usage'
in the workspace local tools crate and remove the latter as we do not
need it anymore.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: squashed in removal of now unused import and reworded commit
  message to include version availability info, among other things ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoapi: tape restore: avoid throwing away ns mapping, use target_store instead
Thomas Lamprecht [Sun, 5 Jun 2022 14:59:55 +0000 (16:59 +0200)]
api: tape restore: avoid throwing away ns mapping, use target_store instead

avoid assembling a hash mapping of namespaces only to not use it,
i.e., throw it away then anyway

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoapi: tape restore: some code cleanups
Thomas Lamprecht [Sun, 5 Jun 2022 14:55:13 +0000 (16:55 +0200)]
api: tape restore: some code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoapi: tape restore: split/rework datastore/namespace map implementation
Thomas Lamprecht [Sun, 5 Jun 2022 14:47:24 +0000 (16:47 +0200)]
api: tape restore: split/rework datastore/namespace map implementation

The split out helpers will (partially) be used in later patches for
call sites where we only need parts of the info assembled here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoapi: tape restore: use HumanByte for friendlier total/throughput reporting
Thomas Lamprecht [Sun, 5 Jun 2022 08:45:13 +0000 (10:45 +0200)]
api: tape restore: use HumanByte for friendlier total/throughput reporting

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoapi: tape restore: refactor some code parts shorter
Thomas Lamprecht [Sun, 5 Jun 2022 08:42:46 +0000 (10:42 +0200)]
api: tape restore: refactor some code parts shorter

not wanting to play code golf here, but bloat in code makes it often
also harder to read, so try to reduce some of that without making it
to terse.

No semantic change intended.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agocode formatting fixups
Thomas Lamprecht [Sun, 5 Jun 2022 08:36:40 +0000 (10:36 +0200)]
code formatting fixups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agotape: use inline variable in formats for code reduction
Thomas Lamprecht [Sun, 5 Jun 2022 08:33:26 +0000 (10:33 +0200)]
tape: use inline variable in formats for code reduction

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agotree wide: typo fixes through codespell
Thomas Lamprecht [Sun, 5 Jun 2022 08:30:23 +0000 (10:30 +0200)]
tree wide: typo fixes through codespell

Most, not all, found and fixes using `codespell -wci3 -L crate`

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 2.2.3-1
Thomas Lamprecht [Sat, 4 Jun 2022 14:30:18 +0000 (16:30 +0200)]
bump version to 2.2.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: datastore status: use cheaper any_privs_below over can_access_any_namespace
Thomas Lamprecht [Sat, 4 Jun 2022 13:30:25 +0000 (15:30 +0200)]
api: datastore status: use cheaper any_privs_below over can_access_any_namespace

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: list datastore: avoid iterating over NS for priv check, use AclTree
Thomas Lamprecht [Sat, 4 Jun 2022 12:57:30 +0000 (14:57 +0200)]
api: list datastore: avoid iterating over NS for priv check, use AclTree

Make the assumption that if a user has any privilege that would make
an NS and (parts) of its content visible they also should be able to
know about the datastore and very basic errors on lookup (path
existence and maintenance mode) even if that NS doesn't even exists
(yet), as they could, e.g., make or view a backup and find out
anyway.

This avoids iterating over parts of the whole datastore folder tree
on disk, doing a priv check on each, swapping IO to virtual in memory
checks on info we got available already anyway, is always a good idea
after all

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoconfig: cached user info: expose new any_privs_below
Thomas Lamprecht [Sat, 4 Jun 2022 12:50:43 +0000 (14:50 +0200)]
config: cached user info: expose new any_privs_below

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoconfig: any_priv_below: plural name & switch to slice of &str for path
Thomas Lamprecht [Sat, 4 Jun 2022 12:47:35 +0000 (14:47 +0200)]
config: any_priv_below: plural name & switch to slice of &str for path

s/any_priv_below/any_privs_below/ for consistency and switch from a
single &str for the path param to the slice-ref string variant, as
that allows to use it more often without allocation.

Also allow passing the whole path as single &str element in the slice
by splitting each component on '/' like we do in other parts
nowadays. Note though that we need to omit the leading slash then.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoconfig: s/propagating/only_propagated/ and style nits
Thomas Lamprecht [Sat, 4 Jun 2022 12:46:50 +0000 (14:46 +0200)]
config: s/propagating/only_propagated/ and style nits

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopbs-config: acl-tree: add any_priv_below
Stefan Sterz [Fri, 3 Jun 2022 15:32:24 +0000 (17:32 +0200)]
pbs-config: acl-tree: add any_priv_below

`any_priv_below()` checks if a given AuthId has any given privileges
on a sub-tree of the AclTree. to do so, it first takes into account
propagating privileges on the path itself and then uses a depth-first
search to check if any of the provided privileges are set on any
node of the sub-tree pointed to by the path.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodatastore: swap ConfigVersionCache with digest for change detection
Thomas Lamprecht [Fri, 3 Jun 2022 15:18:13 +0000 (17:18 +0200)]
datastore: swap ConfigVersionCache with digest for change detection

We got the digest available anyway, and it's only 16 bytes more to
save (compared to last_generation and the recently removed last_time,
both being 64 bit = 8 bytes each)

Side benefit, we detect config changes made manually (e.g., `vim
datacenter.cfg`) immediately.

Note that we could restructure the maintenance mode checking to only
be done after checking if there's a cached datastore, in which case
using the generation could make sense to decide if we need to re-load
it again before blindly loading the config anyway. As that's not only
some (not exactly hard but not really trivial like a typo fix either)
restructuring work but also means we'd lose the "detect manual
changes" again I'd rather keep using the digest.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodatastore: make unsafe fn public again, useful for example/test
Thomas Lamprecht [Fri, 3 Jun 2022 15:10:17 +0000 (17:10 +0200)]
datastore: make unsafe fn public again, useful for example/test

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodatastore: make unsafe functions only visible in their own crate
Thomas Lamprecht [Fri, 3 Jun 2022 11:42:42 +0000 (13:42 +0200)]
datastore: make unsafe functions only visible in their own crate

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: list datastores: avoid unsafe datastore open
Thomas Lamprecht [Fri, 3 Jun 2022 11:31:26 +0000 (13:31 +0200)]
api: list datastores: avoid unsafe datastore open

to avoid the problematic open fresh datastore with fresh chunkstore
with, and that's the actual problematic part, fresh process locker.
As the latter uses posix record locks which are pretty dangreous as
they operate on a path level (not FD level) and thus closing any file
opened (even if it wasn't opened for locking at all) drops all active
locks on the same file on completely unrelated file descriptors -.-

Also, no operation wasn't exactly correct for this thing in the first
place, but we cannot use Operation::Lookup either, as we're currently
indeed using a rather stupid-simple way and *are* reading.

So until we optimize this to allow querying the AclTree if there's
any priv XYZ below a path, use the Operation::Read.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodatastore: add safety doc comment for unsafe opens
Thomas Lamprecht [Fri, 3 Jun 2022 08:58:33 +0000 (10:58 +0200)]
datastore: add safety doc comment for unsafe opens

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodatastore: reduce chunk store open visibility and comment pitfalls
Thomas Lamprecht [Fri, 3 Jun 2022 08:15:41 +0000 (10:15 +0200)]
datastore: reduce chunk store open visibility and comment pitfalls

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodatastore: rename non-telling `map` to `datastore_cache`
Thomas Lamprecht [Fri, 3 Jun 2022 08:11:09 +0000 (10:11 +0200)]
datastore: rename non-telling `map` to `datastore_cache`

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodatastore: drop bogus last_update stale-cache mechanism
Thomas Lamprecht [Fri, 3 Jun 2022 08:04:16 +0000 (10:04 +0200)]
datastore: drop bogus last_update stale-cache mechanism

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoconfig: version cache: fix ordering of datastore generation increase
Thomas Lamprecht [Fri, 3 Jun 2022 07:06:23 +0000 (09:06 +0200)]
config: version cache: fix ordering of datastore generation increase

Fixes: 118deb4d (pbs-datastore: use ConfigVersionCache for datastore)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodatastore: more concise comment
Thomas Lamprecht [Thu, 2 Jun 2022 15:48:08 +0000 (17:48 +0200)]
datastore: more concise comment

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 2.2.2-3
Thomas Lamprecht [Thu, 2 Jun 2022 15:25:05 +0000 (17:25 +0200)]
bump version to 2.2.2-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodocs: faq: more specific eol date
Thomas Lamprecht [Thu, 2 Jun 2022 15:38:44 +0000 (17:38 +0200)]
docs: faq: more specific eol date

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodatastore: lookup: reuse ChunkStore on stale datastore re-open
Dominik Csapak [Thu, 2 Jun 2022 14:27:44 +0000 (16:27 +0200)]
datastore: lookup: reuse ChunkStore on stale datastore re-open

When re-opening a datastore due to the cached entry being stale
(config change) but also if the last re-open was >60s ago). On
datastore open the chunk store was also re-opened, which in turn
creates a new ProcessLocker, loosing any existing shared lock which
can cause conflicts between long running (24h+) backups  and GC.

To fix this, reuse the existing ChunkStore, and thus  its
ProcessLocker, when creating a up-to-date datastore instance on
lookup, since only the datastore config should be reloaded. This is
fine as the ChunkStore path is not updatable over our API.

This was always a potential issue but got exposed in practice by
commit 118deb4db8e709b02704bc66c0551bfa7e4369ed which introduced the
unconditional "re-open after 60s" mechanism.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: reword commit message a bit and reference commit that made the
   issue much more likely ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotree wide: clippy lint fixes
Thomas Lamprecht [Thu, 2 Jun 2022 13:59:53 +0000 (15:59 +0200)]
tree wide: clippy lint fixes

most (not all) where done automatically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoclient: clippy lints
Thomas Lamprecht [Thu, 2 Jun 2022 13:57:33 +0000 (15:57 +0200)]
client: clippy lints

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi types: clippy lints
Thomas Lamprecht [Thu, 2 Jun 2022 13:57:07 +0000 (15:57 +0200)]
api types: clippy lints

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoupdate to nix 0.24 / rustyline 9 / proxmox-sys 0.3
Fabian Grünbichler [Thu, 2 Jun 2022 11:10:33 +0000 (13:10 +0200)]
update to nix 0.24 / rustyline 9 / proxmox-sys 0.3

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump tokio-util to 0.7
Fabian Grünbichler [Thu, 2 Jun 2022 07:40:54 +0000 (09:40 +0200)]
bump tokio-util to 0.7

along with the rest of tokio/futures/hyper/openssl being updated - this
is the only one we explicitly depend on that had a non-compatible
version number.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump version to 2.2.2-2
Thomas Lamprecht [Wed, 1 Jun 2022 15:00:02 +0000 (17:00 +0200)]
bump version to 2.2.2-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoserver: remove jobstate: ignore removal error due to file not found
Thomas Lamprecht [Wed, 1 Jun 2022 14:40:06 +0000 (16:40 +0200)]
server: remove jobstate: ignore removal error due to file not found

we want to remove lock and state file anyway, so not found is all
right

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 2.2.2-1
Thomas Lamprecht [Wed, 1 Jun 2022 13:09:40 +0000 (15:09 +0200)]
bump version to 2.2.2-1

same story as last time

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomanager cli: output more info when transforming prune jobs
Thomas Lamprecht [Wed, 1 Jun 2022 13:09:20 +0000 (15:09 +0200)]
manager cli: output more info when transforming prune jobs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 2.2.2-1
Thomas Lamprecht [Wed, 1 Jun 2022 12:34:01 +0000 (14:34 +0200)]
bump version to 2.2.2-1

re-bump for small fixes discovered before any upload

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomanager cli: output more info when skipping prune tranforms
Thomas Lamprecht [Wed, 1 Jun 2022 12:31:53 +0000 (14:31 +0200)]
manager cli: output more info when skipping prune tranforms

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi types: prune keep options: also check weekly in keeps_something
Thomas Lamprecht [Wed, 1 Jun 2022 12:30:24 +0000 (14:30 +0200)]
api types: prune keep options: also check weekly in keeps_something

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 2.2.2-1
Thomas Lamprecht [Wed, 1 Jun 2022 11:04:34 +0000 (13:04 +0200)]
bump version to 2.2.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoCargo.toml: add missing patch sections
Fabian Grünbichler [Wed, 1 Jun 2022 09:01:23 +0000 (11:01 +0200)]
Cargo.toml: add missing patch sections

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoui: add prune job worker task description and renderer
Thomas Lamprecht [Tue, 31 May 2022 11:11:23 +0000 (13:11 +0200)]
ui: add prune job worker task description and renderer

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: prune & gc: relay activate/deactivate events to sub panels
Thomas Lamprecht [Tue, 31 May 2022 08:02:10 +0000 (10:02 +0200)]
ui: prune & gc: relay activate/deactivate events to sub panels

which allows us also to drop the initial manual load in the init,
which would also trigger if the tab isn't visible.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: system config: improve bottom margins and scroll behavior
Thomas Lamprecht [Tue, 31 May 2022 05:03:29 +0000 (07:03 +0200)]
ui: system config: improve bottom margins and scroll behavior

setting scrollable on the parent tab panel makes not much sense and
will always add a scroll bar that can scroll a few pixels, even if
there's enough space.
Rather set it to true (= auto) in the actual panels that hold the
content.

Also set a bottom margin so that users can see the "end" of the panel
at the bottom, otherwise it looked like it had a start and sides, but
no bottom.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: prune jobs: avoid duplicate params through nested input panels
Thomas Lamprecht [Mon, 30 May 2022 13:15:39 +0000 (15:15 +0200)]
ui: prune jobs: avoid duplicate params through nested input panels

input panel collect all form fields below them, so nesting two
input panels needs a bit of special care to avoid that each of the
panels adds the data of the deeper nested ones, resulting in
duplicate parameters that the backend then chokes one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: prune & gc: disallow collapse and add bottom margin
Thomas Lamprecht [Mon, 30 May 2022 13:02:05 +0000 (15:02 +0200)]
ui: prune & gc: disallow collapse and add bottom margin

the intra-panel margin is still the same (10 + 0 == 7 + 3) but one
can now see the bottom border.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: disable setting prune options in datastore.cfg
Wolfgang Bumiller [Mon, 30 May 2022 12:48:13 +0000 (14:48 +0200)]
api: disable setting prune options in datastore.cfg

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agostop executing datastore prune job
Wolfgang Bumiller [Mon, 30 May 2022 12:41:34 +0000 (14:41 +0200)]
stop executing datastore prune job

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoapi: don't use PRUNE perms for prune jobs
Wolfgang Bumiller [Mon, 30 May 2022 12:33:05 +0000 (14:33 +0200)]
api: don't use PRUNE perms for prune jobs

just stick to MODIFY so we don't need to give the prune jobs
an owner for now

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agodrop unused import
Wolfgang Bumiller [Mon, 30 May 2022 12:01:22 +0000 (14:01 +0200)]
drop unused import

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agod/postinst: transform prune tasks from datastore cfg to new prune job
Thomas Lamprecht [Mon, 30 May 2022 11:36:59 +0000 (13:36 +0200)]
d/postinst: transform prune tasks from datastore cfg to new prune job

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomanager: hidden command to move datastore prune opts into jobs
Wolfgang Bumiller [Tue, 24 May 2022 10:54:42 +0000 (12:54 +0200)]
manager: hidden command to move datastore prune opts into jobs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoui: rework prune job view/edit
Thomas Lamprecht [Mon, 30 May 2022 09:11:56 +0000 (11:11 +0200)]
ui: rework prune job view/edit

Fix missing load on initial view, re-use the prune input panel for
editing and avoid using a tab panel for a single tab, rework also
some columns widths and various other small parts-

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: re-integrate prune into prune & GC panel
Thomas Lamprecht [Mon, 30 May 2022 08:44:58 +0000 (10:44 +0200)]
ui: re-integrate prune into prune & GC panel

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: add ui for prune jobs
Wolfgang Bumiller [Mon, 23 May 2022 09:00:55 +0000 (11:00 +0200)]
ui: add ui for prune jobs

similar to verification/sync jobs, the prune settings on the
datastore are deprecated

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agotests: switch to PruneJobOptions
Wolfgang Bumiller [Tue, 24 May 2022 09:20:55 +0000 (11:20 +0200)]
tests: switch to PruneJobOptions

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoclient: switch to PruneJobsOptions
Wolfgang Bumiller [Tue, 24 May 2022 09:18:06 +0000 (11:18 +0200)]
client: switch to PruneJobsOptions

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoadd prune jobs api
Wolfgang Bumiller [Thu, 19 May 2022 09:02:01 +0000 (11:02 +0200)]
add prune jobs api

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoadd prune job config
Wolfgang Bumiller [Thu, 19 May 2022 07:42:53 +0000 (09:42 +0200)]
add prune job config

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoapi-types: add PruneJobConfig
Wolfgang Bumiller [Thu, 19 May 2022 07:43:09 +0000 (09:43 +0200)]
api-types: add PruneJobConfig

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoapi: add some missing sorted macro calls
Wolfgang Bumiller [Thu, 19 May 2022 07:57:20 +0000 (09:57 +0200)]
api: add some missing sorted macro calls

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agod/postinst: fix upper version for applying sync.cfg remove-vanished default
Thomas Lamprecht [Mon, 30 May 2022 11:36:03 +0000 (13:36 +0200)]
d/postinst: fix upper version for applying sync.cfg remove-vanished default

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: datastore content: better cope with restricted privs on parent namespaces
Thomas Lamprecht [Fri, 27 May 2022 14:09:48 +0000 (16:09 +0200)]
ui: datastore content: better cope with restricted privs on parent namespaces

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: datastore content: only mask the treeview, not the top bar
Thomas Lamprecht [Fri, 27 May 2022 14:05:07 +0000 (16:05 +0200)]
ui: datastore content: only mask the treeview, not the top bar

so that an user can try to reload again easily for non-persistent
errors

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: datastore content: avoid duplicate masking on load error
Thomas Lamprecht [Fri, 27 May 2022 14:02:42 +0000 (16:02 +0200)]
ui: datastore content: avoid duplicate masking on load error

we already handle that manually in the onLoad and want to further
extend that, so drop the more generic monStoreError

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>