Commit Graph

6725 Commits

Author SHA1 Message Date
Wolfgang Bumiller
5574114a2a more stable clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-08-17 09:22:32 +02:00
Fabian Grünbichler
75ecc27907 properly scope clippy allow
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-02 11:09:40 +02:00
Wolfgang Bumiller
d2ff521df2 bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:48:56 +02:00
Wolfgang Bumiller
135aaee2d9 bump proxmox-sys dep to 0.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:47:37 +02:00
Wolfgang Bumiller
2ed7b9b36f tools: drop unused proxmox-borrow dependency
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:44:48 +02:00
Wolfgang Bumiller
968d3b4ff5 allow too_many_arguments in tape restore code
Some of them could easily be grouped in a kind of
RestoreWorker struct, but that'll still leave one bigger
function that's more annoying to change.
Let's just allow it for now.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 12:10:02 +02:00
Wolfgang Bumiller
5b6cb51dbc lower PullParameters to pub(crate), allow too_many_parameters
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 10:58:24 +02:00
Wolfgang Bumiller
223271e123 clippy: deal with some internal type complexity
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 10:53:38 +02:00
Wolfgang Bumiller
1654ab33b4 clippy auto-deref fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 10:32:07 +02:00
Wolfgang Bumiller
c54aeedb8a clippy fixups for Default impls
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 10:30:02 +02:00
Wolfgang Bumiller
e589e2b790 ticket: box TfaChallenge, it's large
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 10:23:19 +02:00
Wolfgang Bumiller
e1ea913522 more low hanging clippy fruits
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 10:17:14 +02:00
Wolfgang Bumiller
10dac69391 clippy: deal with let bindings
In the auth code we rather #[allow] the binding, because in
this case we explicitly want to assert the type.

In fact, it would make more sense for clippy to not warn
about a unit type if the unit type is explicitly spelled
out.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 10:08:09 +02:00
Wolfgang Bumiller
8e70d421f2 more simpler clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 09:56:03 +02:00
Wolfgang Bumiller
3f7440916f file-restore: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 09:55:43 +02:00
Wolfgang Bumiller
cecb232085 tape: trivial clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 09:55:23 +02:00
Wolfgang Bumiller
9c35483bec tape: 'comparison_chain' clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 09:55:07 +02:00
Wolfgang Bumiller
b8789968e2 client: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 09:26:29 +02:00
Wolfgang Bumiller
1be05037c2 datastore: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 15:26:50 +02:00
Wolfgang Bumiller
4597eedf13 config: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 15:22:09 +02:00
Wolfgang Bumiller
64dc5dbf08 tools: allow type_complexity on purely internal field
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 15:19:20 +02:00
Wolfgang Bumiller
19018f9881 rest-server: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 14:54:44 +02:00
Wolfgang Bumiller
92ead5d3f4 rrd: Entry type and clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 14:54:44 +02:00
Wolfgang Bumiller
f680e72fae api-types: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 13:29:32 +02:00
Fabian Grünbichler
e1db06705e more clippy fixes and annotations
the remaining ones are:
- type complexity
- fns with many arguments
- new() without default()
- false positives for redundant closures (where closure returns a static
  value)
- expected vs actual length check without match/cmp

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-26 14:05:25 +02:00
Fabian Grünbichler
3be9106f1c clippy fixes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-25 16:03:34 +02:00
Wolfgang Bumiller
24fdef9651 bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:43:32 +02:00
Wolfgang Bumiller
8ab1d13140 tfa: allow modifying 'allow-subdomains'
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:39:41 +02:00
Wolfgang Bumiller
5242dcb25e bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 12:03:41 +02:00
Fabian Grünbichler
0f281d6ca2 cargo fmt
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-25 10:03:44 +02:00
Fabian Grünbichler
68fda26787 adapt to proxmox-subscription changes
key location is now in a single place, missing key and no signature is
not fatal anymore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-25 10:03:44 +02:00
Fabian Grünbichler
5616dca6b7 adapt to proxmox-apt change
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-25 10:03:44 +02:00
Fabian Grünbichler
480f1552f8 www: add Signed info to subscription panel
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-25 10:03:10 +02:00
Fabian Grünbichler
da7b6af61c manager: add 'subscription set-offline-key' command
and disallow updating offline subscription keys via the regular
check/update code path.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-25 10:03:10 +02:00
Fabian Grünbichler
dd16e1dac8 extract proxmox-subscription crate
and add support for signed subscription keys.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-25 10:03:07 +02:00
Wolfgang Bumiller
9b3b3c88a9 bump proxmox-http dep to 0.6.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 13:01:14 +02:00
Thomas Lamprecht
c5cd99b15b bump version to 2.2.5-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-18 14:32:49 +02:00
Thomas Lamprecht
c2206e21e0 api daemons: periodically unpark a tokio thread to ensure progress
The underlying issue seems to be the case when the thread that runs
the IO driver is polling its own tasks, while that happens the IO
driver/poller won't run and thus work stealing won't happen, meaning
that idle and parked threads will keep being parked even if there's
pending work they could do.

A promising solution for tokio is proposed in its issue tracker [0],
but it wasn't yet implemented. So, as stop gap spawn a separate
thread that periodically spawns a no-op ready future in the runtime
which would unpark a worker in the aforementioned case and thus
should break the bogus idleness. Choose a 3s period for that without
any overly elaborate reasons, our main goal is to ensure we accept
incoming connections and 3s is well below a HTTP timeout and leaves
some room for high network latencies while not invoking to much
additional wakeups for systems that are really idling.

[0]: https://github.com/tokio-rs/tokio/issues/4730#issuecomment-1147975074

Link: https://github.com/tokio-rs/tokio/issues/4730
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-18 14:11:03 +02:00
Thomas Lamprecht
4f04ecb2f6 fix #4157: docs: fix copy-paste error in repo examples
refer to actually used host/datastore from the example

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-16 11:41:21 +02:00
Thomas Lamprecht
ef719f9a18 bump version to 2.2.4-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-14 18:54:46 +02:00
Thomas Lamprecht
3f6a17b09f proxy: scheduler: only do a single round of time alignment and drop counter
not much value in waiting an extra minute, that doesn't really
guarantees better scheduling (as in, less impact on startup).

Dropping that also allows easily to drop the counter by just moving
the sleep to the beginning of the loop.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-14 18:20:44 +02:00
Thomas Lamprecht
9f7752f2b2 proxy: scheduler: code cleanup/bloat reduction
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-14 18:20:12 +02:00
Thomas Lamprecht
37f9b8cc09 proxy: scheduler: move fallback inside next_minute fn, drops result from return
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-14 17:59:24 +02:00
Thomas Lamprecht
ffe7f58191 docs: buildsys: use wild card target for generating config synopsis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-14 17:56:18 +02:00
Thomas Lamprecht
075add9b3b docs: buildsys: use wild card target for generating synopsis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-14 17:54:16 +02:00
Thomas Lamprecht
96a7169eb8 docs: replace copyright years statement with single source of truth from conf
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-14 16:54:56 +02:00
Thomas Lamprecht
dc7aad4bcc docs: conf: update copyright years
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-14 16:54:56 +02:00
Thomas Lamprecht
c63688e031 docs: epilog: add version dynamically and drop unused AUTHOR replacement
now that the man pages are generated from sphinx, not rst2man, they
got access to the conf.py and things like its rst_epilog variable.

Use that to set the correct version in there dynamically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-14 16:54:56 +02:00
Thomas Lamprecht
ed873dc6a4 docs: let sphinx build man pages for better integration and less cruft
rst2man is only good for use in projects that don't use sphinx
already, as there it can help to avoid bringing in the full sphinx
dependencies and be easier to manage (as long as it stay small).

But we already use sphinx, so there's no point in managing the manual
pages in a separate, semi-related way that is quite restricted as we
have no access to sphinx infrastructure like conf.py defined
variables and helpers for things like the current version.

Besides that, we're rather big, so the complexity of sphinx can
shine, e.g., see the diffstat report from switching out rst2man for
sphinx:

22 files changed, 74 insertions(+), 347 deletions(-)

so 273 lines less in total is rather nice.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-14 16:54:56 +02:00
Stefan Sterz
5b5f18eb38 fix: api2: make tasks endpoint work with new prune job worker type
when prune jobs were refactored, their worker type was changed from
"prune" to "prunejob" this broke `check_job_store` and
`check_job_privs`

as reported in the forum: https://forum.proxmox.com/threads/problem-with-apirequest-on-pbs-2-2-3.112131/#post-483835

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2022-07-14 14:29:32 +02:00