Dietmar Maurer
bc68dee171
proxmox-rrd: implement new CBOR based format
...
Storing much more data points now got get better graphs.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-13 13:36:02 +02:00
Dietmar Maurer
0355554905
proxmox-rrd: use a journal to reduce amount of bytes written
...
Append pending changes in a simple text based format that allows for
lockless appends as long as we stay below 4 KiB data per write.
Apply the journal every 30 minutes and on daemon startup.
Note that we do not ensure that the journal is synced, this is a
perfomance optimization we can make as the kernel defaults to
writeback in-flight data every 30s (sysctl vm/dirty_expire_centisecs)
anyway, so we lose at max half a minute of data on a crash, here one
should have in mind that we normally expose 1 minute as finest
granularity anyway, so not really much lost.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-13 13:36:02 +02:00
Dietmar Maurer
48ef839043
bump proxmox-router version to 1.1.0-1
2021-10-13 12:28:16 +02:00
Dietmar Maurer
417b7159d2
add filename completions helper (moved from pbs-tools)
...
Depend on 'nix' now.
2021-10-13 12:28:16 +02:00
Wolfgang Bumiller
17adc570db
bump proxmox-borrow to 1.0.1-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-13 10:41:01 +02:00
Wolfgang Bumiller
087bf31567
borrow: update to ManuallyDrop::take
...
and fixup into_boxed_inner along the way
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-13 10:39:12 +02:00
Wolfgang Bumiller
d18292192d
bump proxmox-api-macro to 1.0.1-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-12 14:51:35 +02:00
Wolfgang Bumiller
5988a1adf1
drop automatically_derived attribute for now
...
new rustc seems to *sometimes* complain about it
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-12 14:49:11 +02:00
Wolfgang Bumiller
f63ce12b66
lang: prepare c_str for const fns with 1.56
...
provides an api compatible const-fn-compatible c_str
alternative working on 1.56
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-12 14:29:03 +02:00
Wolfgang Bumiller
8f89f9ad60
lang: get offsetof const fn ready
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-12 14:14:25 +02:00
Wolfgang Bumiller
af33a97547
lang: deprecate ops::ControlFlow
...
as we now have rustc 1.55
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-12 14:13:59 +02:00
Wolfgang Bumiller
d65b2df750
update to proxmox split and bump version to 0.8.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 12:37:13 +02:00
Wolfgang Bumiller
4ccd6256a8
update proxmox-http to 0.5 for the split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 12:34:14 +02:00
Wolfgang Bumiller
336dab0177
update proxmox crate to the current split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 12:34:14 +02:00
Wolfgang Bumiller
c7b17de1b5
update to proxmox split and bump version to 0.8.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 12:00:19 +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
e0ce41b03a
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
1d24555b28
drop u2f-api file
...
used to be used by examples at some point
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:39:59 +02:00
Wolfgang Bumiller
f35dbbd651
add proxmox-section-config crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:39:59 +02:00
Wolfgang Bumiller
41f3fdfeb9
add proxmox-schema and proxmox-router crates
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:39:59 +02:00
Wolfgang Bumiller
01a8b6f1bf
add proxmox-io crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 10:07:53 +02:00
Wolfgang Bumiller
91f59f9f59
add proxmox-lang crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00
Wolfgang Bumiller
9b6fe4aceb
add proxmox-time crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00
Wolfgang Bumiller
7db0a3c6df
add proxmox-borrow crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00
Wolfgang Bumiller
bd67ccc1b3
add proxmox-uuid crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00
Wolfgang Bumiller
77dc52c047
add proxmox-tfa crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00
Wolfgang Bumiller
2859858f59
fix systemd::escape_unit's hex encoding
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +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
Wolfgang Bumiller
fa9757e67f
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
071cb7aa8b
proxmox-rrd: use correct directory options in create_rrdb_dir
2021-10-07 08:50:50 +02:00
Dietmar Maurer
9c64c09c92
proxmox-rrd: cleanup error handling
2021-10-07 08:01:12 +02:00
Dietmar Maurer
5165bed8c2
proxmox-rrd: use log crate instead of eprintln, avoid duplicate logs
2021-10-06 18:19:22 +02:00
Dietmar Maurer
9c7fd3c936
proxmox-rrd: fix update (do not update) when time is in the past
2021-10-06 18:01:48 +02:00
Dietmar Maurer
881d8f85ea
proxmox-rrd: improve developer docs
2021-10-06 12:19:54 +02:00
Dietmar Maurer
54f7a80f97
proxmox-rrd: remove serde dependency
2021-10-06 10:55:46 +02:00
Wolfgang Bumiller
b89c56b96e
start checklist for adding crates in README.rst
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-06 10:37:17 +02:00
Dietmar Maurer
538e6f66f3
split out RRD api types into proxmox-rrd-api-types crate
2021-10-06 09:49:51 +02:00
Dietmar Maurer
ac17698e4a
proxmox-rrd: use create_path instead of std::fs::create_dir_all
...
To ensure correct file ownership.
2021-10-06 08:37:14 +02:00
Dietmar Maurer
8d1a9d2ec6
move RRD code into proxmox-rrd crate
2021-10-06 08:13:28 +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
Wolfgang Bumiller
f189895cef
fix deprecated use of std::u16 module
...
integer primitive type modules are deprecated, use
associated constants instead
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-04 15:03:50 +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