]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
2 years agorefactor send_command
Wolfgang Bumiller [Tue, 11 May 2021 13:53:59 +0000 (15:53 +0200)]
refactor send_command

- refactor the combinators,
- make it take a `&T: Serialize` instead of a Value, and
  allow sending the raw string via `send_raw_command`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxy: implement 'reload-certificate' command
Wolfgang Bumiller [Tue, 11 May 2021 13:53:58 +0000 (15:53 +0200)]
proxy: implement 'reload-certificate' command

to be used via the command socket

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxy: factor out tls acceptor creation
Wolfgang Bumiller [Tue, 11 May 2021 13:53:57 +0000 (15:53 +0200)]
proxy: factor out tls acceptor creation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxy: Arc usage cleanup
Wolfgang Bumiller [Tue, 11 May 2021 13:53:56 +0000 (15:53 +0200)]
proxy: Arc usage cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxy: "continue on error" for the accept call, too
Wolfgang Bumiller [Tue, 11 May 2021 13:53:55 +0000 (15:53 +0200)]
proxy: "continue on error" for the accept call, too

as this gets rid of 2 levels of indentation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxy: factor out accept_connection
Wolfgang Bumiller [Tue, 11 May 2021 13:53:54 +0000 (15:53 +0200)]
proxy: factor out accept_connection

no functional changes, moved code and named the channel's
type for more readability

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump version to 1.1.7-1
Dietmar Maurer [Tue, 11 May 2021 11:23:29 +0000 (13:23 +0200)]
bump version to 1.1.7-1

2 years agoclient: use stderr for all fingerprint confirm msgs
Fabian Grünbichler [Mon, 10 May 2021 08:52:34 +0000 (10:52 +0200)]
client: use stderr for all fingerprint confirm msgs

an interactive client might still want machine-readable output on
stdout.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoclient: refactor verification callback
Fabian Grünbichler [Mon, 10 May 2021 08:52:33 +0000 (10:52 +0200)]
client: refactor verification callback

return a result with optional fingerprint instead of tuple, allowing
easy extraction of a meaningful error message.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoclient: improve fingerprint variable names
Fabian Grünbichler [Mon, 10 May 2021 08:52:32 +0000 (10:52 +0200)]
client: improve fingerprint variable names

and pass as reference instead of cloning.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agofix #3391: improve mismatched fingerprint handling
Fabian Grünbichler [Mon, 10 May 2021 08:52:31 +0000 (10:52 +0200)]
fix #3391: improve mismatched fingerprint handling

if the expected fingerprint and the one returned by the server don't
match, print a warning and allow confirmation and proceeding if running
interactive.

previous:

$ proxmox-backup-client ...
Error: error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1915:

new:

$ proxmox-backup-client ...
WARNING: certificate fingerprint does not match expected fingerprint!
expected:    ac:cb:6a:bc:d6:b7:b4:77:3e:17:05:d6:b6:29:dd:1f:05:9c:2b:3a:df:84:3b:4d:f9:06:2c:be:da:06:52:12
fingerprint: ab:cb:6a:bc:d6:b7:b4:77:3e:17:05:d6:b6:29:dd:1f:05:9c:2b:3a:df:84:3b:4d:f9:06:2c:be:da:06:52:12
Are you sure you want to continue connecting? (y/n): n
Error: error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1915:

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoui: tape: add single snapshot restore
Dominik Csapak [Tue, 11 May 2021 10:50:07 +0000 (12:50 +0200)]
ui: tape: add single snapshot restore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobin/proxmox-tape: add optional snapshots to restore command
Dominik Csapak [Tue, 11 May 2021 10:50:06 +0000 (12:50 +0200)]
bin/proxmox-tape: add optional snapshots to restore command

and add the appropriate completion helper

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agotape/inventory: add completion helper for tape snapshots
Dominik Csapak [Tue, 11 May 2021 10:50:05 +0000 (12:50 +0200)]
tape/inventory: add completion helper for tape snapshots

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi2/tape/restore: add optional snapshots to 'restore'
Dominik Csapak [Tue, 11 May 2021 10:50:04 +0000 (12:50 +0200)]
api2/tape/restore: add optional snapshots to 'restore'

this makes it possible to only restore some snapshots from a tape media-set
instead of the whole. If the user selects only a small part, this will
probably be faster (and definitely uses less space on the target
datastores).

the user has to provide a list of snapshots to restore in the form of
'store:type/group/id'
e.g. 'mystore:ct/100/2021-01-01T00:00:00Z'

we achieve this by first restoring the index to a temp dir, retrieving
a list of chunks, and using the catalog, we generate a list of
media/files that we need to (partially) restore.

finally, we copy the snapshots to the correct dir in the datastore,
and clean up the temp dir

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi2/tape/restore: refactor restore code into its own function
Dominik Csapak [Tue, 11 May 2021 10:50:03 +0000 (12:50 +0200)]
api2/tape/restore: refactor restore code into its own function

and create the 'email' and 'restore_owner' variable at the beginning,
so that we can reuse them and do not have to pass the sources of those
through too many functions

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agotape locate_file: fix off by one error
Dietmar Maurer [Tue, 11 May 2021 10:37:04 +0000 (12:37 +0200)]
tape locate_file: fix off by one error

2 years agodocs/api-viewer: improve rendering of array format
Dominik Csapak [Mon, 10 May 2021 09:28:00 +0000 (11:28 +0200)]
docs/api-viewer: improve rendering of array format

by showing
'[format, ...]'
where 'format' is the simple format from the type of the items

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotape/pool_writer: do not unwrap on channel send
Dominik Csapak [Mon, 10 May 2021 11:54:09 +0000 (13:54 +0200)]
tape/pool_writer: do not unwrap on channel send

if the reader thread is already gone here, we panic here, resulting in
a nondescript error message, so simply ignore/warn in that case and
return gracefully

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: window/SyncJobEdit: disable autoSelect for remote datastore
Dominik Csapak [Mon, 10 May 2021 11:22:40 +0000 (13:22 +0200)]
ui: window/SyncJobEdit: disable autoSelect for remote datastore

when changin the remote, there is a high chance that there are different
datastores, and if a user does not pay attention, now the first store
of the new remote is selected, instead of the one with the same name

disable autoSelect and let the user manually select a remote datastore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: tape: rename 'Datastore' to 'Target Datastore'
Dominik Csapak [Mon, 10 May 2021 11:19:46 +0000 (13:19 +0200)]
ui: tape: rename 'Datastore' to 'Target Datastore'

we have 2 modi in that window:
* backup has multiple datastores
* backup has single datastore

In the first case we show a 'mapping' grid so that
the user can only restore a part. Here a user sees all source
Datastores and can select a target for each one.

In the second case we only have a single 'Datastore' selector, but
we do not show the source. Because of this, the naming is slightly ambiguous
(is it the 'Source' or the 'Target' ?), so rename it to 'Target Datastore'.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agomanager: acme plugin: auto-complete available DNS challenge types
Thomas Lamprecht [Mon, 10 May 2021 13:55:49 +0000 (15:55 +0200)]
manager: acme plugin: auto-complete available DNS challenge types

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocompletion: ACME plugin type: comment out http type for now, not useful
Thomas Lamprecht [Mon, 10 May 2021 13:50:06 +0000 (15:50 +0200)]
completion: ACME plugin type: comment out http type for now, not useful

It may make sense in the future, e.g., if the built-in standalone
type is not enough, e.g., as HTTP**s**, HTTP 2 or even QUIC (HTTP 3)
is wanted in some setups, but for now there's no scenario where one
would profit from adding a new HTTP plugin, especially as it requires
the `data` property to be set, which makes no sense..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomanager: acme plugin: remove ID completion helper from add command
Thomas Lamprecht [Mon, 10 May 2021 13:47:36 +0000 (15:47 +0200)]
manager: acme plugin: remove ID completion helper from add command

we cannot add a plugin with an existing ID so this completion helper
is rather counterproductive...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoconfig: acme: drop now unused foreach_dns_plugin
Thomas Lamprecht [Mon, 10 May 2021 12:41:44 +0000 (14:41 +0200)]
config: acme: drop now unused foreach_dns_plugin

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoacme: use proxmox-acme-plugins and load schema from there
Thomas Lamprecht [Mon, 10 May 2021 12:41:12 +0000 (14:41 +0200)]
acme: use proxmox-acme-plugins and load schema from there

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: move AcmeChallengeSchema to acme types module
Thomas Lamprecht [Mon, 10 May 2021 12:39:05 +0000 (14:39 +0200)]
api: move AcmeChallengeSchema to acme types module

It will be reused in a later patch in another module which should not
depend on the actual API implementation (ugly and cyclic)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: acme: rustfmt
Thomas Lamprecht [Mon, 10 May 2021 09:50:18 +0000 (11:50 +0200)]
api: acme: rustfmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoacme: fix bad nonce retry counter
Wolfgang Bumiller [Mon, 10 May 2021 09:52:04 +0000 (11:52 +0200)]
acme: fix bad nonce retry counter

Actually return the error on the 3rd try.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agofix #3296: use proxy client to retrieve changelog
Dylan Whyte [Fri, 7 May 2021 10:53:03 +0000 (12:53 +0200)]
fix #3296: use proxy client to retrieve changelog

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
2 years agofix #3296: use proxy for subscriptions
Dylan Whyte [Fri, 7 May 2021 10:53:02 +0000 (12:53 +0200)]
fix #3296: use proxy for subscriptions

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
2 years agofix 3296: add http_proxy to node config, and provide a cli
Dylan Whyte [Fri, 7 May 2021 10:53:00 +0000 (12:53 +0200)]
fix 3296: add http_proxy to node config, and provide a cli

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agocleanup src/api2/node/config.rs
Dietmar Maurer [Mon, 10 May 2021 06:19:28 +0000 (08:19 +0200)]
cleanup src/api2/node/config.rs

- add return type
- fix permissions
- fix descriptions

2 years agomove api related type/regx definition from backup_info.rs to src/api2/types/mod.rs
Dietmar Maurer [Fri, 7 May 2021 10:45:44 +0000 (12:45 +0200)]
move api related type/regx definition from backup_info.rs to src/api2/types/mod.rs

2 years agoapi2/types: add TAPE_RESTORE_SNAPSHOT_SCHEMA
Dominik Csapak [Thu, 6 May 2021 12:20:03 +0000 (14:20 +0200)]
api2/types: add TAPE_RESTORE_SNAPSHOT_SCHEMA

which is 'store:type/id/time'

needed to refactor SNAPSHOT_PATH_REGEX_STR from backup_info

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi2/tape/restore: return backup manifest in try_restore_snapshot_archive
Dominik Csapak [Thu, 6 May 2021 12:20:02 +0000 (14:20 +0200)]
api2/tape/restore: return backup manifest in try_restore_snapshot_archive

we'll use that for partial snapshot restore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoprogress: shorter format
Fabian Grünbichler [Fri, 7 May 2021 08:03:10 +0000 (10:03 +0200)]
progress: shorter format

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoprogress: add current group to output
Fabian Grünbichler [Fri, 7 May 2021 08:03:09 +0000 (10:03 +0200)]
progress: add current group to output

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agodocs: online help info: surpress warnings during scan
Thomas Lamprecht [Fri, 7 May 2021 09:50:29 +0000 (11:50 +0200)]
docs: online help info: surpress warnings during scan

We get lots of warnings due to sphinx complaining about missing
includes for generated synopsis. We do not reference to any of those
for now, so we can ignore that now and supress all standard and
warning output.

Note: Errors are still reported.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3331: improve progress for last snapshot in group
Fabian Grünbichler [Fri, 7 May 2021 08:03:08 +0000 (10:03 +0200)]
fix #3331: improve progress for last snapshot in group

especially for the last group, without this the progress would report:

"percentage done: 100.00% (1 of 2 groups, 1 of 1 group snapshots)"

instead of the more logical

"percentage done: 100.00% (2 of 2 groups)"

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agouse build.rs to pass REPOID to rustc-env
Dietmar Maurer [Thu, 6 May 2021 11:00:03 +0000 (13:00 +0200)]
use build.rs to pass REPOID to rustc-env

2 years agofile-restore: add debug mode with serial access
Stefan Reiter [Thu, 6 May 2021 15:26:16 +0000 (17:26 +0200)]
file-restore: add debug mode with serial access

Set PBS_QEMU_DEBUG=1 on a command that starts a VM and then connect to
the debug root shell via:
  minicom -D \unix#/run/proxmox-backup/file-restore-serial-10.sock
or similar.

Note that this requires 'proxmox-backup-restore-image-debug' to work,
the postinst script is updated to also generate the corresponding image.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agod/control: update for cargo manifest update
Thomas Lamprecht [Fri, 7 May 2021 07:26:41 +0000 (09:26 +0200)]
d/control: update for cargo manifest update

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofile-restore: support more drives
Stefan Reiter [Thu, 6 May 2021 15:26:19 +0000 (17:26 +0200)]
file-restore: support more drives

A PCI bus can only support up to 32 devices, so excluding built-in
devices that left us with a maximum of about 25 drives. By adding a new
PCI bridge every 32 devices (starting at bridge ID 2 to avoid conflicts
with automatic bridges), we can theoretically support up to 8096 drives.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agofile-restore: add more RAM for VMs with many drives or debug
Stefan Reiter [Thu, 6 May 2021 15:26:18 +0000 (17:26 +0200)]
file-restore: add more RAM for VMs with many drives or debug

The guest kernel requires more memory depending on how many disks are
attached. 256 seems to be enough for basically any reasonable and
unreasonable amount of disks though.

For debug instance, make it 1G, as these are never started automatically
anyway, and need at least 512MB since the initramfs (especially when
including a debug build of the daemon) is substantially bigger.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agofile-restore: try to kill VM when stale
Stefan Reiter [Thu, 6 May 2021 15:26:17 +0000 (17:26 +0200)]
file-restore: try to kill VM when stale

Helps to clean up a VM that has crashed, is not responding to vsock API
calls, but still has a running QEMU instance.

We always check the process commandline to ensure we don't kill a random
process that took over the PID.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agomake sure URI paths start with a slash
Wolfgang Bumiller [Fri, 7 May 2021 06:41:20 +0000 (08:41 +0200)]
make sure URI paths start with a slash

Otherwise we get an empty error message.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agotape: improve inline docs for READ POSITION LONG
Dietmar Maurer [Thu, 6 May 2021 09:45:40 +0000 (11:45 +0200)]
tape: improve inline docs for READ POSITION LONG

2 years agotape: use LOCATE(16) SCSI command
Dietmar Maurer [Thu, 6 May 2021 08:51:59 +0000 (10:51 +0200)]
tape: use LOCATE(16) SCSI command

Turns out this works on LTO4 and newer.

2 years agoclient: use build_authority in build_uri
Wolfgang Bumiller [Thu, 6 May 2021 06:55:44 +0000 (08:55 +0200)]
client: use build_authority in build_uri

so we don't need to also duplicate the IPv6 bracket logic

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agocall create_run_dir() at daemon startup
Dietmar Maurer [Thu, 6 May 2021 08:23:54 +0000 (10:23 +0200)]
call create_run_dir() at daemon startup

2 years agocleanup: split SimpleHttp client into extra file
Dietmar Maurer [Thu, 6 May 2021 08:20:53 +0000 (10:20 +0200)]
cleanup: split SimpleHttp client into extra file

2 years agoapi2/tape/restore: remove unnecessary params from (try_)restore_snapshot_archive
Dominik Csapak [Wed, 5 May 2021 10:09:14 +0000 (12:09 +0200)]
api2/tape/restore: remove unnecessary params from (try_)restore_snapshot_archive

we do not need them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi2/tape/restore: factor out check_datastore_privs
Dominik Csapak [Wed, 5 May 2021 10:09:13 +0000 (12:09 +0200)]
api2/tape/restore: factor out check_datastore_privs

so that we can reuse it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agotape/media_catalog: add helpers to look for snapshot/chunk files
Dominik Csapak [Wed, 5 May 2021 10:09:12 +0000 (12:09 +0200)]
tape/media_catalog: add helpers to look for snapshot/chunk files

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agotape/drive: add 'move_to_file' to TapeDriver trait
Dominik Csapak [Wed, 5 May 2021 10:09:11 +0000 (12:09 +0200)]
tape/drive: add 'move_to_file' to TapeDriver trait

so that we can directly move to a specified file on the tape

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agohttp proxy: add necessary brackets for IPv6 proxy
Dietmar Maurer [Wed, 5 May 2021 09:57:04 +0000 (11:57 +0200)]
http proxy: add necessary brackets for IPv6 proxy

2 years agoproxmox_restore_daemon: mount ntfs with 'utf8' option
Dominik Csapak [Wed, 5 May 2021 08:46:19 +0000 (10:46 +0200)]
proxmox_restore_daemon: mount ntfs with 'utf8' option

otherwise, the kernel driver exposes file names as iso 8859-1,
but we want to have them as utf8.

This mapping should always work, since UTF16 can be cleanly converted
to UTF8.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoclient/http_client: add necessary brackets
Dietmar Maurer [Wed, 5 May 2021 08:29:15 +0000 (10:29 +0200)]
client/http_client: add necessary brackets

if we are given a 'naked' ipv6 without square brackets around it,
we need to add them ourselves, since the address is ambigious otherwise
when we add the port.

e.g. giving 'fe80::1' as address we arrive at the url (with the default port)
'https://fe80::1:8007/'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agouse api_string_type macro
Wolfgang Bumiller [Tue, 4 May 2021 10:19:30 +0000 (12:19 +0200)]
use api_string_type macro

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agodocs: tape: clarify LTO-4/5 support
Dominik Csapak [Mon, 3 May 2021 09:27:46 +0000 (11:27 +0200)]
docs: tape: clarify LTO-4/5 support

some features we need (e.g. READ POSITION long form) are only officially
available with LTO-5, but work on many LTO-4 drives, so move LTO-4 to
'best-effort' support.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agotape/restore: optimize chunk restore behaviour
Dominik Csapak [Tue, 4 May 2021 10:21:47 +0000 (12:21 +0200)]
tape/restore: optimize chunk restore behaviour

by checking the 'checked_chunks' before trying to write to disk
and by doing the existance check in the parallel handler. This way,
we do not have to check the existance of a chunk multiple times
(if multiple source datastores gets restored to the same target
datastore) and also we do not have to wait on the stat before reading
the next chunk.

We have to change the &WorkerTask to an Arc though, otherwise we
cannot log to the worker from the parallel handler

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobump version to 1.1.6-2
Dietmar Maurer [Tue, 4 May 2021 10:25:16 +0000 (12:25 +0200)]
bump version to 1.1.6-2

2 years agoupdate debian/control
Dietmar Maurer [Tue, 4 May 2021 10:23:24 +0000 (12:23 +0200)]
update debian/control

2 years agoRevert "temporarily disable broken test"
Wolfgang Bumiller [Tue, 4 May 2021 10:09:51 +0000 (12:09 +0200)]
Revert "temporarily disable broken test"

This reverts commit 888d89e2ddd340413f65c155170f844f78b3649f.

The code this depends on should now be available.

2 years agofix permissions set in create_run_dir
Wolfgang Bumiller [Tue, 4 May 2021 07:45:27 +0000 (09:45 +0200)]
fix permissions set in create_run_dir

This directory needs to be owned by the backup user instead
of root.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump version to 1.1.6-1
Dietmar Maurer [Tue, 4 May 2021 10:09:56 +0000 (12:09 +0200)]
bump version to 1.1.6-1

2 years agomove basic ACME types into src/api2/types/acme.rs
Dietmar Maurer [Tue, 4 May 2021 09:29:27 +0000 (11:29 +0200)]
move basic ACME types into src/api2/types/acme.rs

And rename AccountName into AcmeAccountName.

2 years agotape restore: do not verify restored files
Dietmar Maurer [Mon, 3 May 2021 10:42:49 +0000 (12:42 +0200)]
tape restore: do not verify restored files

Because this is too slow and causes the tape motor to stop. Instead,
remove the verify_state from the manifest.

2 years agotape restore: add restore speed to logs
Dietmar Maurer [Fri, 30 Apr 2021 11:04:55 +0000 (13:04 +0200)]
tape restore: add restore speed to logs

2 years agotape restore: write datastore in separate thread
Dietmar Maurer [Fri, 30 Apr 2021 10:35:11 +0000 (12:35 +0200)]
tape restore: write datastore in separate thread

2 years agotape restore: split restore_chunk_archive
Dietmar Maurer [Fri, 30 Apr 2021 10:09:50 +0000 (12:09 +0200)]
tape restore: split restore_chunk_archive

Split out a separate function scan_chunk_archive() for catalog restores.

Note: Required, because we need to optimize restore_chunk_archive() to
write datastore in separate threads (else thape drive will stop during restore)

2 years agodaily-update: check acme certificates
Wolfgang Bumiller [Mon, 3 May 2021 09:39:59 +0000 (11:39 +0200)]
daily-update: check acme certificates

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoui: add certificate & acme view
Wolfgang Bumiller [Mon, 3 May 2021 09:39:58 +0000 (11:39 +0200)]
ui: add certificate & acme view

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoadd acme commands to proxmox-backup-manager
Wolfgang Bumiller [Mon, 3 May 2021 09:39:57 +0000 (11:39 +0200)]
add acme commands to proxmox-backup-manager

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoadd node/{node}/config api path
Wolfgang Bumiller [Mon, 3 May 2021 09:39:56 +0000 (11:39 +0200)]
add node/{node}/config api path

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoadd node/{node}/certificates api call
Wolfgang Bumiller [Mon, 3 May 2021 09:39:55 +0000 (11:39 +0200)]
add node/{node}/certificates api call

API like in PVE:

GET    .../info             => current cert information
POST   .../custom           => upload custom certificate
DELETE .../custom           => delete custom certificate
POST   .../acme/certificate => order acme certificate
PUT    .../acme/certificate => renew expiring acme cert

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoadd config/acme api path
Wolfgang Bumiller [Mon, 3 May 2021 09:39:54 +0000 (11:39 +0200)]
add config/acme api path

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agonode config cleanups
Dietmar Maurer [Tue, 4 May 2021 07:15:57 +0000 (09:15 +0200)]
node config cleanups

2 years agoadd node config
Wolfgang Bumiller [Mon, 3 May 2021 09:39:53 +0000 (11:39 +0200)]
add node config

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agocleanup acme client
Dietmar Maurer [Tue, 4 May 2021 07:28:53 +0000 (09:28 +0200)]
cleanup acme client

2 years agoadd acme client
Wolfgang Bumiller [Mon, 3 May 2021 09:39:52 +0000 (11:39 +0200)]
add acme client

This is the highlevel part using proxmox-acme-rs to create
requests and our hyper code to issue them to the acme
server.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoadd acme config
Wolfgang Bumiller [Mon, 3 May 2021 09:39:51 +0000 (11:39 +0200)]
add acme config

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agodocs: user-management: add note about untrusted certificates for webauthn
Dominik Csapak [Mon, 3 May 2021 09:33:40 +0000 (11:33 +0200)]
docs: user-management: add note about untrusted certificates for webauthn

Since currently it works fine with untrusted certs, but that may change
anytime.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agotape backup job: fix typo in error message
Thomas Lamprecht [Sat, 1 May 2021 10:01:09 +0000 (12:01 +0200)]
tape backup job: fix typo in error message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobin: use extract_output_format where necessary
Dominik Csapak [Fri, 30 Apr 2021 12:51:56 +0000 (14:51 +0200)]
bin: use extract_output_format where necessary

else we sometimes forget to remove it from the 'params' variable
and use that further, running into 'invalid parameter' errors

found by giving 'output-format' paramter to proxmox-tape status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoadd ctime and size function to IndexFile trait
Hannes Laimer [Thu, 29 Apr 2021 11:00:14 +0000 (13:00 +0200)]
add ctime and size function to IndexFile trait

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2 years agoui: tape: handle tapes in changers without barcode
Dominik Csapak [Fri, 30 Apr 2021 08:13:13 +0000 (10:13 +0200)]
ui: tape: handle tapes in changers without barcode

by checking for definedness of the label (tapes without barcode
have the empty string as label-text) and falling back to the
source slot for the load action

Note: Changed the load-slot API from PUT to POST

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agoadd dns alias schema
Wolfgang Bumiller [Thu, 29 Apr 2021 13:13:09 +0000 (15:13 +0200)]
add dns alias schema

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agotemporarily disable broken test
Thomas Lamprecht [Thu, 29 Apr 2021 14:18:18 +0000 (16:18 +0200)]
temporarily disable broken test

this test was added before the used NodeConfig schema was committed,
cannot work...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 1.1.5-3
Thomas Lamprecht [Thu, 29 Apr 2021 13:26:24 +0000 (15:26 +0200)]
bump version to 1.1.5-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofile restore: log which filesystems we support
Thomas Lamprecht [Thu, 29 Apr 2021 13:24:45 +0000 (15:24 +0200)]
file restore: log which filesystems we support

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofile-restore: use 'norecovery' for xfs filesystem
Stefan Reiter [Thu, 29 Apr 2021 08:22:53 +0000 (10:22 +0200)]
file-restore: use 'norecovery' for xfs filesystem

This allows mounting XFS partitons with 'dirty' states, like from a
running VM. Otherwise XFS tries to write recovery information, which
fails on a read-only mount.

Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agoadd 'config file format' to tools::config
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:58 +0000 (16:01 +0200)]
add 'config file format' to tools::config

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoconfig::acl: make /system/certificates a valid path
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:57 +0000 (16:01 +0200)]
config::acl: make /system/certificates a valid path

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump d/control
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:56 +0000 (16:01 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoCargo.toml: depend on proxmox-acme-rs
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:55 +0000 (16:01 +0200)]
Cargo.toml: depend on proxmox-acme-rs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agocatalog shell: replace LoopState with ControlFlow
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:54 +0000 (16:01 +0200)]
catalog shell: replace LoopState with ControlFlow

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agotools: add ControlFlow type
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:53 +0000 (16:01 +0200)]
tools: add ControlFlow type

modeled after std::ops::ControlFlow

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoCertInfo: add is_expired_after_epoch
Wolfgang Bumiller [Thu, 22 Apr 2021 14:01:52 +0000 (16:01 +0200)]
CertInfo: add is_expired_after_epoch

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>