Commit Graph

7208 Commits

Author SHA1 Message Date
Thomas Lamprecht
462077df42 docs: set latex table style to modern default
The option was introduced for sphinx 5.0, but back then still using an
empty set as default value, but since (for us still future) 6.0 the
default will be ['booktabs', 'colorrows'], which looks better so use
it now already.

https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-latex_table_style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-08 12:33:47 +01:00
Thomas Lamprecht
304a6df251 docs: storage tuning: fix indentation for code-block in list
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-08 12:32:23 +01:00
Thomas Lamprecht
52c89be602 docs: cope with removal of language=None in Sphinx 5.0.0
avoid a few ugly errors that we get here since basing of the Debian
Bookworm release, which is the first to ship a sphinx version newer
than 5.0, which removed support for allowing None as language [0]

[0]: https://www.sphinx-doc.org/en/master/changes.html#release-5-0-0-released-may-30-2022

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-08 12:12:55 +01:00
Thomas Lamprecht
b0d1c3fff4 docs: introduction: fix mailing list variable name
Fixes: db10278b ("docs: exand PBS to Proxmox Backup (Server)")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-08 11:57:41 +01:00
Thomas Lamprecht
3ad21f22db docs: cert management: fix heading syntax
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-08 11:57:41 +01:00
Markus Frank
e86549f376 ui: add Remove button for DirectoryList
With this patch it is possible to remove systemd mount units via the webui.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-07 10:32:05 +01:00
Markus Frank
6985732012 cli: add option to remove systemd mount unit
add commandline option for api function:
DELETE /api2/json/nodes/{node}/disks/directory/{name}

$ proxmox-backup-manager disk fs delete <datastoreid>

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-07 10:31:59 +01:00
Thomas Lamprecht
e5dc7fef05 ui: system config: fix leading whitespace in translation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-29 13:18:53 +01:00
Thomas Lamprecht
122179414c system report: record stderr output too
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-26 18:00:44 +02:00
Thomas Lamprecht
c55884d1a7 system report: factor out getting command output into helper fn
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-26 17:19:48 +02:00
Thomas Lamprecht
3b5cb8fd33 system report: add proxmox-boot-tool status output
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-26 17:15:06 +02:00
Thomas Lamprecht
49d465c72a system report: add basic uptime, usage and process info
Command is copied over from Proxmox VE

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-26 17:14:45 +02:00
Thomas Lamprecht
2f7b3e2ecc system report: add all apt repo files
note, we do not filter by *.list or *.source, so one might get also
files that apt won't read, like .dpkg-dist files, but also those with
typos, and thus possibly helpful when debugging things.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-26 17:14:45 +02:00
Thomas Lamprecht
0b9614d5a4 system report: support outputting all files in a directory
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-26 17:14:45 +02:00
Thomas Lamprecht
eb32373e3c system report: group files by categories
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-26 14:42:41 +02:00
Thomas Lamprecht
20875de2ec system report: switch to markdown-like output
allows one to render this via any of the thousands markdown viewers to
get a better formatting.

We can switch our web ui widget to (optionally) render this as html
when a user is viewing it from the UI too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-26 14:42:41 +02:00
Thomas Lamprecht
11c4632bcf system report: output ldap and oidc realm list
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-26 12:31:44 +02:00
Thomas Lamprecht
84fb190ee2 system report: add more information to lsblk
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-26 11:32:27 +02:00
Max Carrara
722b7bf7ac fix #4779: client: add missing "Connection" header for HTTP2 upgrade
This commit adds the missing "Connection: upgrade" HTTP header [1]
when requesting an upgrade to HTTP 2.
Doing so is mandated in the HTTP Semantics RFC [2], and without this,
(reverse) proxies that strictly follow the standard could potentially
break.

[1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Upgrade
[2]: RFC 9110, 7.8. Upgrade: “[...] sender of Upgrade MUST also send
     an "Upgrade" connection option in the Connection header [...]”

Reported-By: McTwist <rajb89@hotmail.com>
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
 [ TL: added RFC reference and use case to commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-19 16:47:49 +02:00
Gabriel Goller
e9c18590f5 datastore: catalog: added lifetime to find function
Added lifetime to `find` function. We need this lifetime
because of the `impl MatchList` and 'anonymous lifetimes in
`impl Trait` are unstable'.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2023-10-19 11:13:27 +02:00
Wolfgang Bumiller
3a38717de9 bump pathpatterns to 0.3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-10-19 11:12:35 +02:00
Thomas Lamprecht
12390c91d3 client: forget snapshots: function signature returns no value
Switch from serde_json::Value to an empty tuple, to not suggest this
actually returns a value from the API other than a possible error.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-18 11:04:37 +02:00
Philipp Hufnagl
a2a66a6103 fix #4971: client: Improve output on successful snapshot deletion
When a snapshot gets deleted (forgotten), the proxmox backup client
currently returns returns
"Result: {
  "data": null
}"

This feedback may confuse users therefore this patch removes the output.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
2023-10-17 18:37:30 +02:00
Dietmar Maurer
3b7a6b25c1 TrafficControlCurrentRate: derive Clone and PartalEq (for GUI)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-10-15 11:09:42 +02:00
Dietmar Maurer
1a1870ba86 move TrafficControlCurrentRate to pbs-api-types
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-10-15 11:07:58 +02:00
Dietmar Maurer
13984bd1bc TrafficControlRule: derive Clone and PartialEq (for GUI) 2023-10-15 09:25:26 +02:00
Thomas Lamprecht
24323c0903 ui: update generated OnlineHelpInfo map
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-13 17:22:19 +02:00
Thomas Lamprecht
fb7c608112 ui: renamed pmx-faded to pmx-opacity-75
"Nomen est omen" and go for three quarter while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-13 17:17:32 +02:00
Philipp Hufnagl
ba558d105f fix #4260: ui: fallback to note of last snapshot for backup group comment
When there is no comment for a backup group, the comment of the last
(most recent) snapshot in this group will be shown as dimmed text, as
long as the back group is collapsed.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
2023-10-13 16:58:06 +02:00
Dietmar Maurer
247ae35019 Interface: add missing serde skip_serializing_if to bond_xmit_hash_policy
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-10-12 12:39:18 +02:00
Dietmar Maurer
8192c9ea56 Interface: fix deserialize (add default)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-10-11 11:38:01 +02:00
Dietmar Maurer
9c73fcf3cf Interface: derive Clone + PartialEq (for GUI)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-10-11 11:37:15 +02:00
Dietmar Maurer
4a33ad1ca5 move MetricServerInfo definition to pbs-api-types
And derive Clone, Eq and Ord so that we can sort the list in the GUI.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-10-09 08:19:08 +02:00
Dominik Csapak
344db2d6f6 ui: tape restore: fix default namespace mapping
the ui shows the default 'root' namespace as target, but this only
worked when no namespace was selected. as soon as one source datastore
had a target namespace selected, the others datastores would be
skipped as there was no namespace mapping for them. To fix that, we
simply send a default namespace mapping for each source datastore
without a target (no target means 'root')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
2023-10-03 13:17:18 +02:00
Stefan Lendl
4745c2bd3f Add build outputs to .gitignore
Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
2023-10-03 13:13:03 +02:00
Fabian Grünbichler
6ee22cdd41 build: remove references to proxmox-backup-debug package
this only existed for a week ~2 years ago[0], making those two variables empty.

0: removed in 67d00d5c0e

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-03 11:18:25 +02:00
Fabian Grünbichler
7e4bdedb68 bump version to 3.0.4-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-03 09:58:30 +02:00
Fabian Grünbichler
61ce19cb7f update to env_logger 0.10
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-02 10:18:14 +02:00
Dietmar Maurer
6d33fb6fe3 pbs-api-types: move node status types from src/api2/types/mod.rs
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-09-28 08:13:30 +02:00
Thomas Lamprecht
3b60974218 d/changelog: fix typos
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-27 18:34:59 +02:00
Thomas Lamprecht
def26e3df2 bump version to 3.0.3-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-27 18:20:02 +02:00
Thomas Lamprecht
c5e54a5dca client: task polling: rework code to be slightly more readable
the match-arms let one follow the different branches easier than the
relatively crowded if-condition it replaces.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-27 18:14:59 +02:00
Gabriel Goller
af7b07479b client: do exit with failure code when task finished with warnings
Warnings in the task log/state normally means that the task actually
did its main job, but there was some detected (potential) issue that
the users should be made aware of. Exiting with an error code in that
case would be a bit odd.

While just exiting with success might not be the best solution either,
it's definitively more correct than a failure-exit-code, so go for
that for now as a stop-gap.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
 [ TL: rebased on current master (v3 was already applied) and rewrite
   commit message accordingly ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-27 18:09:40 +02:00
Gabriel Goller
48fbce07df fix #4895: scheduled jobs: ignore task-log not found error
Use the job start-time as end-time when it's stuck in the
`JobState::Starting` state, no active working is running and the task
log of the last run doesn't exists.

A user experienced a power loss, which left a GC job in the `Started`
state, but the task log did not exist. This breaks the schedule and no
following GC runs. Now, the error is simply ignored and a new gc job
is started on the next occurrence.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2023-09-27 17:31:22 +02:00
Gabriel Goller
9d1ba51de7 fix #4823: datastore: ignore vanished files when walking directory
When walking through a datastore on a GC run, it can
happen that the snapshot is deleted, and then walked over.
For example:
- read dir entry for group
- walk entries (snapshots)
- snapshot X is removed/pruned
- walking reaches snapshot X, but ENOENT
Previously we bailed here, now we just ignore it.
Backups that are just created (and a atomic rename from
tmpdir happens, which might triggers a ENOENT error) are
not a problem here, the GC handles them separately.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2023-09-18 16:42:39 +02:00
Gabriel Goller
bc0735fee7 fix #4343: updated view_task_result to bail on task failure
Now we make an additional request on `api2/json/.../tasks/{upid}/status` to
get the `exitstatus` of the task. This allows us to `bail` and thus
get a non-zero exit code in the cli.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2023-09-18 16:40:02 +02:00
Gabriel Goller
2aae8544b7 close #3777: Add source information to backup logs
This will show the ip-address of the client creating
the backup in the logs. For example it will output:
"starting new backup on datastore 'test1' from ::ffff:192.168.1.192:
"host/test/2023-08-21T07:28:10Z"".

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2023-09-18 16:36:31 +02:00
Fabian Grünbichler
8fcd709cf2 gc: improve lost+found comment
this sounded like we need to skip lost+found to avoid pruning too many chunks,
while the opposite is true - it's safe to skip lost+found on EPERM without
pruning too many chunks, but this is not the case for all EPERM situations..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-09-12 11:29:11 +02:00
Hannes Laimer
0d69dcb497 gc: fix ignoring if lost+found can't be accessed
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>

Fixes: e2516f61a860eae59395a3a990d9abe4c445ce8c
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-09-12 11:26:36 +02:00
Thomas Lamprecht
5b16dffcf2 datastore: list images: reduce indentation depth on error checking
Simply pull out the inner IO error and the affected path first.

Clean up style-wise a bit while touching this anyway, but no semantic
change intended.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-08 11:05:10 +02:00