]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
4 years agosrc/tools/disks.rs: new helper to reread partition table
Dietmar Maurer [Mon, 8 Jun 2020 05:22:06 +0000 (07:22 +0200)]
src/tools/disks.rs: new helper to reread partition table

4 years agosrc/api2/node/disks.rs: correctly use disk_by_name insteadf of disk_by_node
Dietmar Maurer [Mon, 8 Jun 2020 05:20:59 +0000 (07:20 +0200)]
src/api2/node/disks.rs: correctly use disk_by_name insteadf of disk_by_node

4 years agosrc/api2/node/disks.rs: implement initgpt API
Dietmar Maurer [Sun, 7 Jun 2020 08:30:34 +0000 (10:30 +0200)]
src/api2/node/disks.rs: implement initgpt API

4 years agosrc/api2/types.rs: define BLOCKDEVICE_NAME_SCHEMA
Dietmar Maurer [Sun, 7 Jun 2020 05:15:15 +0000 (07:15 +0200)]
src/api2/types.rs: define BLOCKDEVICE_NAME_SCHEMA

4 years agosrc/config/acl.rs: add /system/disks to valid acl paths
Dietmar Maurer [Sat, 6 Jun 2020 13:48:15 +0000 (15:48 +0200)]
src/config/acl.rs: add /system/disks to valid acl paths

4 years agosrc/bin/proxmox-backup-manager.rs: add disk subcommand
Dietmar Maurer [Sat, 6 Jun 2020 13:40:28 +0000 (15:40 +0200)]
src/bin/proxmox-backup-manager.rs: add disk subcommand

4 years agosrc/tools/disks.rs: fix disk size, add completion helper
Dietmar Maurer [Sat, 6 Jun 2020 13:39:25 +0000 (15:39 +0200)]
src/tools/disks.rs: fix disk size, add completion helper

4 years agomove disks api to /node/<node>/disks
Dietmar Maurer [Sat, 6 Jun 2020 12:43:36 +0000 (14:43 +0200)]
move disks api to /node/<node>/disks

4 years agosrc/api2/disks.rs: implement smart api
Dietmar Maurer [Sat, 6 Jun 2020 10:23:11 +0000 (12:23 +0200)]
src/api2/disks.rs: implement smart api

4 years agosrc/tools/disks.rs: new helper disk_by_name()
Dietmar Maurer [Sat, 6 Jun 2020 10:22:38 +0000 (12:22 +0200)]
src/tools/disks.rs: new helper disk_by_name()

4 years agosrc/api2/disks.rs - list-disks: add usage-type filter
Dietmar Maurer [Sat, 6 Jun 2020 09:48:58 +0000 (11:48 +0200)]
src/api2/disks.rs - list-disks: add usage-type filter

4 years agosrc/api2/disks.rs: start disks api
Dietmar Maurer [Sat, 6 Jun 2020 09:38:47 +0000 (11:38 +0200)]
src/api2/disks.rs: start disks api

4 years agosrc/tools/disks.rs: use api macro so that we can use those types with the api
Dietmar Maurer [Sat, 6 Jun 2020 09:37:24 +0000 (11:37 +0200)]
src/tools/disks.rs: use api macro so that we can use those types with the api

4 years agosrc/tools/disks.rs - get_disks: query smart status
Dietmar Maurer [Sat, 6 Jun 2020 07:18:20 +0000 (09:18 +0200)]
src/tools/disks.rs - get_disks: query smart status

4 years agosrc/tools/disks/smart.rs: use model.to_string_lossy() to simplify code
Dietmar Maurer [Sat, 6 Jun 2020 07:05:22 +0000 (09:05 +0200)]
src/tools/disks/smart.rs: use model.to_string_lossy() to simplify code

4 years agosrc/tools/disks/smart.rs: try to get correct wearout for ATA devices
Dietmar Maurer [Sat, 6 Jun 2020 07:01:15 +0000 (09:01 +0200)]
src/tools/disks/smart.rs: try to get correct wearout for ATA devices

4 years agosrc/tools/disks/smart.rs - get_smart_data: use &Disk instead of &str
Dietmar Maurer [Sat, 6 Jun 2020 06:23:59 +0000 (08:23 +0200)]
src/tools/disks/smart.rs - get_smart_data: use &Disk instead of &str

So that we can query other device infos easily (model, vendor, ..)

4 years agoui: add gc/prune schedule and options available in the ui
Dominik Csapak [Fri, 5 Jun 2020 08:11:54 +0000 (10:11 +0200)]
ui: add gc/prune schedule and options available in the ui

by adding them as columns for the config view,
and as a seperate tab on the edit window (this is done to not show
too many options at once)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: make DataStore configuration editable
Dominik Csapak [Fri, 5 Jun 2020 08:11:53 +0000 (10:11 +0200)]
ui: make DataStore configuration editable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: refactor DataStoreConfig and Edit
Dominik Csapak [Fri, 5 Jun 2020 08:11:52 +0000 (10:11 +0200)]
ui: refactor DataStoreConfig and Edit

split them into two files and put them into the respective directory

refactor the DataStoreConfigPanel to controller/view
and the DataStoreEdit window/inputpanel to simply an editwindow
(there is no need to have a seperate inputpanel) which also
prepares the window for edit (by using pmxDisplayEditFields)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: replace DataStoreStatus with DataStoreConfig
Dominik Csapak [Fri, 5 Jun 2020 08:11:51 +0000 (10:11 +0200)]
ui: replace DataStoreStatus with DataStoreConfig

We will show an overall status of the DataStores in the Dashboard, so there
is no need for a seperate DataStores Status.

This means we can move the Config to where the Status was, and remove
the duplicated entry in the NavigationTree, reducing confusion for users

We can still seperate the permissions by simply showing a permission
denied error, or simply leaving the list empty

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agosrc/tools/disks/smart.rs: parse output from smartctl
Dietmar Maurer [Fri, 5 Jun 2020 16:30:06 +0000 (18:30 +0200)]
src/tools/disks/smart.rs: parse output from smartctl

4 years agosrc/tools/disks.rs: implement get_disks (similar to the one in PVE::Diskmanage)
Dietmar Maurer [Fri, 5 Jun 2020 08:00:05 +0000 (10:00 +0200)]
src/tools/disks.rs: implement get_disks (similar to the one in PVE::Diskmanage)

But no ceph support for now. Also no support for old cciss block devices.

4 years agosrc/tools/disks.rs; use correct subdir to check holders
Dietmar Maurer [Fri, 5 Jun 2020 07:27:48 +0000 (09:27 +0200)]
src/tools/disks.rs; use correct subdir to check holders

4 years agosrc/tools/disks.rs: fix disk type detection, remove newline from vendor string
Dietmar Maurer [Fri, 5 Jun 2020 06:09:52 +0000 (08:09 +0200)]
src/tools/disks.rs: fix disk type detection, remove newline from vendor string

4 years agodepend on proxmox 0.1.39
Dietmar Maurer [Fri, 5 Jun 2020 06:08:40 +0000 (08:08 +0200)]
depend on proxmox 0.1.39

4 years agoui: fix prune button
Dominik Csapak [Thu, 4 Jun 2020 10:38:45 +0000 (12:38 +0200)]
ui: fix prune button

the remove button did not get the selModel since the xytpe was not
'grid' so give it the correct xtype

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agobump version to 0.2.3-1 v0.2.3
Thomas Lamprecht [Thu, 4 Jun 2020 08:39:11 +0000 (10:39 +0200)]
bump version to 0.2.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agorrd: fix off-by-one in save interval calculation
Thomas Lamprecht [Thu, 4 Jun 2020 08:30:47 +0000 (10:30 +0200)]
rrd: fix off-by-one in save interval calculation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix csum calculation of not 'chunk_size' aligned images
Dominik Csapak [Thu, 4 Jun 2020 08:12:10 +0000 (10:12 +0200)]
fix csum calculation of not 'chunk_size' aligned images

the last chunk does not have to be as big as the chunk_size,
just use the already available 'chunk_end' function which does the
correct thing

this fixes restoration of images whose sizes are not a multiple of
'chunk_size' as well

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agosrc/tools/disks/lvm.rs: implement get_lvm_devices()
Dietmar Maurer [Thu, 4 Jun 2020 07:12:19 +0000 (09:12 +0200)]
src/tools/disks/lvm.rs: implement get_lvm_devices()

4 years agosrc/tools/disks.rs: add/use get_partition_type_info
Dietmar Maurer [Thu, 4 Jun 2020 05:48:22 +0000 (07:48 +0200)]
src/tools/disks.rs: add/use get_partition_type_info

4 years agoimprove display of 'next run' for sync jobs
Dominik Csapak [Wed, 3 Jun 2020 14:34:07 +0000 (16:34 +0200)]
improve display of 'next run' for sync jobs

if the last sync job is too far in the past (or there was none at all
for now) we run it at the next iteration, so we want to show that

we now calculate the next_run by using either the real last endtime
as time or 0

then in the frontend, we check if the next_run is < now and show 'pending'
(we do it this way also for replication on pve)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agotools/systemd/time: fix compute_next_event for weekdays
Dominik Csapak [Wed, 3 Jun 2020 14:34:06 +0000 (16:34 +0200)]
tools/systemd/time: fix compute_next_event for weekdays

two things were wrong here:
* the range (x..y) does not include y, so the range
  (day_num+1..6) goes from (day_num+1) to 5 (but sunday is 6)

* WeekDays.bits() does not return the 'day_num' of that day, but
  the bit value (e.g. 64 for SUNDAY) but was treated as the index of
  the day of the week
  to fix this, we drop the map to WeekDays and use the 'indices'
  directly

this patch makes the test work again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agosystemd/time: add tests for all weekdays
Dominik Csapak [Wed, 3 Jun 2020 14:34:05 +0000 (16:34 +0200)]
systemd/time: add tests for all weekdays

this fails for now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoverify_file: add missing closing parenthesis in error message
Thomas Lamprecht [Wed, 3 Jun 2020 17:09:58 +0000 (19:09 +0200)]
verify_file: add missing closing parenthesis in error message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agosrc/tools/disks/zfs.rs: add parser for zpool list output
Dietmar Maurer [Wed, 3 Jun 2020 10:16:08 +0000 (12:16 +0200)]
src/tools/disks/zfs.rs: add parser for zpool list output

4 years agobump version to 0.2.2-1 v0.2.2
Dietmar Maurer [Wed, 3 Jun 2020 08:37:46 +0000 (10:37 +0200)]
bump version to 0.2.2-1

4 years agosrc/bin/proxmox-backup-client.rs: implement quite flag
Dietmar Maurer [Wed, 3 Jun 2020 08:11:37 +0000 (10:11 +0200)]
src/bin/proxmox-backup-client.rs: implement quite flag

4 years agoclient restore: don't add server file ending if already specified
Thomas Lamprecht [Tue, 2 Jun 2020 16:41:32 +0000 (18:41 +0200)]
client restore: don't add server file ending if already specified

If one executes a client command like
 # proxmox-backup-client files <snapshot> --repository ...
the files shown have already the '.fidx' or '.blob' file ending, so
if a user would just copy paste that one the client would always add
.blob, and the server would not find that file.

So avoid adding file endings if it is already a known OK one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoclient restore: factor out archive/type parsing
Thomas Lamprecht [Tue, 2 Jun 2020 16:41:31 +0000 (18:41 +0200)]
client restore: factor out archive/type parsing

will be extended in a next patch.

Also drop a dead else branch, can never get hit as we always add
.blob as fallback

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix typo
Dietmar Maurer [Wed, 3 Jun 2020 04:59:43 +0000 (06:59 +0200)]
fix typo

4 years agoclient: improve connection/new fingerprint query
Wolfgang Bumiller [Tue, 26 May 2020 09:52:36 +0000 (11:52 +0200)]
client: improve connection/new fingerprint query

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotypo fixes all over the place
Thomas Lamprecht [Sat, 30 May 2020 14:37:33 +0000 (16:37 +0200)]
typo fixes all over the place

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agosrc/client/pull.rs: also download client.log.blob
Dietmar Maurer [Sat, 30 May 2020 12:39:38 +0000 (14:39 +0200)]
src/client/pull.rs: also download client.log.blob

4 years agoavoid compiler warnings
Dietmar Maurer [Sat, 30 May 2020 12:05:33 +0000 (14:05 +0200)]
avoid compiler warnings

4 years agocleanup: define/use const for predefined blob file names.
Dietmar Maurer [Sat, 30 May 2020 12:04:15 +0000 (14:04 +0200)]
cleanup: define/use const for predefined blob file names.

4 years agosrc/client/backup_specification.rs: split code into extra file
Dietmar Maurer [Sat, 30 May 2020 08:54:38 +0000 (10:54 +0200)]
src/client/backup_specification.rs: split code into extra file

4 years agosrc/client/pull.rs: more verbose logging
Dietmar Maurer [Sat, 30 May 2020 06:12:43 +0000 (08:12 +0200)]
src/client/pull.rs: more verbose logging

4 years agoui: use Proxmox.Utils.setAuthData
Dominik Csapak [Fri, 29 May 2020 14:22:14 +0000 (16:22 +0200)]
ui: use Proxmox.Utils.setAuthData

this uses different parameters which we want to be the same for
all products (e.g. secure cookie)

leave the PBS.Utils.updateLoginData for the case that we want to do
something more here (as in pve for example)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoadd owner to group and snapshot listings
Dominik Csapak [Fri, 29 May 2020 13:09:01 +0000 (15:09 +0200)]
add owner to group and snapshot listings

while touching it, make columns and tbar in DataStoreContent.js
declarative members and remove the (now) unnecessary initComponent

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: add SyncView
Dominik Csapak [Fri, 29 May 2020 08:53:42 +0000 (10:53 +0200)]
ui: add SyncView

shows a nice overview of sync jobs (incl status of last run, estimated
next run, etc.) with options to add/edit/remove and also show the
log of the last run and manually run it now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: add SyncJobEdit window
Dominik Csapak [Fri, 29 May 2020 08:53:41 +0000 (10:53 +0200)]
ui: add SyncJobEdit window

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: add RemoteSelector and DataStoreSelector
Dominik Csapak [Fri, 29 May 2020 08:53:40 +0000 (10:53 +0200)]
ui: add RemoteSelector and DataStoreSelector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoapi2: add admin/sync endpoint
Dominik Csapak [Fri, 29 May 2020 08:53:39 +0000 (10:53 +0200)]
api2: add admin/sync endpoint

this returns the list of syncjobs with status, as opposed to
config/sync (which is just the config)

also adds an api call where users can run the job manually under
/admin/sync/$ID/run

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoconfig/sync: add SyncJobStatus Struct/Schema
Dominik Csapak [Fri, 29 May 2020 08:53:38 +0000 (10:53 +0200)]
config/sync: add SyncJobStatus Struct/Schema

contains the config + status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agosyncjob: change worker type for sync jobs
Dominik Csapak [Fri, 29 May 2020 08:53:37 +0000 (10:53 +0200)]
syncjob: change worker type for sync jobs

'sync' is used for manually pulling a remote datastore
changing it for a scheduled sync to 'syncjob' so that we can
differentiate between both types of syncs

this also adds a seperate task description for it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoapi2/pull: refactor priv checking and creating pull parameters
Dominik Csapak [Fri, 29 May 2020 08:53:36 +0000 (10:53 +0200)]
api2/pull: refactor priv checking and creating pull parameters

we want to reuse those in the api call for manually running a sync job

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoapi2/config/sync: fix id parameter
Dominik Csapak [Fri, 29 May 2020 08:53:35 +0000 (10:53 +0200)]
api2/config/sync: fix id parameter

'name' is not the correct parameter for get/post

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agocreate SYNC_SCHEDULE_SCHEMA to adapt description for sync jobs
Dominik Csapak [Fri, 29 May 2020 08:53:34 +0000 (10:53 +0200)]
create SYNC_SCHEDULE_SCHEMA to adapt description for sync jobs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: add missing comment field to remote model
Dominik Csapak [Fri, 29 May 2020 07:52:29 +0000 (09:52 +0200)]
ui: add missing comment field to remote model

when using a diffstore, we have to add all used columns to the model,
else they will not refresh on a load

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agosrc/bin/proxmox-backup-proxy.rs: cleanup, move code to src/tools/disks.rs
Dietmar Maurer [Fri, 29 May 2020 09:09:02 +0000 (11:09 +0200)]
src/bin/proxmox-backup-proxy.rs: cleanup, move code to src/tools/disks.rs

And simplify find_mounted_device by using stat.st_dev

4 years agofix removing of remotes
Dominik Csapak [Fri, 29 May 2020 08:45:00 +0000 (10:45 +0200)]
fix removing of remotes

we have to save the remote config after removing the section

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agorrd: reduce io by saving data only once a minute
Dietmar Maurer [Fri, 29 May 2020 07:16:13 +0000 (09:16 +0200)]
rrd: reduce io by saving data only once a minute

4 years agosrc/bin/proxmox-backup-proxy.rs: add test if last prune job is still running
Dietmar Maurer [Fri, 29 May 2020 05:59:42 +0000 (07:59 +0200)]
src/bin/proxmox-backup-proxy.rs: add test if last prune job is still running

4 years agosrc/bin/proxmox-backup-proxy.rs: test if last sync job is still running
Dietmar Maurer [Fri, 29 May 2020 05:58:12 +0000 (07:58 +0200)]
src/bin/proxmox-backup-proxy.rs: test if last sync job is still running

4 years agosrc/server/worker_task.rs: make worker_is_active_local pub
Dietmar Maurer [Fri, 29 May 2020 06:05:10 +0000 (08:05 +0200)]
src/server/worker_task.rs: make worker_is_active_local pub

4 years agosrc/tools/systemd/time.rs: add test for "daily" schedule
Dietmar Maurer [Fri, 29 May 2020 05:52:09 +0000 (07:52 +0200)]
src/tools/systemd/time.rs: add test for "daily" schedule

4 years agosrc/bin/proxmox-backup-proxy.rs: use correct id to lookup sync jobs
Dietmar Maurer [Fri, 29 May 2020 05:50:59 +0000 (07:50 +0200)]
src/bin/proxmox-backup-proxy.rs: use correct id to lookup sync jobs

4 years agoremote config gui: add comment field
Dietmar Maurer [Fri, 29 May 2020 04:46:56 +0000 (06:46 +0200)]
remote config gui: add comment field

4 years agoBACKUP_REPO_URL_REGEX: move to api2::types and allow all valid data store names
Thomas Lamprecht [Thu, 28 May 2020 19:02:54 +0000 (21:02 +0200)]
BACKUP_REPO_URL_REGEX: move to api2::types and allow all valid data store names

The repo URL consists of
* optional userid
* optional host
* datastore name

All three have defined regex or format, but none of that is used, so
for example not all valid datastore names are accepted.

Move definition of the regex over to api2::types where we can access
all required regexes easily.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi2::types: factor out USER_ID regex
Thomas Lamprecht [Thu, 28 May 2020 19:02:53 +0000 (21:02 +0200)]
api2::types: factor out USER_ID regex

allows for better reuse in a next patch

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agowww/ServerStatus.js: use term "IO wait" for CPU iowait
Dietmar Maurer [Fri, 29 May 2020 04:12:49 +0000 (06:12 +0200)]
www/ServerStatus.js: use term "IO wait" for CPU iowait

Because we already use "IO delay" for the storage statistics.

4 years agorrd stats: improve io delay stats
Dietmar Maurer [Thu, 28 May 2020 17:11:37 +0000 (19:11 +0200)]
rrd stats: improve io delay stats

4 years agobump version to 0.2.1-1 v0.2.1
Thomas Lamprecht [Thu, 28 May 2020 15:39:41 +0000 (17:39 +0200)]
bump version to 0.2.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: remotes: fix remote remove buttons base url
Thomas Lamprecht [Thu, 28 May 2020 15:29:54 +0000 (17:29 +0200)]
ui: remotes: fix remote remove buttons base url

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: fix RemoteEdit password change
Dominik Csapak [Thu, 28 May 2020 15:15:15 +0000 (17:15 +0200)]
ui: fix RemoteEdit password change

we have to remove the password from the submitvalues if it did not
change

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agosrc/bin/proxmox-backup-proxy.rs: simplify code
Dietmar Maurer [Thu, 28 May 2020 10:30:54 +0000 (12:30 +0200)]
src/bin/proxmox-backup-proxy.rs: simplify code

and gather all stats for the root disk

4 years agosrc/tools/disks/zfs.rs: use wtime + rtime (wait + run time)
Dietmar Maurer [Thu, 28 May 2020 09:45:34 +0000 (11:45 +0200)]
src/tools/disks/zfs.rs: use wtime + rtime (wait + run time)

4 years agowww/DataStoreStatistic.js: add transfer rate
Dietmar Maurer [Thu, 28 May 2020 08:20:29 +0000 (10:20 +0200)]
www/DataStoreStatistic.js: add transfer rate

4 years agosrc/bin/proxmox-backup-proxy.rs: gather zpool io stats
Dietmar Maurer [Thu, 28 May 2020 08:09:13 +0000 (10:09 +0200)]
src/bin/proxmox-backup-proxy.rs: gather zpool io stats

4 years agosrc/tools/disks/zfs.rs: helper to read zfs pool io stats
Dietmar Maurer [Thu, 28 May 2020 08:07:52 +0000 (10:07 +0200)]
src/tools/disks/zfs.rs: helper to read zfs pool io stats

4 years agodepend on proxmox 0.1.38, use new fs helper functions
Dietmar Maurer [Thu, 28 May 2020 08:06:44 +0000 (10:06 +0200)]
depend on proxmox 0.1.38, use new fs helper functions

4 years agouse the sync id for the scheduled sync worker task
Dominik Csapak [Wed, 27 May 2020 14:42:24 +0000 (16:42 +0200)]
use the sync id for the scheduled sync worker task

this way, multiple sync jobs with the same local store, can get scheduled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agofix 'remove_vanished' cli arg again
Dominik Csapak [Wed, 27 May 2020 14:42:23 +0000 (16:42 +0200)]
fix 'remove_vanished' cli arg again

since the target side wants this to be a boolean and
serde interprets a None Value as 'null' we have to only
add this when it is really set via cli

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agofix inserting of worker tasks
Dominik Csapak [Wed, 27 May 2020 14:42:22 +0000 (16:42 +0200)]
fix inserting of worker tasks

when starting a new task, we do two things to keep track of tasks
(in that order):
* updating the 'active' file with a list of tasks with
  'update_active_workers'
* updating the WORKER_TASK_LIST

the second also updates the status of running tasks in the file by
checking if it is still running by checking the WORKER_TASK_LIST

since those two things are not locked, it can happend that
we update the file, and before updating the WORKER_TASK_LIST,
another thread calls update_active_workers and tries to
get the status from the task log, which won't have any data yet
so the status is 'unknown'

(we do not update that status ever, likely for performance reasons,
so we have to fix this here)

by switching the order of the two operations, we make sure that only
tasks reach the 'active' file which are inserted in the WORKER_TASK_LIST

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agosrc/tools.rs - command_output: add parameter to check exit code
Dietmar Maurer [Wed, 27 May 2020 05:25:39 +0000 (07:25 +0200)]
src/tools.rs - command_output: add parameter to check exit code

4 years agosrc/tools.rs: new helper to handle command_output (std::process::Output)
Dietmar Maurer [Wed, 27 May 2020 04:52:21 +0000 (06:52 +0200)]
src/tools.rs: new helper to handle command_output (std::process::Output)

4 years agoui: acl view: only update if component is activated
Thomas Lamprecht [Tue, 26 May 2020 16:58:19 +0000 (18:58 +0200)]
ui: acl view: only update if component is activated

Avoid triggering non-required background updates during browsing a
datastores content or statistics panels. They're not expensive, but I
do not like such behavior at all (having traveled with trains and
spotty network to often)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: tasks: add sync description+
Thomas Lamprecht [Tue, 26 May 2020 16:35:50 +0000 (18:35 +0200)]
ui: tasks: add sync description+

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: tasks: render reader with full info
Thomas Lamprecht [Tue, 26 May 2020 16:17:01 +0000 (18:17 +0200)]
ui: tasks: render reader with full info

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: factor out render_datetime_utc
Thomas Lamprecht [Tue, 26 May 2020 16:16:38 +0000 (18:16 +0200)]
ui: factor out render_datetime_utc

will be reused in the next patch

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: task: improve rendering of backup/prune worker entries
Thomas Lamprecht [Tue, 26 May 2020 11:37:57 +0000 (13:37 +0200)]
ui: task: improve rendering of backup/prune worker entries

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agodepend on proxmox 0.1.37
Dietmar Maurer [Tue, 26 May 2020 10:58:22 +0000 (12:58 +0200)]
depend on proxmox 0.1.37

4 years agoui: datastore prune: remove debug logging
Thomas Lamprecht [Tue, 26 May 2020 10:50:06 +0000 (12:50 +0200)]
ui: datastore prune: remove debug logging

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: rework datastore content panel controller
Thomas Lamprecht [Tue, 26 May 2020 10:46:45 +0000 (12:46 +0200)]
ui: rework datastore content panel controller

Mostly refactoring, but actually fixes an issue where one seldom run
into a undefined dereference due to the store onLoad callback getting
triggered after some of the componet was destroyed - on quick
switching through the datastores.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix cli pull api call
Dominik Csapak [Tue, 26 May 2020 10:23:27 +0000 (12:23 +0200)]
fix cli pull api call

there is no 'delete' parameter, only 'remove-vanished', so fix that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: add missing monStoreErrors
Dominik Csapak [Tue, 26 May 2020 10:23:26 +0000 (12:23 +0200)]
ui: add missing monStoreErrors

to actually show api errors on the list call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: add crud for remotes
Dominik Csapak [Tue, 26 May 2020 10:23:25 +0000 (12:23 +0200)]
ui: add crud for remotes

listing/adding/editing/removing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoremotes: save passwords as base64
Dominik Csapak [Tue, 26 May 2020 10:23:24 +0000 (12:23 +0200)]
remotes: save passwords as base64

to avoid having arbitrary characters in the config (e.g. newlines)
note that this breaks existings configs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>