]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
2 years agoui: traffic-control edit: move on-load set value logic to own method
Thomas Lamprecht [Mon, 22 Nov 2021 09:25:06 +0000 (10:25 +0100)]
ui: traffic-control edit: move on-load set value logic to own method

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control edit: simpler unique timeframe logic
Thomas Lamprecht [Mon, 22 Nov 2021 09:25:38 +0000 (10:25 +0100)]
ui: traffic-control edit: simpler unique timeframe logic

still just a heuristic, i.e., it does the same as previously but in
one line..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control edit: there's no 'network-select' anymore
Thomas Lamprecht [Mon, 22 Nov 2021 09:26:47 +0000 (10:26 +0100)]
ui: traffic-control edit: there's no 'network-select' anymore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control edit: avoid CIDR literals in gettext
Thomas Lamprecht [Mon, 22 Nov 2021 08:21:43 +0000 (09:21 +0100)]
ui: traffic-control edit: avoid CIDR literals in gettext

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control: include ipv6 in 'all' networks
Dominik Csapak [Mon, 22 Nov 2021 08:09:35 +0000 (09:09 +0100)]
ui: traffic-control: include ipv6 in 'all' networks

by including '::/0' too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control: fix sending network value
Dominik Csapak [Mon, 22 Nov 2021 08:09:34 +0000 (09:09 +0100)]
ui: traffic-control: fix sending network value

we forgot to correclty send the network value as we changed from
the radiogroup to a simple text field

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: indentation fix
Dominik Csapak [Mon, 22 Nov 2021 08:09:33 +0000 (09:09 +0100)]
ui: indentation fix

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: fix group-filter property name
Thomas Lamprecht [Mon, 22 Nov 2021 08:02:04 +0000 (09:02 +0100)]
ui: fix group-filter property name

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodocs: update traffic control docs (use HumanBytes)
Dietmar Maurer [Mon, 22 Nov 2021 08:05:01 +0000 (09:05 +0100)]
docs: update traffic control docs (use HumanBytes)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoproxmox-backup-manager traffic: render data human readable
Dietmar Maurer [Mon, 22 Nov 2021 08:06:07 +0000 (09:06 +0100)]
proxmox-backup-manager traffic: render data human readable

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agofix sync job regression test (add RateLimitConfig)
Dietmar Maurer [Mon, 22 Nov 2021 07:28:54 +0000 (08:28 +0100)]
fix sync job regression test (add RateLimitConfig)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoFingerprint: add new signature method
Dietmar Maurer [Mon, 22 Nov 2021 07:19:09 +0000 (08:19 +0100)]
Fingerprint: add new signature method

commit c42a54795df332cd778a53ea500b901ae873c81d introcuded a bug by
using fp.to_string(). Replace this with fp.signature() which correctly
returns the full fingerprint instead of the short version.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoset default for 'protected' flag
Dominik Csapak [Tue, 16 Nov 2021 09:21:05 +0000 (10:21 +0100)]
set default for 'protected' flag

otherwise we cannot properly parse the api return value from older
versions, since that field does not exist there.

fixes sync from older versions without the protected feature

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agouse RateLimitConfig for HttpClient and pull
Dietmar Maurer [Mon, 22 Nov 2021 05:26:55 +0000 (06:26 +0100)]
use RateLimitConfig for HttpClient and pull

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agosync-job: add rate limit
Dietmar Maurer [Sun, 21 Nov 2021 09:29:58 +0000 (10:29 +0100)]
sync-job: add rate limit

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agopbs-api-types: split out type RateLimitConfig
Dietmar Maurer [Sun, 21 Nov 2021 09:20:41 +0000 (10:20 +0100)]
pbs-api-types: split out type RateLimitConfig

2 years agobump version to 2.1.0-1
Thomas Lamprecht [Sat, 20 Nov 2021 21:45:50 +0000 (22:45 +0100)]
bump version to 2.1.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: bump versioned dependency for proxmox-widget-toolkit
Thomas Lamprecht [Sat, 20 Nov 2021 21:43:44 +0000 (22:43 +0100)]
d/control: bump versioned dependency for proxmox-widget-toolkit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix proxmox-backup-manager sync-job list
Dietmar Maurer [Sun, 21 Nov 2021 08:46:46 +0000 (09:46 +0100)]
fix proxmox-backup-manager sync-job list

Property is called 'group-filter' (not 'groups').

2 years agopbs-api-types: fix HumanByte::auto_scale
Dietmar Maurer [Sun, 21 Nov 2021 08:13:02 +0000 (09:13 +0100)]
pbs-api-types: fix HumanByte::auto_scale

2 years agoui: traffic-control edit: fix name minLength (3 not 4)
Thomas Lamprecht [Sat, 20 Nov 2021 21:33:32 +0000 (22:33 +0100)]
ui: traffic-control edit: fix name minLength (3 not 4)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control view: tune column width, add more flex
Thomas Lamprecht [Sat, 20 Nov 2021 21:32:02 +0000 (22:32 +0100)]
ui: traffic-control view: tune column width, add more flex

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control edit: make window taller for more common ratio
Thomas Lamprecht [Sat, 20 Nov 2021 21:09:39 +0000 (22:09 +0100)]
ui: traffic-control edit: make window taller for more common ratio

and add timeframe emptyText

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control edit: send rates as stringified, auto-scaled size-unit
Thomas Lamprecht [Sat, 20 Nov 2021 21:08:22 +0000 (22:08 +0100)]
ui: traffic-control edit: send rates as stringified, auto-scaled size-unit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control edit: make network edit a single text field
Thomas Lamprecht [Sat, 20 Nov 2021 21:04:57 +0000 (22:04 +0100)]
ui: traffic-control edit: make network edit a single text field

here's to note that the radio-group was my idea, Dominik just
executed it, nicely that is.

But, the panel looks a bit glitchy layout wise as with that and the
bandwidth fields (maybe we should render their unit inline) the
vertical alignments were all over the place.

So for now make it a simple text field and throw in a tooltip for
good measurement

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control edit: very simple duplicate timeframe detection
Thomas Lamprecht [Sat, 20 Nov 2021 21:03:58 +0000 (22:03 +0100)]
ui: traffic-control edit: very simple duplicate timeframe detection

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control edit: handle empty time-frame correctly
Thomas Lamprecht [Sat, 20 Nov 2021 20:56:12 +0000 (21:56 +0100)]
ui: traffic-control edit: handle empty time-frame correctly

delete on update and avoid sending an empty string in any case, the
backend does not likes that much.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control view: various code cleanups
Thomas Lamprecht [Sat, 20 Nov 2021 20:54:53 +0000 (21:54 +0100)]
ui: traffic-control view: various code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control view: time frames are optional so avoid render exception
Thomas Lamprecht [Sat, 20 Nov 2021 20:54:22 +0000 (21:54 +0100)]
ui: traffic-control view: time frames are optional so avoid render exception

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: traffic-control view: make rendere more flexible
Thomas Lamprecht [Sat, 20 Nov 2021 20:52:29 +0000 (21:52 +0100)]
ui: traffic-control view: make rendere more flexible

do not choke on non-numbers but use the (partially new) widget
toolkit helpers to also be able to parse string based sizes with
units and auto-scale them

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: navigation: change traffic-control icon to rotated signal
Thomas Lamprecht [Sat, 20 Nov 2021 20:43:03 +0000 (21:43 +0100)]
ui: navigation: change traffic-control icon to rotated signal

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: add Traffic Control UI
Dominik Csapak [Fri, 19 Nov 2021 14:42:27 +0000 (15:42 +0100)]
ui: add Traffic Control UI

adds a list of traffic control rules (with their current usage)
and let the user add/edit/remove them

the edit window currently has a grid for timeframes to add/remove
with input fields for start/endtime and checkboxes for the days

there are still some improvements possible, like having a seperate
grid for networks (the input field is maybe too small), or
optimizing consecutive days to a range (e.g. mon..wed instead of mon,tue,wed)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: traffic_control: add missing rename to 'kebab-case'
Dominik Csapak [Fri, 19 Nov 2021 14:42:26 +0000 (15:42 +0100)]
api: traffic_control: add missing rename to 'kebab-case'

otherwise the 'delete' properties need underscores
(e.g. 'burst_in' instead of 'burst-in')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agouse HumanByte for traffic-control config
Dietmar Maurer [Thu, 18 Nov 2021 07:29:22 +0000 (08:29 +0100)]
use HumanByte for traffic-control config

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agohuman byte: make proper proxmox API type
Thomas Lamprecht [Sat, 20 Nov 2021 17:21:53 +0000 (18:21 +0100)]
human byte: make proper proxmox API type

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agohuman byte: add from string parser
Thomas Lamprecht [Sat, 20 Nov 2021 17:21:33 +0000 (18:21 +0100)]
human byte: add from string parser

Adapted from Dietmar's v3 on pbs-devel but some changes:
- reworked with a strip_suffix fn that does matching, way shorter and
  even easier to read IMO
- make b/B byte symbol fully optional, not just for base-10
- also trim trailing whitespace for SizeUnit::Byte
- simplify the FromStr impl
- adapt parser unit tests such that we actually see the failed test's
  definition line, simplifies debugging a bit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agohuman byte: add proper unit type and support base-10
Thomas Lamprecht [Sat, 20 Nov 2021 16:32:16 +0000 (17:32 +0100)]
human byte: add proper unit type and support base-10

The new SizeUnit type takes over the auto scaling logic and could be
used on its own too.

Switch the internal type of HumanByte from u64 to f64, this results
in a slight reduce of usable sizes we can represent (there's no
unsigned float type after all) but we support pebibyte now with quite
the precision and ebibytes should be also work out ok, and that
really should us have covered for a while..

Partially adapted by Dietmar's version, but split up and change so:
* there's no None type, for a SizeUnit that does not makes much sense
* print the unit for byte too, better consistency and one can still
  use as_u64() or as_f64() if they do not want/need the unit rendered
* left the "From usize/u64" impls intact, just convenient to have and
  avoids all over the tree changes to adapt to loosing that
* move auto-scaling into SizeUnit, good fit there and I could see
  some re-use potential for non-human-byte users in the future
* impl Display for SizeUnit instead of the separate unit_str method,
  better usability as it can be used directly in format (with zero
  alloc/copy) and saw no real reason of not having that this way
* switch the place where we auto-scale in HumanByte's to the new_X
  helpers which allows for slightly reduced code usage and simplify
  implementation where possible
* use rounding for the precision limit algorithm. This is a stupid
  problem as in practices there are cases for requiring every variant:
  - flooring would be good for limits, better less than to much
  - ceiling would be good for file sizes, to less can mean ENOSPACE
    and user getting angry if their working value is messed with
  - rounding can be good for rendering benchmark, closer to reality
    and no real impact
  So going always for rounding is really not the best solution..

Some of those changes where naturally opinionated, if there's a good
practical reason we can switch back (or to something completely
different).

The single thing I kept and am not _that_ happy with is being able to
have fractional bytes (1.1 B or even 0.01 B), which just does not
makes much sense as most of those values cannot exist at all in
reality - I say most as multiple of 1/8 Byte can exists, those are
bits.o

Note, the precission also changed from fixed 2 to max 3 (trailing
zeros stripped), while that can be nice we should see if we get
a better precision limiting algorithm, e.g., directly in the printer.
Rust sadly does not supports "limit to precision of 3 but avoid
trailing zeros" so we'd need to adapt their Grisu based algorithm our
own - way to much complexity for this though..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomove HumanByte to pbs-abi-types crate
Thomas Lamprecht [Fri, 19 Nov 2021 12:48:38 +0000 (13:48 +0100)]
move HumanByte to pbs-abi-types crate

Originally-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodepend on proxmox-async 0.2
Dietmar Maurer [Sat, 20 Nov 2021 16:14:02 +0000 (17:14 +0100)]
depend on proxmox-async 0.2

2 years agoproxmox-rest-server: remove pbs-tools dependency
Dietmar Maurer [Fri, 19 Nov 2021 17:06:54 +0000 (18:06 +0100)]
proxmox-rest-server: remove pbs-tools dependency

2 years agouse new proxmox-async crate
Dietmar Maurer [Fri, 19 Nov 2021 16:36:06 +0000 (17:36 +0100)]
use new proxmox-async crate

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agotfa: handle incompatible challenge data
Fabian Grünbichler [Fri, 19 Nov 2021 13:10:57 +0000 (14:10 +0100)]
tfa: handle incompatible challenge data

by returning default data, in case the challenge data is not parseable.
this allows a new challenge to be started for the userid in question
without manual cleanup.

currently this can be triggered if an ongoing challenge created with
webauthn-rs 0.2.5 is stored in /run and attempted to be read
post-upgrade.

Reported-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agocleanup unused re-exports
Wolfgang Bumiller [Fri, 19 Nov 2021 11:49:46 +0000 (12:49 +0100)]
cleanup unused re-exports

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump d/control
Wolfgang Bumiller [Thu, 18 Nov 2021 13:19:08 +0000 (14:19 +0100)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agowebauthn: correctly set origin when updating
Fabian Grünbichler [Thu, 18 Nov 2021 13:13:06 +0000 (14:13 +0100)]
webauthn: correctly set origin when updating

with current proxmox-tfa this became a hard error, since origin and rp
are not both Strings anymore..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoupdate to base64 0.13
Fabian Grünbichler [Thu, 18 Nov 2021 13:12:59 +0000 (14:12 +0100)]
update to base64 0.13

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agofix debian/control: include librust-proxmox-sys
Dietmar Maurer [Fri, 19 Nov 2021 10:35:28 +0000 (11:35 +0100)]
fix debian/control: include librust-proxmox-sys

2 years agouse new proxmox-sys crate
Dietmar Maurer [Fri, 19 Nov 2021 09:51:41 +0000 (10:51 +0100)]
use new proxmox-sys crate

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agouse proxmox::tools::fd::fd_change_cloexec from proxmox 0.15.3
Dietmar Maurer [Thu, 18 Nov 2021 12:43:41 +0000 (13:43 +0100)]
use proxmox::tools::fd::fd_change_cloexec from proxmox 0.15.3

Depend on proxmox 0.15.3

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agotraffic-control api: return current traffic with config
Dietmar Maurer [Thu, 18 Nov 2021 11:23:50 +0000 (12:23 +0100)]
traffic-control api: return current traffic with config

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agobump d/control
Wolfgang Bumiller [Thu, 18 Nov 2021 10:25:04 +0000 (11:25 +0100)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoapi: acme: fix typo
Stoiko Ivanov [Tue, 9 Nov 2021 16:54:19 +0000 (16:54 +0000)]
api: acme: fix typo

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoconfig: acme: plugin: rustfmt
Stoiko Ivanov [Tue, 9 Nov 2021 16:54:18 +0000 (16:54 +0000)]
config: acme: plugin: rustfmt

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoapi: config: acme: rustfmt
Stoiko Ivanov [Tue, 9 Nov 2021 16:54:17 +0000 (16:54 +0000)]
api: config: acme: rustfmt

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agod/control: update openid build dependency verison
Thomas Lamprecht [Thu, 18 Nov 2021 10:23:50 +0000 (11:23 +0100)]
d/control: update openid build dependency verison

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoopenid: allow to configure scopes, prompt, ACRs and arbitrary username-claim values
Dietmar Maurer [Thu, 18 Nov 2021 10:19:44 +0000 (11:19 +0100)]
openid: allow to configure scopes, prompt, ACRs and arbitrary username-claim values

- no longer set prompt to 'login' (makes auto-login possible)
- new prompt configuration
- allow arbitrary username-claim values

Depend on proxmox-openid 0.9.0.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agodocs: remote sync: adapt to changed filter param and add some examples
Thomas Lamprecht [Thu, 18 Nov 2021 09:33:51 +0000 (10:33 +0100)]
docs: remote sync: adapt to changed filter param and add some examples

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agogroup filter: rename CLI/API/Config "groups" option to "group-filter"
Thomas Lamprecht [Thu, 18 Nov 2021 08:50:47 +0000 (09:50 +0100)]
group filter: rename CLI/API/Config "groups" option to "group-filter"

we even use that for basically all the related schema names, "groups"
allone is just rather not so telling, i.e., "groups" what?

While due to the additive nature of `group-filter` is not the best
possible name for passing multiple arguments on the CLI (the web-ui
can present this more UX-friendly anyway) due to possible confusion
about if the filter act like AND vs OR it can be documented and even
if a user is confused they still are safe on more being synced than
less. Also, the original param name wasn't really _that_ better in
that regards

Dietmar also suggested to use singular for the CLI option, while
there can be more they're passed over repeating the option, each with
a single filter.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-tape: add groups filter to backup command
Dominik Csapak [Thu, 4 Nov 2021 09:56:22 +0000 (10:56 +0100)]
proxmox-tape: add groups filter to backup command

and add a completion handler to complete the backup groups

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: tape: show configred group filters
Dominik Csapak [Thu, 4 Nov 2021 09:56:21 +0000 (10:56 +0100)]
ui: tape: show configred group filters

in the grid and in the edit window

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3533: tape backup: filter groups according to config
Dominik Csapak [Thu, 4 Nov 2021 09:56:20 +0000 (10:56 +0100)]
fix #3533: tape backup: filter groups according to config

this fixes bug #3533, since now a user can backup a single datastore
on multiple tape media pools in parallel, e.g. vms on one pool, ct on
another.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotape backup jobs: add group filters to config/api
Dominik Csapak [Thu, 4 Nov 2021 09:56:19 +0000 (10:56 +0100)]
tape backup jobs: add group filters to config/api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-tape: add missing 'notify-user' option to backup command
Dominik Csapak [Thu, 4 Nov 2021 09:56:18 +0000 (10:56 +0100)]
proxmox-tape: add missing 'notify-user' option to backup command

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #sync.cfg/pull: don't remove by default
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:58 +0000 (15:00 +0200)]
fix #sync.cfg/pull: don't remove by default

and convert existing (manually created/edited) jobs to the previous
default value of 'true'. the GUI has always set this value and defaults
to 'false'.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodocs: mention group filter in sync docs
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:57 +0000 (15:00 +0200)]
docs: mention group filter in sync docs

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomanager: render group filter properly
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:56 +0000 (15:00 +0200)]
manager: render group filter properly

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoremote: add backup group scanning
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:55 +0000 (15:00 +0200)]
remote: add backup group scanning

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agosync: add group filtering
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:54 +0000 (15:00 +0200)]
sync: add group filtering

like for manual pulls, but persisted in the sync job config and visible
in the relevant GUI parts.

GUI is read-only for now (and defaults to no filtering on creation), as
this is a rather advanced feature that requires a complex GUI to be
user-friendly (regex-freeform, type-combobox, remote group scanning +
selector with additional freeform input).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopull: allow pulling groups selectively
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:53 +0000 (15:00 +0200)]
pull: allow pulling groups selectively

without requiring workarounds based on ownership and limited
visibility/access.

if a group filter is set, remove_vanished will only consider filtered
groups for removal to prevent concurrent disjunct filters from trashing
eachother's synced groups.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopull/sync: extract passed along vars into struct
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:52 +0000 (15:00 +0200)]
pull/sync: extract passed along vars into struct

this is basically the sync job config without ID and some stuff
converted already, and a convenient helper to generate the http client
from it.

Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopull: use BackupGroup consistently
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:51 +0000 (15:00 +0200)]
pull: use BackupGroup consistently

instead of `GroupListItem`s. we convert it anyway, so might as well do
that at the start.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoBackupGroup: add filter helper
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:50 +0000 (15:00 +0200)]
BackupGroup: add filter helper

to have a single implementation of "group is matched by group filter".

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: add GroupFilter(List) type
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:49 +0000 (15:00 +0200)]
api: add GroupFilter(List) type

at the API level, this is a simple (wrapped) Vec of Strings with a
verifier function. all users should use the provided helper to get the
actual GroupFilter enum values, which can't be directly used in the API
schema because of restrictions of the api macro.

validation of the schema + parsing into the proper type uses the same fn
intentionally to avoid running out of sync, even if it means compiling
the REs twice.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi-types: add schema for backup group
Fabian Grünbichler [Thu, 28 Oct 2021 13:00:48 +0000 (15:00 +0200)]
api-types: add schema for backup group

the regex was already there, and we need a simple type/schema for
passing in multiple groups as Vec/Array via the API.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-systemd: remove crate, use new proxmox-time 1.1.0 instead
Dietmar Maurer [Wed, 17 Nov 2021 11:29:31 +0000 (12:29 +0100)]
proxmox-systemd: remove crate, use new proxmox-time 1.1.0 instead

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoremove now unused serde_filter module
Wolfgang Bumiller [Wed, 17 Nov 2021 08:50:08 +0000 (09:50 +0100)]
remove now unused serde_filter module

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agowww: use TFA widgets from widget toolkit
Wolfgang Bumiller [Wed, 17 Nov 2021 08:27:21 +0000 (09:27 +0100)]
www: use TFA widgets from widget toolkit

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump d/control rust dependencies
Wolfgang Bumiller [Wed, 17 Nov 2021 08:44:30 +0000 (09:44 +0100)]
bump d/control rust dependencies

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-widget-toolkit dependency to 3.4-1
Wolfgang Bumiller [Wed, 17 Nov 2021 08:41:44 +0000 (09:41 +0100)]
bump proxmox-widget-toolkit dependency to 3.4-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoswitch tfa api to use proxmox-tfa::api
Wolfgang Bumiller [Tue, 16 Nov 2021 14:03:26 +0000 (15:03 +0100)]
switch tfa api to use proxmox-tfa::api

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove fingerprint helpers from pbs-tools to pbs-api-types
Dietmar Maurer [Wed, 17 Nov 2021 06:07:40 +0000 (07:07 +0100)]
move fingerprint helpers from pbs-tools to pbs-api-types

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agodocs: add traffic control section
Dietmar Maurer [Mon, 15 Nov 2021 12:42:13 +0000 (13:42 +0100)]
docs: add traffic control section

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agodepend on proxmox-shared-memory 0.1.1
Dietmar Maurer [Mon, 15 Nov 2021 10:35:52 +0000 (11:35 +0100)]
depend on proxmox-shared-memory 0.1.1

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoadd missing file from previous commit
Dietmar Maurer [Sun, 14 Nov 2021 17:49:29 +0000 (18:49 +0100)]
add missing file from previous commit

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agotraffic-controls: add API/CLI to show current traffic
Dietmar Maurer [Sun, 14 Nov 2021 16:20:55 +0000 (17:20 +0100)]
traffic-controls: add API/CLI to show current traffic

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoupdate to proxmox-http 0.5.4
Dietmar Maurer [Sun, 14 Nov 2021 07:27:45 +0000 (08:27 +0100)]
update to proxmox-http 0.5.4

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agocached_traffic_control: fix regression tests
Dietmar Maurer [Sun, 14 Nov 2021 07:05:40 +0000 (08:05 +0100)]
cached_traffic_control: fix regression tests

Avoid using shared memory in tests because of permission problems.

2 years agoimplement rate limiter in shared memory
Dietmar Maurer [Sat, 13 Nov 2021 16:19:07 +0000 (17:19 +0100)]
implement rate limiter in shared memory

This kind of rate limiter can be used among several processes (as long
as all set the same rate/burst).

2 years agocached_traffic_control: use ShareableRateLimit trait object
Dietmar Maurer [Sat, 13 Nov 2021 14:43:56 +0000 (15:43 +0100)]
cached_traffic_control: use ShareableRateLimit trait object

2 years agopbs-config: use new SharedMemory helpers from proxmox-shared-memory crate
Dietmar Maurer [Fri, 12 Nov 2021 17:44:28 +0000 (18:44 +0100)]
pbs-config: use new SharedMemory helpers from proxmox-shared-memory crate

depend on proxmox-shared-memory crate.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agorest: make successful-ticket auth log a debug one to avoid syslog
Thomas Lamprecht [Wed, 10 Nov 2021 16:05:09 +0000 (17:05 +0100)]
rest: make successful-ticket auth log a debug one to avoid syslog

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 2.0.14-1
Dietmar Maurer [Fri, 12 Nov 2021 07:05:18 +0000 (08:05 +0100)]
bump version to 2.0.14-1

2 years agocreate /var/lib/proxmox-bnackup at server startup
Dietmar Maurer [Fri, 12 Nov 2021 07:08:23 +0000 (08:08 +0100)]
create /var/lib/proxmox-bnackup at server startup

This was missing in previous patch...

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agofix directory permission problems
Dietmar Maurer [Fri, 12 Nov 2021 06:29:18 +0000 (07:29 +0100)]
fix directory permission problems

By carefully setting options on all create_path() calls,
and by creating "/var/lib/proxmox-backup" at api server startup.

2 years agodebian/control: depend on librust-cidr-dev
Dietmar Maurer [Wed, 10 Nov 2021 11:23:16 +0000 (12:23 +0100)]
debian/control: depend on librust-cidr-dev

2 years agoproxmox-backup-proxy: implement traffic control
Dietmar Maurer [Mon, 8 Nov 2021 11:42:38 +0000 (12:42 +0100)]
proxmox-backup-proxy: implement traffic control

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoimplement a traffic control cache for fast rate control limiter lockups
Dietmar Maurer [Mon, 8 Nov 2021 11:40:09 +0000 (12:40 +0100)]
implement a traffic control cache for fast rate control limiter lockups

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agotraffic_control: use Memcom to track. config versions
Dietmar Maurer [Mon, 8 Nov 2021 11:37:15 +0000 (12:37 +0100)]
traffic_control: use Memcom to track. config versions

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoAdd traffic control configuration config with API
Dietmar Maurer [Sat, 6 Nov 2021 17:46:58 +0000 (18:46 +0100)]
Add traffic control configuration config with API

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoDailyDuration: implement time_match()
Dietmar Maurer [Sat, 6 Nov 2021 13:04:42 +0000 (14:04 +0100)]
DailyDuration: implement time_match()