Commit Graph

112 Commits

Author SHA1 Message Date
Dietmar Maurer
834a2f95a0 avoid some clippy warnings 2019-10-25 18:44:51 +02:00
Wolfgang Bumiller
653b1ca10e some clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-11 12:14:05 +02:00
Wolfgang Bumiller
b30415d244 src/server/state.rs: update to tokio alpha.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
aadcf7c621 src/server/rest.rs: use tokio::timer::delay
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
75fef4b463 src/server/worker_task.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
aa4110cc64 src/server/state.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
91e4587343 src/server/rest.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
b9b7f7ec1f src/server/h2service.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
160fc8147f src/server/command_socket.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
2ec979e4ed /var/run -> /run
/var/run is considered deprecated and for instance in
systemd unit files lintian complains...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 12:28:24 +02:00
Wolfgang Bumiller
35238e234d switch from create_dir_chown to create_path
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 12:26:10 +02:00
Dietmar Maurer
f69adc81a6 use new proxmox::tools::nodename 2019-08-03 17:06:23 +02:00
Dietmar Maurer
fd329bdcd7 remove src/tools/procfs.rs, use proxmox::sys::linux::procfs instead 2019-08-03 16:26:44 +02:00
Dietmar Maurer
e18a6c9ee5 update to nix 0.14, use code from proxmox:tools 2019-08-03 13:05:38 +02:00
Dietmar Maurer
80af046794 src/server/rest.rs: avoid unwrap 2019-07-03 12:00:43 +02:00
Dietmar Maurer
7fb4f5642a src/server/rest.rs: log peer address, use hyper MakeService 2019-07-03 11:54:35 +02:00
Dietmar Maurer
fcfb84fedf file download: avoid unnecessary copy 2019-06-28 07:07:52 +02:00
Dietmar Maurer
42a87f7b96 src/server/h2service.rs: implement generic h2 service 2019-06-26 17:38:33 +02:00
Dietmar Maurer
dd8e744f9a src/api2/admin/datastore.rs: use a worker log log prune actions 2019-06-25 08:12:25 +02:00
Wolfgang Bumiller
dd5495d6dc tree-wide: use 'dyn' for all trait objects
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-06-07 13:13:48 +02:00
Dietmar Maurer
34114e2606 src/server/rest.rs: correctly verify json parameters 2019-05-24 09:10:59 +02:00
Dietmar Maurer
1179e15842 src/server/rest.rs: improve error handling 2019-05-23 08:15:32 +02:00
Dietmar Maurer
1133fe9a63 src/server/rest.rs: do not log 1xx status codes as errors 2019-05-14 06:23:22 +02:00
Dietmar Maurer
b4b63e520d handle_async_api_request: put rpcenv into a Box
So that we can pass rpcenv into futures.
2019-05-09 18:01:24 +02:00
Dietmar Maurer
78b5191550 src/server/formatter.rs: further cleanups and renaming ... 2019-05-09 13:28:26 +02:00
Dietmar Maurer
d55037e471 src/server/formatter.rs: rename format_result to format_data
To avoid confusions with Rust Result type.
2019-05-09 13:15:15 +02:00
Dietmar Maurer
21ee7912fa src/api2/admin/datastore/backup.rs: implement upload chunk 2019-05-09 13:06:09 +02:00
Dietmar Maurer
58c8d7d91f rc/api2/admin/datastore/h2upload.rs: implement BackupEnvironment
To pass arbitrary information/state to api methods.
2019-05-08 11:26:54 +02:00
Dietmar Maurer
f757b30efc src/server/rest.rs: use generics to pass RpcEnvironment 2019-05-08 11:09:01 +02:00
Dietmar Maurer
78f7e225e4 src/server/rest.rs: make handle_(a)sync_api_request public 2019-05-07 11:23:52 +02:00
Dietmar Maurer
75097495ad RestEnvironment: derive Clone 2019-05-07 11:09:18 +02:00
Dietmar Maurer
3578d99f3e move normalize_path to tools::normalize_uri_path 2019-05-07 09:44:34 +02:00
Dietmar Maurer
e45afdff9c src/server/state.rs: use new BroadcastData helper 2019-04-30 10:21:48 +02:00
Wolfgang Bumiller
062d4916ff api_schema: allow generic api handler functions
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-16 11:22:23 +02:00
Dietmar Maurer
75bc49bed7 src/server/worker_task.rs: implement abort channel 2019-04-15 09:38:05 +02:00
Dietmar Maurer
1be71fb02b src/server/worker_task.rs_ do not write ERROR: prefix into task index 2019-04-15 08:37:13 +02:00
Dietmar Maurer
418def7a78 src/server/worker_task.rs: move common code into log_result
Make new() pub
2019-04-15 07:49:03 +02:00
Dietmar Maurer
37b87869b5 src/server/upid.rs: check for illegal characters 2019-04-15 07:47:51 +02:00
Dietmar Maurer
59961b8954 src/server/command_socket.rs: check control socket permissions 2019-04-11 10:51:59 +02:00
Dietmar Maurer
ba70040dbf src/server/worker_task.rs: change task list sort order - latest on top 2019-04-11 09:43:33 +02:00
Dietmar Maurer
d3f4c08f33 src/server/worker_task.rs: catch panics in worker threads 2019-04-11 07:56:06 +02:00
Dietmar Maurer
98a181f055 src/server/worker_task.rs: log message when we call request_abort() 2019-04-10 13:54:28 +02:00
Dietmar Maurer
321070b4fa src/server/worker_task.rs: implement abort_worker (via command_socket) 2019-04-10 12:42:24 +02:00
Dietmar Maurer
cfb2d3c17c src/server/command_socket.rs: correctly handle/spawn handle parallel connections 2019-04-10 11:05:00 +02:00
Dietmar Maurer
9b002cbc5f src/server/worker_task.rs: use abstract socket 2019-04-10 09:03:17 +02:00
Dietmar Maurer
0bfd87bc5e src/server/worker_task.rs: speedup upid_read_status() 2019-04-09 15:11:48 +02:00
Dietmar Maurer
7ae0bf52dd src/server/command_socket.rs: code cleanup - fix error message 2019-04-09 12:47:42 +02:00
Dietmar Maurer
d607b8861b src/server/worker_task.rs: implement task control socket 2019-04-09 12:15:06 +02:00
Dietmar Maurer
e201753629 src/server/command_socket.rs: implement auto_remove flag
Remove the socket file on close.
2019-04-09 11:47:23 +02:00
Dietmar Maurer
634132fe10 src/server/upid.rs: moved code into separate file 2019-04-08 18:43:26 +02:00