]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
2 years agomove ChunkStream to pbs-client
Wolfgang Bumiller [Tue, 20 Jul 2021 08:51:19 +0000 (10:51 +0200)]
move ChunkStream to pbs-client

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoissue banner: avoid depending on proxmox crate for hostname
Thomas Lamprecht [Mon, 19 Jul 2021 14:32:48 +0000 (16:32 +0200)]
issue banner: avoid depending on proxmox crate for hostname

While this slightly duplicates code we just do not profit from the
central, lazy static variant here, as that is only really useful in
daemons to avoid doing frequent syscalls there.

proxmox just pull in far to much (e.g., tokio) and duplicating that
one line of simple code has no real maintenance cost, so just go for
that and use the nix crate directly.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocleanup unused imports
Wolfgang Bumiller [Mon, 19 Jul 2021 13:55:19 +0000 (15:55 +0200)]
cleanup unused imports

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoMakefile: fix build.rs reference
Wolfgang Bumiller [Mon, 19 Jul 2021 13:54:53 +0000 (15:54 +0200)]
Makefile: fix build.rs reference

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove pxar binary to separate crate
Wolfgang Bumiller [Mon, 19 Jul 2021 13:53:43 +0000 (15:53 +0200)]
move pxar binary to separate crate

and move its few remaining proxmox_backup deps out to
pbs-tools

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoresolve some more client imports
Wolfgang Bumiller [Mon, 19 Jul 2021 13:03:24 +0000 (15:03 +0200)]
resolve some more client imports

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove some api types to pbs-api-types
Wolfgang Bumiller [Mon, 19 Jul 2021 12:59:51 +0000 (14:59 +0200)]
move some api types to pbs-api-types

and resolve some imports in the client binary

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove build.rs and friends to pbs-buildcfg
Wolfgang Bumiller [Mon, 19 Jul 2021 12:59:17 +0000 (14:59 +0200)]
move build.rs and friends to pbs-buildcfg

with this the main crate won't be re-compiled every time a
*binary* is modified

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agocomment on test output paths
Wolfgang Bumiller [Mon, 19 Jul 2021 12:24:13 +0000 (14:24 +0200)]
comment on test output paths

cargo should be getting a new env var for this soon

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agodoc and tests fixup
Wolfgang Bumiller [Mon, 19 Jul 2021 11:00:16 +0000 (13:00 +0200)]
doc and tests fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove client to pbs-client subcrate
Wolfgang Bumiller [Mon, 19 Jul 2021 08:50:18 +0000 (10:50 +0200)]
move client to pbs-client subcrate

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove 'wait_for_local_worker' from client to server
Wolfgang Bumiller [Mon, 19 Jul 2021 08:44:40 +0000 (10:44 +0200)]
move 'wait_for_local_worker' from client to server

this just made no sense in the client

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agod/control: fixup proxmox feature flags
Wolfgang Bumiller [Mon, 19 Jul 2021 08:09:43 +0000 (10:09 +0200)]
d/control: fixup proxmox feature flags

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove more tools for the client into subcrates
Wolfgang Bumiller [Thu, 15 Jul 2021 10:15:50 +0000 (12:15 +0200)]
move more tools for the client into subcrates

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove more helpers to pbs-tools
Wolfgang Bumiller [Mon, 12 Jul 2021 09:07:52 +0000 (11:07 +0200)]
move more helpers to pbs-tools

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoadd proxmox-backup-banner binary crate
Wolfgang Bumiller [Mon, 12 Jul 2021 08:45:09 +0000 (10:45 +0200)]
add proxmox-backup-banner binary crate

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-apt dependency
Wolfgang Bumiller [Mon, 19 Jul 2021 08:06:53 +0000 (10:06 +0200)]
bump proxmox-apt dependency

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoui: datastore/Prune: improve title of group prune window
Dominik Csapak [Fri, 16 Jul 2021 08:53:28 +0000 (10:53 +0200)]
ui: datastore/Prune: improve title of group prune window

we are not actually pruning the whole datastore, but only the single
group, so set that as a title

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: datastore/Content: add 'Prune All' button
Dominik Csapak [Fri, 16 Jul 2021 08:53:27 +0000 (10:53 +0200)]
ui: datastore/Content: add 'Prune All' button

since the api call always starts a real worker, we cannot have a
preview. It would also be very hard to show that for all groups in a
non-confusing way. We reuse the pbsPruneInputPanel and add the dry-run
field there conditionally.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: admin/datastore: add new 'prune-datastore' api call
Dominik Csapak [Fri, 16 Jul 2021 08:53:26 +0000 (10:53 +0200)]
api: admin/datastore: add new 'prune-datastore' api call

to prune the whole datastore at once, with the given parameters.
We need a new api call since this can take a while and we need to start
a worker for this. The exisiting api call returns a list of removed/kept
snapshots and is synchronous.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoserver/prune_job: add proper permission checks to 'prune_datastore'
Dominik Csapak [Fri, 16 Jul 2021 08:53:25 +0000 (10:53 +0200)]
server/prune_job: add proper permission checks to 'prune_datastore'

checks for PRIV_DATASTORE_MODIFY, or else if the auth_id is the backup
owner, and skips the group if not.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoserver/prune_job: add 'keep_all' logic to 'prune_datastore'
Dominik Csapak [Fri, 16 Jul 2021 08:53:24 +0000 (10:53 +0200)]
server/prune_job: add 'keep_all' logic to 'prune_datastore'

it is the same as when pruning single groups.
for prune_jobs, we never start the worker if there is no prune option set.
but if we want to call 'prune_datastore' from somewhere else, we
have to check it here again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoserver/prune_job: factor out 'prune_datastore'
Dominik Csapak [Fri, 16 Jul 2021 08:53:23 +0000 (10:53 +0200)]
server/prune_job: factor out 'prune_datastore'

we want to use that outside of a prune job

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobackup/datastore: refactor check_backup_owner there
Dominik Csapak [Fri, 16 Jul 2021 08:53:22 +0000 (10:53 +0200)]
backup/datastore: refactor check_backup_owner there

and add a 'owns_backup' convenience function

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: admin/datastore: simplify prune api call
Dominik Csapak [Fri, 16 Jul 2021 08:53:21 +0000 (10:53 +0200)]
api: admin/datastore: simplify prune api call

by using the api macro and reusing the PruneOptions from pbs-datastore

this means we can now drop the 'add_common_prune_prameters' macro

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoclient: simplify prune api method
Dominik Csapak [Fri, 16 Jul 2021 08:53:20 +0000 (10:53 +0200)]
client: simplify prune api method

by using the api macro on the async method and reusing the PruneOptions
from pbs-datastore with 'flatten: true'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agopbs-datastore/prune: make PruneOptions an api type
Dominik Csapak [Fri, 16 Jul 2021 08:53:19 +0000 (10:53 +0200)]
pbs-datastore/prune: make PruneOptions an api type

so that we can reuse it from here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi-types: move PRUNE_SCHEMA_KEEP_* to pbs-api-types
Dominik Csapak [Fri, 16 Jul 2021 08:53:18 +0000 (10:53 +0200)]
api-types: move PRUNE_SCHEMA_KEEP_* to pbs-api-types

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agotape: changer: sg_pt: make extra scsi request for dvcid
Dominik Csapak [Thu, 15 Jul 2021 11:07:20 +0000 (13:07 +0200)]
tape: changer: sg_pt: make extra scsi request for dvcid

some libraries cannot handle a request with volume tags and DVCID set at
the same time.

So we make 2 separate requests and merge them, since we want to keep
the vendor/model/serial data.

to not overcomplicate the code, add another special type to ElementType

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobuildsys: Prepare new way for path dependencies
Wolfgang Bumiller [Thu, 15 Jul 2021 07:54:47 +0000 (09:54 +0200)]
buildsys: Prepare new way for path dependencies

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agofeatures update
Wolfgang Bumiller [Wed, 14 Jul 2021 13:36:47 +0000 (15:36 +0200)]
features update

so we can drop default-features in proxmox for build-deps to
be more lean

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agod/control: update proxmox b-d
Fabian Grünbichler [Wed, 14 Jul 2021 11:51:38 +0000 (13:51 +0200)]
d/control: update proxmox b-d

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agodepend on proxmox 0.11.6 (changed make_tmp_file() return type)
Dietmar Maurer [Wed, 14 Jul 2021 11:37:26 +0000 (13:37 +0200)]
depend on proxmox 0.11.6 (changed make_tmp_file() return type)

2 years agofix #3526: correctly filter tasks with 'since' and 'until'
Dominik Csapak [Wed, 14 Jul 2021 07:30:26 +0000 (09:30 +0200)]
fix #3526: correctly filter tasks with 'since' and 'until'

The previous assumption was that the Tasks returned by the Iterator are
sorted by the starttime, but that is not actually the case, and
could never have been, since we append the tasks into the log when
they are finished (not started) and running tasks are always iterated
first.

To correctly filter (and simplify the the api call) we forgo the
combinators, and use a for loop instead. This way we only have to do
the since/until checks only once per Task, but have to do the
start/limit counting ourselves.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agodocs: tape: drop technology preview admonitions
Thomas Lamprecht [Tue, 13 Jul 2021 14:47:19 +0000 (16:47 +0200)]
docs: tape: drop technology preview admonitions

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3515: file-restore-daemon: allow LVs/PVs with dash in name
Stefan Reiter [Tue, 13 Jul 2021 09:23:21 +0000 (11:23 +0200)]
fix #3515: file-restore-daemon: allow LVs/PVs with dash in name

LVM replaces any dashes '-' in an LV or PV name with two '--' for the
created device node in /dev/mapper/ to distinguish the seperating
character between the PV and LV name.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agofile-restore: increase lock timeout on QEMU map
Stefan Reiter [Tue, 13 Jul 2021 09:23:20 +0000 (11:23 +0200)]
file-restore: increase lock timeout on QEMU map

This lock is held during VM startup, so that multiple calls will not
start VMs twice. But this means that the timeout needs to incorporate
the time it might take a VM to boot, so increase it quite a bit.

This could previously lead to "interrupted system call" errors when
accessing backups with many disks.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agoapi2: tape: restore: add warning for list restore
Dominik Csapak [Tue, 13 Jul 2021 09:11:25 +0000 (11:11 +0200)]
api2: tape: restore: add warning for list restore

if an error occurs, the snapshot dirs will already be created, and we
do not clean them up (some might already be finished).

Warn the user that they are not cleaned up.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agochunk_store/insert_chunk: add more information to file errors
Dominik Csapak [Tue, 13 Jul 2021 09:11:24 +0000 (11:11 +0200)]
chunk_store/insert_chunk: add more information to file errors

otherwise this context is missing in some tasks (e.g. tape restore)
and it is unclear where it came from

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agotape: changer: sg_pt: always retry until timeout
Dietmar Maurer [Tue, 13 Jul 2021 08:39:28 +0000 (10:39 +0200)]
tape: changer: sg_pt: always retry until timeout

2 years agoui: tape/BackupOverview: increase timeout for media-set content
Dominik Csapak [Tue, 13 Jul 2021 07:09:14 +0000 (09:09 +0200)]
ui: tape/BackupOverview: increase timeout for media-set content

a single catalog can be over 100MiB, and a media-set can have multiple
catalogs to read (no technical upper limit). On slow disks, this can
take much longer than 30 seconds (the default timeout).

The real solution would be to have some kind of index only for the gui
relevant part, e.g. a table in the beginning of the catalog, or
alternatively a seperate file with that info. Until we have such a
solution increase the timeout as a stopgap.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobump version to 2.0.4-1
Thomas Lamprecht [Mon, 12 Jul 2021 16:51:41 +0000 (18:51 +0200)]
bump version to 2.0.4-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoauth: 'crypt' is not thread safe
Stefan Reiter [Mon, 12 Jul 2021 16:30:47 +0000 (18:30 +0200)]
auth: 'crypt' is not thread safe

According to crypt(3):
"crypt places its result in a static storage area, which will be
overwritten by subsequent calls to crypt. It is not safe to call crypt
from multiple threads simultaneously."

This means that multiple login calls as a PBS-realm user can collide and
produce intermittent authentication failures. A visible case is for
file-restore, where VMs with many disks lead to just as many auth-calls
at the same time, as the GUI tries to expand each tree element on load.

Instead, use the thread-safe variant 'crypt_r', which places the result
into a pre-allocated buffer of type 'crypt_data'. The C struct is laid
out according to 'lib/crypt.h.in' and the man page mentioned above.

Use the opportunity and make both arguments to the rust 'crypt' function
take a &[u8].

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agotape: changer: sg_pt: query element types separately
Dominik Csapak [Mon, 12 Jul 2021 15:48:53 +0000 (17:48 +0200)]
tape: changer: sg_pt: query element types separately

Some changers do not like the DVCID bit when querying non-drives,
this includes when querying 'all' elements.

To circumvent this, we query each type by itself (like mtx does it),
and only add the DVCID bit for drives (Data Transfer Elements).

Reported by a user in the forum:
https://forum.proxmox.com/threads/ibm-3584-ts3500-support.92291/

and limit to 1000 elements per request.
(Because some changers limit that request with the options we set)

instead of checking if the data len was equal to the allocation_len
for getting more data, we count the returned elements and compare
that with the number we requested

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2 years agochange tape drive lock path
Dietmar Maurer [Mon, 12 Jul 2021 15:23:38 +0000 (17:23 +0200)]
change tape drive lock path

New kernel has stricter checks on tmpfs with stick-bit on directories, so some
commands (i.e. proxmox-tape changer status) fails when executed as root, because
permission checks fails when locking the drive.

This patch move the drive locks to /run/proxmox-backup/drive-lock.

Note: This is incompatible to old locking mechmanism, so users may not
run tape backups during update (or running backup can fail).

2 years agod/postinst: drop some legacy update handling
Thomas Lamprecht [Mon, 12 Jul 2021 14:14:28 +0000 (16:14 +0200)]
d/postinst: drop some legacy update handling

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: try to avoid duplicate build due to "phony" docs dependency
Thomas Lamprecht [Mon, 12 Jul 2021 11:15:17 +0000 (13:15 +0200)]
buildsys: try to avoid duplicate build due to "phony" docs dependency

Make docs target depend directly on the some docs-only required
binaries and add a new intermediate ".do-cargo-build" target that is
explicitly not a PHONY target.

That avoids one extra set of full builds.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 2.0.3-1
Thomas Lamprecht [Mon, 12 Jul 2021 06:07:55 +0000 (08:07 +0200)]
bump version to 2.0.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoRevert "api: access: domains: add ExtraRealmInfo and RealmInfo structs"
Dominik Csapak [Mon, 12 Jul 2021 07:48:08 +0000 (09:48 +0200)]
Revert "api: access: domains: add ExtraRealmInfo and RealmInfo structs"

This reverts commit da7ec1d2af1c28503052e1cd5954dfada81058cd.

not necessary, since we have the api in config/access/openid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoRevert "api: access: domains: add get/create/update/delete domain call"
Dominik Csapak [Mon, 12 Jul 2021 07:48:07 +0000 (09:48 +0200)]
Revert "api: access: domains: add get/create/update/delete domain call"

This reverts commit 5117cf4f1786e0b37d486413d658d78a4bcfdf53.

we already have that in api2/config/access

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: config: access: openid: use better Privilige Realm.Allocate
Dominik Csapak [Mon, 12 Jul 2021 07:48:06 +0000 (09:48 +0200)]
api: config: access: openid: use better Privilige Realm.Allocate

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: config: access: openid: use correct parameter for matching
Dominik Csapak [Mon, 12 Jul 2021 07:48:05 +0000 (09:48 +0200)]
api: config: access: openid: use correct parameter for matching

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: panel/AccessControl: define baseUrland useTypeInUrl for AuthView
Dominik Csapak [Mon, 12 Jul 2021 07:48:04 +0000 (09:48 +0200)]
ui: panel/AccessControl: define baseUrland useTypeInUrl for AuthView

both are not the default

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobuildsys: fixup clean target
Thomas Lamprecht [Mon, 12 Jul 2021 06:08:25 +0000 (08:08 +0200)]
buildsys: fixup clean target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: tfa: module path cleanup
Wolfgang Bumiller [Mon, 12 Jul 2021 06:43:14 +0000 (08:43 +0200)]
api: tfa: module path cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoui: datastore content: style edit notes pencil like action-col icon
Thomas Lamprecht [Mon, 12 Jul 2021 05:57:37 +0000 (07:57 +0200)]
ui: datastore content: style edit notes pencil like action-col icon

as those have a hover effect and use dark-grey vs. the quite "harsh"
looking plain black. We need to override the margin though, as else
the floated layout adds another line.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: update group notes: fix obj access and rewrite to async
Thomas Lamprecht [Mon, 12 Jul 2021 05:54:41 +0000 (07:54 +0200)]
ui: update group notes: fix obj access and rewrite to async

eslint is configured to not allow using quoted object keys if they
could be just passed in dot notation, e.g.,
wrong: `group["comment"]`
good:  `group.comment`

It's not a big problem but eslint fails the build with the wrong one,
so this needs to be fixed anyway..

Also, rewrite to async, shorter and less indentation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: bump versioned dependency to widget-toolkit
Thomas Lamprecht [Mon, 12 Jul 2021 05:20:45 +0000 (07:20 +0200)]
d/control: bump versioned dependency to widget-toolkit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: add support for notes on backup groups
Stefan Reiter [Thu, 8 Jul 2021 14:45:28 +0000 (16:45 +0200)]
ui: add support for notes on backup groups

Currently done a little bit hacky in a seperate API call following the
initial list_snapshots, as we previously didn't call list_groups at all
and instead calculated the groups from the snapshots.

This calls it async and updates the view with group comments when data
arrives. The editor is simply reused with the 'group-notes' API call,
since the semantics are the same.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agoapi: add support for notes on backup groups
Stefan Reiter [Thu, 8 Jul 2021 14:45:27 +0000 (16:45 +0200)]
api: add support for notes on backup groups

Stored in atomically-updated 'notes' file in backup group directory.
Available via dedicated GET/PUT API calls, as well as the first line
being included in list_groups (similar to list_snapshots).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: node status: fix font-awesome icon size
Thomas Lamprecht [Mon, 12 Jul 2021 04:56:09 +0000 (06:56 +0200)]
ui: node status: fix font-awesome icon size

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: node status: reduce padding like in PVE
Thomas Lamprecht [Mon, 12 Jul 2021 04:55:30 +0000 (06:55 +0200)]
ui: node status: reduce padding like in PVE

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: dashboard: show node's repository/subscription status
Fabian Ebner [Fri, 9 Jul 2021 12:44:16 +0000 (14:44 +0200)]
ui: dashboard: show node's repository/subscription status

Mostly copied from PVE, slightly adapted to be consistent with other
things in the dashboard, e.g. use a store for the repository info.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: window/Settings: add summarycolumns settings
Dominik Csapak [Mon, 19 Apr 2021 11:02:06 +0000 (13:02 +0200)]
ui: window/Settings: add summarycolumns settings

like in pve

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: panel/NodeInfo: make it like in pve
Dominik Csapak [Mon, 19 Apr 2021 11:02:05 +0000 (13:02 +0200)]
ui: panel/NodeInfo: make it like in pve

this changes the node info panel to a similar layout as in pve,
with the ksm sharing and version field removed

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: factor out NodeInfoPanel
Dominik Csapak [Mon, 19 Apr 2021 11:02:04 +0000 (13:02 +0200)]
ui: factor out NodeInfoPanel

so that Dashboard.js will be less cluttered when we add more information
there.

No functional change, but reworked the fingerprint button disabling to
use a property of the view instead of a viewmodel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: tapeRestore: make window non-resizable
Dominik Csapak [Thu, 8 Jul 2021 13:42:15 +0000 (15:42 +0200)]
ui: tapeRestore: make window non-resizable

While it would be nice to be able to resize that window for more
snapshots/datastores in view, this would need quite some reworking on the
input panel side. So for now, disable resizing of that window, otherwise
the grids look weird as they only scale horizontally but not vertically.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agofix #3447: ui: Dashboard: disallow selection of datastore statistics row
Dominik Csapak [Thu, 27 May 2021 08:52:17 +0000 (10:52 +0200)]
fix #3447: ui: Dashboard: disallow selection of datastore statistics row

since we cannot do anything with a selected row anyway, simply
disallow it

this avoids having the row in the same color as the progressbar, without
being able to deselect the row again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobuildsys: workaround linkage issues from openid/curl build server stuff separate
Thomas Lamprecht [Mon, 12 Jul 2021 04:16:28 +0000 (06:16 +0200)]
buildsys: workaround linkage issues from openid/curl build server stuff separate

this blows up build times, but we do not plan for using it longer
than required (i.e., the server is finally split into its own binary
crate providing only those binaries).

Note, using `cargo b --release` to build is naturally unaffected by
this change, so for dev builds just continue to use that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: mark clean targets phony and split out deb pkg-clean
Thomas Lamprecht [Sun, 11 Jul 2021 11:25:39 +0000 (13:25 +0200)]
buildsys: mark clean targets phony and split out deb pkg-clean

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorest: log response: avoid unnecessary mut on variable
Thomas Lamprecht [Sun, 11 Jul 2021 11:05:16 +0000 (13:05 +0200)]
rest: log response: avoid unnecessary mut on variable

a match expresses the fallback slightly nicer and needs no mut,
which is always nice to avoid.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/rules: drop dh_dwz override, handled now better
Thomas Lamprecht [Sun, 11 Jul 2021 11:00:10 +0000 (13:00 +0200)]
d/rules: drop dh_dwz override, handled now better

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933541#17

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: access: revert icon swap, use realm over auth.
Thomas Lamprecht [Sun, 11 Jul 2021 10:53:43 +0000 (12:53 +0200)]
ui: access: revert icon swap, use realm over auth.

Moving icons around is not to ideal for people accustomed to the old
ones, at least if they are used for a new component on the same view.

Rather use the address-book icon, which is also used for adding a new
realm in PVE, we can rather switch over PVE to that and the text
"Realms", as that is also the label one sees when logging in, so a
better fit to keep that consistent.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: use Async tools from widget toolkit
Thomas Lamprecht [Fri, 9 Jul 2021 14:53:11 +0000 (16:53 +0200)]
ui: use Async tools from widget toolkit

The api2 one passes the whole response (for more flexibility) on
reject, so we need to adapt to that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: adapt to widget toolkit changes
Thomas Lamprecht [Fri, 9 Jul 2021 14:52:25 +0000 (16:52 +0200)]
ui: adapt to widget toolkit changes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: add /access/domains to PermissionPathsStore
Dominik Csapak [Fri, 9 Jul 2021 11:44:01 +0000 (13:44 +0200)]
ui: add /access/domains to PermissionPathsStore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: add Authentication tab to Access Control
Dominik Csapak [Fri, 9 Jul 2021 11:44:00 +0000 (13:44 +0200)]
ui: add Authentication tab to Access Control

so that user can add/edit/delete realms

changes the icon of tfa to 'id-badge' so that we can keep the same icon
for authentication as pve and not have duplicate icons

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: access: domains: add get/create/update/delete domain call
Dominik Csapak [Fri, 9 Jul 2021 11:43:59 +0000 (13:43 +0200)]
api: access: domains: add get/create/update/delete domain call

modeled like our other section config api calls
two drawbacks of doing it this way:
* we have to copy some api properties again for the update call,
  since not all of them are updateable (username-claim)
* we only handle openid for now, which we would have to change
  when we add ldap/ad

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: access: domains: add ExtraRealmInfo and RealmInfo structs
Dominik Csapak [Fri, 9 Jul 2021 11:43:58 +0000 (13:43 +0200)]
api: access: domains: add ExtraRealmInfo and RealmInfo structs

these will be used as parameters/return types for the read/create/etc.
calls for realms

for now we copy the necessary attributes (only from openid) since
our api macros/tools are not good enought to generate the necessary
api definitions for section configs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoconfig: acl: add PRIV_REALM_ALLOCATE
Dominik Csapak [Fri, 9 Jul 2021 11:43:57 +0000 (13:43 +0200)]
config: acl: add PRIV_REALM_ALLOCATE

will be used for realm creation/update/deletion

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: access: domains: add BasicRealmInfo struct and use it
Dominik Csapak [Fri, 9 Jul 2021 11:43:56 +0000 (13:43 +0200)]
api: access: domains: add BasicRealmInfo struct and use it

to have better type safety and as preparation for adding more types

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoclient: import updates
Wolfgang Bumiller [Fri, 9 Jul 2021 13:29:42 +0000 (15:29 +0200)]
client: import updates

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove client::pull to server::pull
Wolfgang Bumiller [Fri, 9 Jul 2021 13:12:34 +0000 (15:12 +0200)]
move client::pull to server::pull

it's not used by the client and not part of the client, it
just makes use *of* the client, but is used on the
datastore/server...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove more api types for the client
Wolfgang Bumiller [Fri, 9 Jul 2021 12:26:42 +0000 (14:26 +0200)]
move more api types for the client

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove some tools used by the client
Wolfgang Bumiller [Fri, 9 Jul 2021 12:10:15 +0000 (14:10 +0200)]
move some tools used by the client

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove some api types and resolve imports
Wolfgang Bumiller [Fri, 9 Jul 2021 09:31:53 +0000 (11:31 +0200)]
move some api types and resolve imports

in preparation of moving client & proxmox_client_tools out
into a pbs-client subcrate

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoui: add APT repositories
Fabian Ebner [Thu, 8 Jul 2021 14:14:29 +0000 (16:14 +0200)]
ui: add APT repositories

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: apt: add endpoints for adding/changing repositories
Fabian Ebner [Thu, 8 Jul 2021 14:14:28 +0000 (16:14 +0200)]
api: apt: add endpoints for adding/changing repositories

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: apt: add repositories call
Fabian Ebner [Thu, 8 Jul 2021 14:14:27 +0000 (16:14 +0200)]
api: apt: add repositories call

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agodepend on proxmox-apt
Fabian Ebner [Thu, 8 Jul 2021 14:14:26 +0000 (16:14 +0200)]
depend on proxmox-apt

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: access: openid: add PROXMOX_BACKUP_RUN_DIR_M
Dominik Csapak [Fri, 9 Jul 2021 11:01:54 +0000 (13:01 +0200)]
api: access: openid: add PROXMOX_BACKUP_RUN_DIR_M

otherwise it does not compile with 'RUSTFLAGS="--cfg openid"'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: disk list: sort by name
Fabian Ebner [Fri, 9 Jul 2021 10:32:35 +0000 (12:32 +0200)]
api: disk list: sort by name

So callers get more stable results. Most noticeable, the disk list in
the web UI doesn't jump around upon reloading, and while sorting could
be done directly there, like this other callers get the benefit too.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agodisks: also check for file systems with lsblk
Fabian Ebner [Fri, 9 Jul 2021 10:32:34 +0000 (12:32 +0200)]
disks: also check for file systems with lsblk

Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agodisks: refactor partition type handling
Fabian Ebner [Fri, 9 Jul 2021 10:32:33 +0000 (12:32 +0200)]
disks: refactor partition type handling

in preparation to also get the file system type from lsblk.

Co-developed-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agosubscription: set higher-level error to message instead of bailing
Thomas Lamprecht [Fri, 9 Jul 2021 10:43:08 +0000 (12:43 +0200)]
subscription: set higher-level error to message instead of bailing

While the PVE one "bails" too, it has an eval around those and moves
the error to the message property, so lets do so too to ensure a user
can force an update on a too old subscription

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomoving more code to pbs-datastore
Wolfgang Bumiller [Thu, 8 Jul 2021 08:07:01 +0000 (10:07 +0200)]
moving more code to pbs-datastore

prune and fixed/dynamic index

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomove chunk_stat, read_chunk to pbs-datastore
Wolfgang Bumiller [Thu, 8 Jul 2021 07:17:28 +0000 (09:17 +0200)]
move chunk_stat, read_chunk to pbs-datastore

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump version to 2.0.2-1
Thomas Lamprecht [Thu, 8 Jul 2021 12:44:15 +0000 (14:44 +0200)]
bump version to 2.0.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: datastore/OptionView: only navigate up when we removed the datastore
Dominik Csapak [Fri, 4 Jun 2021 09:44:06 +0000 (11:44 +0200)]
ui: datastore/OptionView: only navigate up when we removed the datastore

and not on window close

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: datastore edit: make keep-last label like the others
Fabian Ebner [Thu, 15 Apr 2021 07:24:36 +0000 (09:24 +0200)]
ui: datastore edit: make keep-last label like the others

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>