Wolfgang Bumiller
6fe5357ce9
bump proxmox-lang dep to 1.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 14:24:24 +01:00
Dominik Csapak
f1681d4b83
use io_format_err, io_bail, io_err_other from proxmox-lang
...
and move the comment from the local io_bail in pbs-client/src/pxar/fuse.rs
to the only use
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 14:24:13 +01:00
Dominik Csapak
13408babad
depend on new 'proxmox-compression' crate
...
the compression utilities live there now
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 14:23:43 +01:00
Wolfgang Bumiller
fb27e132e7
rest-server: bump schema to 1.2 and use convenience methods
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 14:09:45 +01:00
Wolfgang Bumiller
68d22d4888
proxmox-rest-server: add missing 'derive' feature
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 13:57:48 +01:00
Fabian Grünbichler
bb7018e183
misc clippy fixes
...
the trivial ones ;)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:57:16 +01:00
Thomas Lamprecht
645b2ae89b
rest: add cookie_from_header helper
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-03 13:12:02 +01:00
Fabian Grünbichler
6ad9248cf3
tree-wide: drop redundant clones
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-30 15:02:07 +01:00
Fabian Grünbichler
647a0db882
tree-wide: fix needless borrows
...
found and fixed via clippy
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-30 13:55:33 +01:00
Wolfgang Bumiller
8393bcb268
bump regex dep to 1.5
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-16 11:25:02 +01:00
Wolfgang Bumiller
049972844e
cleanup schema function calls
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-16 11:25:02 +01:00
Wolfgang Bumiller
88b56894c7
bump proxmox-schema to 1.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-16 11:25:02 +01:00
Dietmar Maurer
93625e4f87
update to proxmox-sys 0.2 crate
...
- imported pbs-api-types/src/common_regex.rs from old proxmox crate
- use hex crate to generate/parse hex digest
- remove all reference to proxmox crate (use proxmox-sys and
proxmox-serde instead)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-24 10:32:27 +01:00
Wolfgang Bumiller
4c66ea2789
d/control and Cargo.toml bumps
...
* pin-utils isn't used anymore
* proxmox-sys version should also be tracked in Cargo.toml
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-22 10:56:36 +01:00
Dietmar Maurer
15819cdcfc
depend on proxmox-async 0.2
2021-11-20 17:14:02 +01:00
Dietmar Maurer
4a07f14565
proxmox-rest-server: remove pbs-tools dependency
2021-11-19 18:06:54 +01:00
Dietmar Maurer
66b1f90f97
use new proxmox-async crate
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-19 18:03:22 +01:00
Dietmar Maurer
ef69d1aeb9
use new proxmox-sys crate
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-19 11:06:35 +01:00
Dietmar Maurer
a24b72c4de
use proxmox::tools::fd::fd_change_cloexec from proxmox 0.15.3
...
Depend on proxmox 0.15.3
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-18 13:43:41 +01:00
Thomas Lamprecht
c4cff1278f
rest: make successful-ticket auth log a debug one to avoid syslog
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-12 11:10:12 +01:00
Dietmar Maurer
4b3e0e331c
implement Servive for RateLimitedStream
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dietmar Maurer
e9bea7b7ed
use new fsync parameter to replace_file and atomic_open_or_create
...
Depend on proxmox 0.15.0 and proxmox-openid 0.8.1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:28:32 +02:00
Dominik Csapak
b87aa76b64
rest-server: use hashmap for parameter errors
...
our ui expects a map here with 'field: "error"'. This way it can mark
the relevant field as invalid and correctly shows the complete error
message
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-21 06:32:23 +02:00
Dietmar Maurer
0cf4129204
use complete_file_name from proxmox-router 1.1
2021-10-13 14:10:02 +02:00
Wolfgang Bumiller
09046671ed
update to first proxmox crate split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:58:49 +02:00
Wolfgang Bumiller
6ad1bcaf89
bump proxmox dependency to 0.14.0 and proxmox-http to 0.5.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 11:18:22 +02:00
Dominik Csapak
fb6823b54b
rest-server: add cleanup_old_tasks
...
this is a helper that removes task log files that are not referenced
by the task archive anymore
it gets the oldest task archive file, gets the first endtime (the
oldest) and removes all files in the taskdir where the mtime is older
than that
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-08 06:38:52 +02:00
Dietmar Maurer
3ffe2ebc64
proxmox-rest-server: use new ServerAdapter trait instead of callbacks
...
Async callbacks are a PITA, so we now pass a single trait object which
implements check_auth and get_index.
2021-10-05 11:13:10 +02:00
Dietmar Maurer
2c09017045
proxmox-rest-server: pass owned RestEnvironment to get_index
...
This way we avoid pointers with lifetimes.
2021-10-05 11:12:53 +02:00
Dietmar Maurer
591a32ecd4
proxmox-rest-server: cleanup, access api_auth using a method
2021-10-05 11:12:53 +02:00
Thomas Lamprecht
4348c807f7
rest: daemon: group systemd FFI together
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-02 11:45:34 +02:00
Thomas Lamprecht
62b226e9c4
rest: daemon: sd notify: code cleanup
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-02 11:45:34 +02:00
Thomas Lamprecht
7fac98519c
rest: daemon: sd notify barrier: avoid barging in between SystemdNotify enum and systemd_notify
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-02 11:45:34 +02:00
Thomas Lamprecht
83f15413fd
rest: daemon: sd notify barrier: allow caller to set timeout
...
else it's rather to subtle and not a nice interface considering that
we only want to have a thin wrapper for sd_notify_barrier..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-02 11:44:20 +02:00
Thomas Lamprecht
947f4c78a7
rest: daemon: comment why using a systemd barrier is important for main PID handover
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-02 11:44:20 +02:00
Dominik Csapak
5027727fc5
rest-server/daemon: use sd_notify_barrier for service reloading
...
until now, we manually polled the systemd service state during a reload
so that the sd_notify messages get processed in the correct order
(RELOAD(old) -> MAINPID(old) -> READY(new))
with systemd >= 246 there is now 'sd_notify_barrier' which
blocks until systemd processed all prior messages
with that change, the daemon does not need to know the service name anymore
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-02 11:44:20 +02:00
Dietmar Maurer
89766c4f95
proxmox-rest-server: make get_index async
2021-10-01 09:38:10 +02:00
Dietmar Maurer
58a6e5f512
proxmox-rest-server: add comment why ApiService needs to be 'pub'
2021-10-01 08:35:51 +02:00
Dietmar Maurer
2b023101f7
proxmox-rest-server: make check_auth async
2021-10-01 07:53:59 +02:00
Dietmar Maurer
a6c0ec35a3
proxmox-rest-server: fix spelling errors
2021-10-01 06:43:30 +02:00
Dietmar Maurer
be98d3156d
proxmox-rest-server: improve ApiService docs
2021-09-30 17:18:47 +02:00
Dietmar Maurer
58eba821e6
proxmox-rest-server: start module docs
2021-09-30 13:49:29 +02:00
Dietmar Maurer
ad449a5780
rename CommandoSocket to CommandSocket
2021-09-30 12:52:35 +02:00
Wolfgang Bumiller
249aae1f05
drop fd_change_cloexec from proxmox-rest-server
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-09-30 12:43:22 +02:00
Dietmar Maurer
6d4e47fb09
proxmox-rest-server: improve docs
...
And rename enable_file_log to enable_access_log.
2021-09-30 12:29:15 +02:00
Dietmar Maurer
9cb2c97c77
proxmox-rest-server: improve docs
...
And renames abort_worker_async to abort_worker_nowait (avoid confusion,
because the function itself is not async).
2021-09-30 10:51:41 +02:00
Dietmar Maurer
50c62be82c
proxmox-rest-server: cleanup FileLogger docs
2021-09-30 10:51:31 +02:00
Dietmar Maurer
f23aeff910
cleanup: move use clause to top
2021-09-30 08:42:37 +02:00
Dietmar Maurer
2ed2c0334c
proxmox-rest-server: allow to catch SIGINT and SIGHUP separately
...
And make ServerState private.
2021-09-30 08:41:30 +02:00
Dietmar Maurer
93802ec2ef
proxmox-rtest-server: make Reloader and Reloadable private
2021-09-30 07:44:19 +02:00