]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
3 years agotape/drive: improve tape device locking behaviour
Dominik Csapak [Wed, 2 Jun 2021 12:19:19 +0000 (14:19 +0200)]
tape/drive: improve tape device locking behaviour

by implementing a custom error type that is either 'TimeOut' or
'Other'.

In the api, check in the worker loop for exactly 'TimeOut' errors and continue only
then. All other errors lead to a aborted task.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoserver/prune_job: fix locking during prune jobs
Dominik Csapak [Wed, 2 Jun 2021 13:54:25 +0000 (15:54 +0200)]
server/prune_job: fix locking during prune jobs

removing the backup dir must acquire the snapshot lock, else it can
happen that we remove a snapshot while it is being restored
or backed up to tape

the original commit that adds the force flag
(c9756b40d1b33c573216f7c8eba209200c1d9bd5)
mentions that the prune checks itself if the snapshot is in use,
but i could not find such code, so simply set force to false

to avoid failing and aborting the prune job, warn if it could not
and continue

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: dashboard/TaskSummary: add type 'close' to the close tool
Dominik Csapak [Tue, 1 Jun 2021 13:35:06 +0000 (15:35 +0200)]
ui: dashboard/TaskSummary: add type 'close' to the close tool

otherwise the button is not visible

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: datastore/DataStoreListSummary: catch and show errors per datastore
Dominik Csapak [Tue, 1 Jun 2021 13:35:05 +0000 (15:35 +0200)]
ui: datastore/DataStoreListSummary: catch and show errors per datastore

so that the update does not get canceled because of a bad datastore
hide the irrelevant fields in that case

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoRevert "file-restore-daemon: work around tokio DuplexStream bug"
Fabian Grünbichler [Tue, 1 Jun 2021 07:30:13 +0000 (09:30 +0200)]
Revert "file-restore-daemon: work around tokio DuplexStream bug"

This reverts commit 75f9f40922f9c5380336b987519d9d46d5b6db03, which is
no longer needed now that we use tokio >= 1.6 which contains the proper
fix.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobump tokio dependency to 1.6
Fabian Grünbichler [Tue, 1 Jun 2021 07:30:12 +0000 (09:30 +0200)]
bump tokio dependency to 1.6

it contains a bug fix that allows dropping the workaround in

75f9f40922f9c5380336b987519d9d46d5b6db03 file-restore-daemon: work around tokio DuplexStream bug

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobump version to 1.1.9-1
Dietmar Maurer [Tue, 1 Jun 2021 06:27:18 +0000 (08:27 +0200)]
bump version to 1.1.9-1

3 years agoreorder serde usage/derive
Fabian Grünbichler [Mon, 31 May 2021 12:53:08 +0000 (14:53 +0200)]
reorder serde usage/derive

this is deprecated with rustc 1.52+, and will become a hard error at
some point:

https://github.com/rust-lang/rust/issues/79202

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agofix typo: s/dies/does/
Dietmar Maurer [Mon, 31 May 2021 09:01:15 +0000 (11:01 +0200)]
fix typo: s/dies/does/

3 years agolto/sg_tape/encryption: remove non lto-4 supported byte
Dominik Csapak [Mon, 31 May 2021 08:29:31 +0000 (10:29 +0200)]
lto/sg_tape/encryption: remove non lto-4 supported byte

from the SspDataEncryptionCapabilityPage

it seems we do not need it, since the EXTDECC flag is only used for
determining if the drive is capable to be configured via
ADI (Automation/Drive Interface) which we do not use at all.

this makes the call work with LTO-4 again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape: s/Restore Wizard/Restore/
Thomas Lamprecht [Thu, 27 May 2021 09:26:42 +0000 (11:26 +0200)]
ui: tape: s/Restore Wizard/Restore/

Mostly to avoid an extra translation text for basically no gain.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: MainView: use new beforeChangePath signature
Dominik Csapak [Wed, 26 May 2021 09:12:04 +0000 (11:12 +0200)]
ui: MainView: use new beforeChangePath signature

subpath can be optional in extjs 7.0, so handle that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: css: fix text-align pmx-button-badge
Dominik Csapak [Wed, 26 May 2021 09:12:03 +0000 (11:12 +0200)]
ui: css: fix text-align pmx-button-badge

this was previously set on the button class, but has since been removed
add it here to have the badge number centered again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: MainView: navigation: use different ui class
Dominik Csapak [Wed, 26 May 2021 09:12:02 +0000 (11:12 +0200)]
ui: MainView: navigation: use different ui class

by default the treelist gets the 'nav' ui, which in newer extjs
versions has a custom styling (unlike before)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: datastore/Summary: change destroy listener
Dominik Csapak [Wed, 26 May 2021 09:12:01 +0000 (11:12 +0200)]
ui: datastore/Summary: change destroy listener

by using beforedestroy instead of destroy (like we do everywhere else)
to avoid race condition when the controller has
already removed some handlers on destruction

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: panel/UsageChart: change downloadServerUrl
Dominik Csapak [Wed, 26 May 2021 09:12:00 +0000 (11:12 +0200)]
ui: panel/UsageChart: change downloadServerUrl

to not have the sencha url by default

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: form/CalendarEvent: do not set displayField
Dominik Csapak [Wed, 26 May 2021 09:11:59 +0000 (11:11 +0200)]
ui: form/CalendarEvent: do not set displayField

we use displayTpl here, setting displayField will override the template

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: MainView: do not use unnecessary panels
Dominik Csapak [Wed, 26 May 2021 09:11:58 +0000 (11:11 +0200)]
ui: MainView: do not use unnecessary panels

using container here is fine, we do not need panel behaviour which
is more bloated. Removes two ARIA warnings.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape restore wizard: set emptyText to media set selector
Thomas Lamprecht [Wed, 26 May 2021 17:10:16 +0000 (19:10 +0200)]
ui: tape restore wizard: set emptyText to media set selector

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape restore wizard: always show snapshot grid
Thomas Lamprecht [Wed, 26 May 2021 17:09:06 +0000 (19:09 +0200)]
ui: tape restore wizard: always show snapshot grid

looks (almost confusingly) empty else and no real disadvantage in
showing the disabled one until a media-set is selected and loaded

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape overview: rename to "Restore Wizard" and use icons
Thomas Lamprecht [Wed, 26 May 2021 17:05:27 +0000 (19:05 +0200)]
ui: tape overview: rename to "Restore Wizard" and use icons

To create a correlation with the restore action column

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape overview: use correct icon for Media-Pools
Thomas Lamprecht [Wed, 26 May 2021 17:04:07 +0000 (19:04 +0200)]
ui: tape overview: use correct icon for Media-Pools

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape overview: include more context in restore tooltips
Thomas Lamprecht [Wed, 26 May 2021 17:02:58 +0000 (19:02 +0200)]
ui: tape overview: include more context in restore tooltips

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape restore: small code cleanup
Thomas Lamprecht [Wed, 26 May 2021 17:00:12 +0000 (19:00 +0200)]
ui: tape restore: small code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape/TapeRestore: fix some properties
Dominik Csapak [Wed, 26 May 2021 13:48:11 +0000 (15:48 +0200)]
ui: tape/TapeRestore: fix some properties

remove leftover from when it was an Proxmox.window.Edit, and
add the missing 'modal'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/TapeRestore: allow preselecting a datastore
Dominik Csapak [Wed, 26 May 2021 13:48:10 +0000 (15:48 +0200)]
ui: tape/TapeRestore: allow preselecting a datastore

for that we need to split the prefilter additions, else
we always filter the snaphots too and giving 'undefined' filters
all snapshots...

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/TapeRestore: don't send snapshotlist when restoring whole datastores
Dominik Csapak [Wed, 26 May 2021 13:48:09 +0000 (15:48 +0200)]
ui: tape/TapeRestore: don't send snapshotlist when restoring whole datastores

for the case that the user selects only whole datastores, we do not
want to send and (exhaustive) list of snapshots that get restored,
but we only want to honor the mapping the user gives

this avoids using the backup restore codepath that iterates twice
over the tapes and would generally be slower for a lot of snapshots

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/BackupOverview: add generic 'Restore' button
Dominik Csapak [Wed, 26 May 2021 13:48:08 +0000 (15:48 +0200)]
ui: tape/BackupOverview: add generic 'Restore' button

this will open the restore window without anything preselected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/TapeRestore: add MediaSetSelector
Dominik Csapak [Wed, 26 May 2021 13:48:07 +0000 (15:48 +0200)]
ui: tape/TapeRestore: add MediaSetSelector

when no uuid/mediaset is given.
we change a bit how we use the uuid by moving it into the viewmodel
(instead of a simple property on the view) so that we can always
use the selected one

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape: add MediaSetSelector
Dominik Csapak [Wed, 26 May 2021 13:48:06 +0000 (15:48 +0200)]
ui: tape: add MediaSetSelector

so that we can let the user select a media-set

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/BackupOverview: rename action column to restore
Dominik Csapak [Wed, 26 May 2021 13:48:05 +0000 (15:48 +0200)]
ui: tape/BackupOverview: rename action column to restore

to make it clear that this button is for restore and for
now we do not have any plans to add buttons here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/tape: add api call to list media sets
Dominik Csapak [Wed, 26 May 2021 13:48:04 +0000 (15:48 +0200)]
api2/tape: add api call to list media sets

we want a 'media-set' selector in the gui, this makes it
very easy to do and is not as costly as reusing the media list,
since we do not need to iterate over all media (e.g. unassigned)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/BackupOverview: expand pools by default
Dominik Csapak [Wed, 26 May 2021 13:48:03 +0000 (15:48 +0200)]
ui: tape/BackupOverview: expand pools by default

normally, users will not have many tape media pools,
and are more interested in the actual media-sets, so
expand those nodes by default

if the list gets very long, the user can collapse some pools anyway

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi: node/journal: fix parameter extraction of /nodes/node/journal
Dominik Csapak [Tue, 25 May 2021 11:19:47 +0000 (13:19 +0200)]
api: node/journal: fix parameter extraction of /nodes/node/journal

by extracting them via the api macro into the function signature

this fixes an issue, where giving 'since' and 'until' where not
used since we tried to extract them as 'str' while they were numbers.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofile-restore-daemon: limit concurrent download calls
Stefan Reiter [Thu, 6 May 2021 15:26:22 +0000 (17:26 +0200)]
file-restore-daemon: limit concurrent download calls

While the issue with vsock packets starving kernel memory is mostly
worked around by the '64k -> 4k buffer' patch in
'proxmox-backup-restore-image', let's be safe and also limit the number
of concurrent transfers. 8 downloads per VM seems like a fair value.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore-daemon: watchdog: add inhibit for long downloads
Stefan Reiter [Thu, 6 May 2021 15:26:21 +0000 (17:26 +0200)]
file-restore-daemon: watchdog: add inhibit for long downloads

The extract API call may be active for more than the watchdog timeout,
so a simple ping is not enough.

This adds an "inhibit" API, which will stop the watchdog from completing
as long as at least one WatchdogInhibitor instance is alive. Keep one in
the download task, so it will be dropped once it completes (or errors).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore-daemon: work around tokio DuplexStream bug
Stefan Reiter [Thu, 6 May 2021 15:26:20 +0000 (17:26 +0200)]
file-restore-daemon: work around tokio DuplexStream bug

See this PR for more info: https://github.com/tokio-rs/tokio/pull/3756

As a workaround use a pair of connected unix sockets - this obviously
incurs some overhead, albeit not measureable on my machine. Once tokio
includes the fix we can go back to a DuplexStream for performance and
simplicity.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoapt: fix removal of non-existant http-proxy config
Thomas Lamprecht [Tue, 25 May 2021 09:54:46 +0000 (11:54 +0200)]
apt: fix removal of non-existant http-proxy config

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotasks: fix typos in API description
Oguz Bektas [Thu, 20 May 2021 13:03:23 +0000 (15:03 +0200)]
tasks: fix typos in API description

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
3 years agofile-restore-daemon: disk: add RawFs bucket type
Stefan Reiter [Mon, 17 May 2021 12:31:37 +0000 (14:31 +0200)]
file-restore-daemon: disk: add RawFs bucket type

Used to specify a filesystem placed directly on a disk, without a
partition table inbetween. Detected by simply attempting to mount the
disk itself.

A helper "make_dev_node" is extracted to avoid code duplication.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore-daemon: disk: allow arbitrary component count per bucket
Stefan Reiter [Mon, 17 May 2021 12:31:36 +0000 (14:31 +0200)]
file-restore-daemon: disk: allow arbitrary component count per bucket

A bucket might contain multiple (or 0) layers of components in its path
specification, so allow a mapping between bucket type strings and
expected component depth. For partitions, this is 1, as there is only
the partition number layer below the "part" node.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofile-restore-daemon: disk: ignore "invalid fs" error
Stefan Reiter [Mon, 17 May 2021 12:31:35 +0000 (14:31 +0200)]
file-restore-daemon: disk: ignore "invalid fs" error

Mainly just causes log spam, we print a more useful error in the end if
all mounts fail anyway.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 1.1.8-1
Thomas Lamprecht [Fri, 21 May 2021 16:21:32 +0000 (18:21 +0200)]
bump version to 1.1.8-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agocargo: bump proxmox-http version to 0.2.1
Thomas Lamprecht [Fri, 21 May 2021 16:25:26 +0000 (18:25 +0200)]
cargo: bump proxmox-http version to 0.2.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: config: move node ops (http-proxy) into existing "Authentication"
Thomas Lamprecht [Fri, 21 May 2021 16:19:51 +0000 (18:19 +0200)]
ui: config: move node ops (http-proxy) into existing "Authentication"

Mainly as Config -> Option is a weird name, Authentication has only
one obj. grid, the node options are only the http-proxy for now and
that is a sort of authentication, so good enough for me for now, but
should be rethought for 2.0 and/or once more node opts are added

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: bump versioned dependency for proxmox-widget-toolkit
Thomas Lamprecht [Fri, 21 May 2021 16:22:49 +0000 (18:22 +0200)]
d/control: bump versioned dependency for proxmox-widget-toolkit

for the new gridRows feature the ObjectGrid gained.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: rework node-config to static
Thomas Lamprecht [Fri, 21 May 2021 16:18:20 +0000 (18:18 +0200)]
ui: rework node-config to static

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: add node options under 'Configuration -> Options'
Dominik Csapak [Wed, 12 May 2021 14:42:32 +0000 (16:42 +0200)]
ui: add node options under 'Configuration -> Options'

for now only http-proxy lives there, but we will add more options later,
such as
* email from
* default gui language

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agodocs: add short initial http-proxy docs
Thomas Lamprecht [Fri, 21 May 2021 16:17:17 +0000 (18:17 +0200)]
docs: add short initial http-proxy docs

better than nothing and something to point to in the UI

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: webauthn view: code cleanup
Thomas Lamprecht [Fri, 21 May 2021 16:19:11 +0000 (18:19 +0200)]
ui: webauthn view: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: hyphenate "Media-Set" to make it clearer that its one noun
Thomas Lamprecht [Fri, 21 May 2021 13:53:50 +0000 (15:53 +0200)]
ui: hyphenate "Media-Set" to make it clearer that its one noun

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape content: set icon-class for reload button
Thomas Lamprecht [Fri, 21 May 2021 13:51:54 +0000 (15:51 +0200)]
ui: tape content: set icon-class for reload button

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape restore: drop (now) unused references
Thomas Lamprecht [Fri, 21 May 2021 13:45:15 +0000 (15:45 +0200)]
ui: tape restore: drop (now) unused references

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape restore: avoid component/value lookup, use parameters
Thomas Lamprecht [Fri, 21 May 2021 13:44:16 +0000 (15:44 +0200)]
ui: tape restore: avoid component/value lookup, use parameters

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotape: restore: cope with not fully instantiated components
Thomas Lamprecht [Fri, 21 May 2021 13:24:52 +0000 (15:24 +0200)]
tape: restore: cope with not fully instantiated components

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape: small code/style cleanups
Thomas Lamprecht [Fri, 21 May 2021 13:18:54 +0000 (15:18 +0200)]
ui: tape: small code/style cleanups

It was not actually bad, so they're quite opinionated to be honest,
but at least xtypes props must go first and variable declaration
should try to be as near as possible to the actual use as long as
code stays sensible readable/short.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape restore: update datastore map emptyText depending on default
Thomas Lamprecht [Fri, 21 May 2021 12:31:05 +0000 (14:31 +0200)]
ui: tape restore: update datastore map emptyText depending on default

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: webauthn: drop bogus destroy stopStore call
Thomas Lamprecht [Fri, 21 May 2021 12:29:09 +0000 (14:29 +0200)]
ui: webauthn: drop bogus destroy stopStore call

will only result in an exception (in debug mode at least)...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape/BackupOverview: do not reload on restore
Dominik Csapak [Fri, 21 May 2021 10:20:22 +0000 (12:20 +0200)]
ui: tape/BackupOverview: do not reload on restore

a restore does not change the tape content, so a reload has no benefit here.
since we're touching those lines, change to 'autoShow' property

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/BackupOverview: also allow to filter by group for restore
Dominik Csapak [Fri, 21 May 2021 10:20:21 +0000 (12:20 +0200)]
ui: tape/BackupOverview: also allow to filter by group for restore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/window/TapeRestore: enabling selecting multiple snapshots
Dominik Csapak [Fri, 21 May 2021 10:20:20 +0000 (12:20 +0200)]
ui: tape/window/TapeRestore: enabling selecting multiple snapshots

by including the new snapshotselector. If a whole media-set is to be
restored, select all snapshots

to achieve this, we drop the 'restoreid' and 'datastores' properties
for the restore window, and replace them by a 'prefilter' object
(with 'store' and 'snapshot' properties)

to be able to show the snapshots, we now have to always load the
content of that media-set, so drop the short-circuit if we have
the datastores already.

change the layout of the restore window into a two-step window
so that the first tab is the selection what to restore, and on the
second tab the user chooses where to restore (drive, datastore, etc.)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/TapeRestore: improve SnapshotGrid
Dominik Csapak [Fri, 21 May 2021 10:20:19 +0000 (12:20 +0200)]
ui: tape/TapeRestore: improve SnapshotGrid

* handle not rendered call of getErrors
* return 'all' as value if all snaphots where selected
  (for better distinction)
* remove the default height
* add checkChange on stores filterChange
  (now change also fires on the gridfilter plugin change)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/TapeRestore: fix small DataStoreMappingGrid bugs
Dominik Csapak [Fri, 21 May 2021 10:20:18 +0000 (12:20 +0200)]
ui: tape/TapeRestore: fix small DataStoreMappingGrid bugs

enable scrolling by default, and handle the case that getErrors gets
called when the component is not yet rendered

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: dashboards statistics: visualize datastores where quering the usage failed
Thomas Lamprecht [Fri, 21 May 2021 11:21:46 +0000 (13:21 +0200)]
ui: dashboards statistics: visualize datastores where quering the usage failed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: status: graceful-degrade when a datastore lookup fails
Thomas Lamprecht [Fri, 21 May 2021 10:40:10 +0000 (12:40 +0200)]
api: status: graceful-degrade when a datastore lookup fails

This can happen if the underlying storage failed, in which case we do
not want to fail the whole API call, as it should report the status
of all datastores. So rather add the error inline to the related
store entry and continue.

Allows to nicely visualize those stores in the gui.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodashboard statistics: prepare a more graceful error handling in datastore-usage
Thomas Lamprecht [Fri, 21 May 2021 10:20:39 +0000 (12:20 +0200)]
dashboard statistics: prepare a more graceful error handling in datastore-usage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: datastore status: refactor reused rrd get-data code into closure
Thomas Lamprecht [Fri, 21 May 2021 11:19:02 +0000 (13:19 +0200)]
api: datastore status: refactor reused rrd get-data code into closure

Nicer and shorter than just using a variable for the common parameters

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: datastore status: code cleanup, reduce indentation level
Thomas Lamprecht [Fri, 21 May 2021 08:29:14 +0000 (10:29 +0200)]
api: datastore status: code cleanup, reduce indentation level

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tape/window/TapeRestore: add SnapshotGrid Component
Dominik Csapak [Fri, 14 May 2021 12:59:21 +0000 (14:59 +0200)]
ui: tape/window/TapeRestore: add SnapshotGrid Component

this will be used for letting the user select multiple, individual
snapshots on restore (instead of having a single or the whole media-set)

if a 'prefilter' object is given, we filter the grid by those
values using the gridfilter plugins (like in pve's bulk action windows)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/BackupOverview: move restore buttons inline
Dominik Csapak [Fri, 14 May 2021 12:59:20 +0000 (14:59 +0200)]
ui: tape/BackupOverview: move restore buttons inline

instead of having them in the toolbar. This makes the UI more consistent
with the datastore content view.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape/BackupOverview: fix wrong media-set text for singlerestore
Dominik Csapak [Fri, 14 May 2021 12:59:19 +0000 (14:59 +0200)]
ui: tape/BackupOverview: fix wrong media-set text for singlerestore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobuildsys: split long debcargo invocation into multiple lines
Thomas Lamprecht [Tue, 18 May 2021 05:49:01 +0000 (07:49 +0200)]
buildsys: split long debcargo invocation into multiple lines

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump d/control
Wolfgang Bumiller [Mon, 17 May 2021 09:46:27 +0000 (11:46 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoupdate proxmox-http dependency
Wolfgang Bumiller [Mon, 17 May 2021 09:29:24 +0000 (11:29 +0200)]
update proxmox-http dependency

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agod/control: update after http refactoring
Fabian Grünbichler [Mon, 17 May 2021 09:02:56 +0000 (11:02 +0200)]
d/control: update after http refactoring

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoui: datastore/Content: change group remove to SafeDestroy Window
Dominik Csapak [Mon, 17 May 2021 07:03:15 +0000 (09:03 +0200)]
ui: datastore/Content: change group remove to SafeDestroy Window

so that a user does not accidentally remove a whole group instead
of a snapshot

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: datastore/Content: fix wrong tooltip for forgetting
Dominik Csapak [Mon, 17 May 2021 07:03:14 +0000 (09:03 +0200)]
ui: datastore/Content: fix wrong tooltip for forgetting

sometimes it's a group, not a snapshot

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agomove SimpleHttp to proxmox_http
Fabian Grünbichler [Fri, 14 May 2021 13:44:57 +0000 (15:44 +0200)]
move SimpleHttp to proxmox_http

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoSimpleHttp: factor out product-specific bits
Fabian Grünbichler [Fri, 14 May 2021 13:44:56 +0000 (15:44 +0200)]
SimpleHttp: factor out product-specific bits

in preparation of moving the abstraction to proxmox_http

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomove tools::http to proxmox_http
Fabian Grünbichler [Fri, 14 May 2021 13:44:55 +0000 (15:44 +0200)]
move tools::http to proxmox_http

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomove ProxyConfig to proxmox_http
Fabian Grünbichler [Fri, 14 May 2021 13:44:54 +0000 (15:44 +0200)]
move ProxyConfig to proxmox_http

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoHttpsConnector: make keepalive configurable
Fabian Grünbichler [Fri, 14 May 2021 13:44:53 +0000 (15:44 +0200)]
HttpsConnector: make keepalive configurable

it's the only PBS-specific part in there, so let's make it
product-agnostic before moving it off to proxmox-http.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomove MaybeTlsStream wrapper to proxmox_http
Fabian Grünbichler [Fri, 14 May 2021 13:44:52 +0000 (15:44 +0200)]
move MaybeTlsStream wrapper to proxmox_http

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agorefactor: move socket helper to proxmox crate
Fabian Grünbichler [Fri, 14 May 2021 13:44:51 +0000 (15:44 +0200)]
refactor: move socket helper to proxmox crate

and constant to tools module.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomove websocket to new 'proxmox_http' crate
Fabian Grünbichler [Fri, 14 May 2021 13:44:50 +0000 (15:44 +0200)]
move websocket to new 'proxmox_http' crate

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoui: datastore/Content: add forget button for groups
Dominik Csapak [Fri, 14 May 2021 14:36:03 +0000 (16:36 +0200)]
ui: datastore/Content: add forget button for groups

since we can remove whole groups via api now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/admin/datastore: add delete for groups
Dominik Csapak [Fri, 14 May 2021 14:36:02 +0000 (16:36 +0200)]
api2/admin/datastore: add delete for groups

so that a user can delete a whole group at once, until now, the fastest
way for this was to prune to one snapshot, and delete that

code is basically a copy/paste from the snapshot delete, sans
the 'backup-time' parameter

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agod/control: update proxmox tools dependency
Thomas Lamprecht [Fri, 14 May 2021 11:19:05 +0000 (13:19 +0200)]
d/control: update proxmox tools dependency

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotape/test: repair tests after changing 'start_write_session'
Dominik Csapak [Fri, 14 May 2021 07:28:50 +0000 (09:28 +0200)]
tape/test: repair tests after changing 'start_write_session'

i added a parameter and forgot to adapt the tests

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape: add 'Force new Media Set' checkbox to manual backup
Dominik Csapak [Mon, 10 May 2021 14:45:54 +0000 (16:45 +0200)]
ui: tape: add 'Force new Media Set' checkbox to manual backup

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi2/tape/backup: add 'force-media-set' parameter to manual backup
Dominik Csapak [Mon, 10 May 2021 14:45:53 +0000 (16:45 +0200)]
api2/tape/backup: add 'force-media-set' parameter to manual backup

so that a user can force a new media set, e.g. if he uses the
allocation policy 'continue', but wants to manually start a new
media-set.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape: ChangerStatus fixup for empty barcode
Dominik Csapak [Fri, 30 Apr 2021 09:46:42 +0000 (11:46 +0200)]
ui: tape: ChangerStatus fixup for empty barcode

empty barcode means that label-text is '', not undefined
we forgot this line

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: tape: TapeRestoreWindow: fix button text
Dominik Csapak [Wed, 12 May 2021 12:08:12 +0000 (14:08 +0200)]
ui: tape: TapeRestoreWindow: fix button text

s/Create/Restore/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoacme: improve errors when account loading fails
Wolfgang Bumiller [Wed, 12 May 2021 10:06:18 +0000 (12:06 +0200)]
acme: improve errors when account loading fails

if the account does not exist, error with its name
if file loading fails, the error includes the full path
if the content fails to parse, show file & parse error
and in each case mention that it's about loading the acme account file

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agocorrectly set apt proxy configuration
Dietmar Maurer [Mon, 10 May 2021 11:07:46 +0000 (13:07 +0200)]
correctly set apt proxy configuration

3 years agoreload cert inside command socket handler
Dietmar Maurer [Wed, 12 May 2021 09:53:49 +0000 (11:53 +0200)]
reload cert inside command socket handler

3 years agoui: add task descriptions for ACME related tasks
Thomas Lamprecht [Tue, 11 May 2021 16:08:10 +0000 (18:08 +0200)]
ui: add task descriptions for ACME related tasks

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: acme accounts: use name as worker ID
Thomas Lamprecht [Tue, 11 May 2021 16:07:03 +0000 (18:07 +0200)]
api: acme accounts: use name as worker ID

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoconfig: acme: rust format
Thomas Lamprecht [Tue, 11 May 2021 15:35:54 +0000 (17:35 +0200)]
config: acme: rust format

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoconfig: acme: fall-back to the "default" account
Thomas Lamprecht [Tue, 11 May 2021 15:33:06 +0000 (17:33 +0200)]
config: acme: fall-back to the "default" account

syncs behavior with both, the displayed state in the PBS
web-interface, and the behavior of PVE/PMG.

Without this a standard setup would result in a Error like:
> TASK ERROR: no acme client configured

which was pretty confusing, as the actual error was something else
(no account configured), and the web-interface showed "default" as
selected account, so a user had no idea what actually was wrong and
how to fix it.

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