Commit Graph

7282 Commits

Author SHA1 Message Date
Markus Frank
887d83cb5e cli: add interactive confirmation for block device wipe
If stdin is a TTY, an interactive prompt is added to confirm the deletion
of a block device, ensuring user verification before proceeding.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
2023-11-29 14:26:03 +01:00
Alexander Zeidler
d038ddbe48 docs: remove pointless table title
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-11-29 14:07:49 +01:00
Alexander Zeidler
3c55e416ca docs: add further secure boot information, as in pve-docs
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-11-29 14:07:49 +01:00
Wolfgang Bumiller
d71eb9b353 remove unused code
this was moved to proxmox_router long ago

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-29 13:02:26 +01:00
Hannes Laimer
e9979a1ac6 ui: add 'keep configs' checkbox to datastore removal window
... since the API already accepts a boolean for that.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
[ DC: actually send the option to the api ]
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-29 10:36:08 +01:00
Thomas Lamprecht
13ef537025 Revert "ui: sync job edit: fix showing value for target store upon edit of local sync job"
This reverts commit 3940f48c47 as it's
bogus and was already fixed on master, so that's why testing this
change made it look like it was working now compared to the previous
version.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 08:57:36 +01:00
Fiona Ebner
3940f48c47 ui: sync job edit: fix showing value for target store upon edit of local sync job
when editing a local sync job, the field would be empty because of
this and not be set to the previously configured remote-store.

The binding is already used for the local datastore, not sure why it
should even be applied to the target where it might not even be valid.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-11-28 18:50:04 +01:00
Markus Frank
e0dfdd143c fix #3690: ui: enable wipe-disk feature in system disk view
Set `supportsWipeDisk` to true to enables the wipe button in the web
UI.

The entry for override_task_descriptions is copied from pve-manager.

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>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
2023-11-28 18:39:45 +01:00
Markus Frank
675d5740fc fix #3690: manager cli: add wipe commands to disk group
A new cli subcommand which calls the api wipe_disk function to wipe a
disk/partition with a specified dev name.

Examples:
proxmox-backup-manager disk wipe sda2
proxmox-backup-manager disk wipe sda
proxmox-backup-manager disk wipe nvme0n1p1

The complete_partition_name from tools/disks/mod.rs is used for
command completion.

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>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
2023-11-28 18:25:47 +01:00
Markus Frank
e87deca2f7 fix #3690: api: add endpoint for wipe block devices
An api function similar to PVE wipedisk function that takes a
disk/partition dev name as argument to wipe it in a new WorkerTask
thread.

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>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
2023-11-28 18:25:29 +01:00
Markus Frank
4b1c7e35e9 fix #3690: tools: add helper functions for wiping block devices
The wipe_blockdev & change_parttype functions are similar to
PVE::Diskmanage's wipe_blockdev & change_parttype functions.

The partition_by_name & complete_partition_name functions are
modified disk_by_name & complete_disk_name functions for partitions.

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>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
2023-11-28 18:25:06 +01:00
Markus Frank
1ec643ce92 api types: add regex, format & schema for partition names
The new regex is similar to BLOCKDEVICE_NAME_REGEX but also allows
numbers at the end of the device name (also allows partitions names).
For nvme partitions it also allows the letter p and a number.

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>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
2023-11-28 18:24:12 +01:00
Hannes Laimer
eed57dfce1 ui: fix changing remote to local sync job
Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-28 17:35:21 +01:00
Hannes Laimer
7aeabff238 pull: fix permission checks for local syncs
Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-28 17:35:17 +01:00
Thomas Lamprecht
f74f3cc2d7 ui: update online help info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-28 17:34:56 +01:00
Dominik Csapak
771250a720 ui: datastore content: add context menu to groups and snapshots
and show the relevant actions. They will be forwarded to the controller,
so we can reuse that code without big refactoring them into another
class/place.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-28 15:57:04 +01:00
Alexander Zeidler
50a27d475c docs: fix formatting
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-11-28 14:24:27 +01:00
Alexander Zeidler
1f2014332d docs: s/apt-get/apt due to interactive use
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-11-28 14:23:43 +01:00
Hannes Laimer
fbee479979 ui: fix local sync job edit
... since the store field was cleared when the window opened.

Reported-by: Lukas Wagner <l.wagner@proxmox.com>
Fixes: 9039d6709e
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-28 14:13:35 +01:00
Thomas Lamprecht
7d1085735b bump version to 3.0.5-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-28 12:42:38 +01:00
Thomas Lamprecht
360b7eaa6b cargo: ensure we build with newer rest-server
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-28 12:30:28 +01:00
Thomas Lamprecht
460c3d1619 report: add extra newline between files of directory output
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-28 12:25:01 +01:00
Thomas Lamprecht
5736fa917c report: factor out getting first 30 lines of top output
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-28 12:24:30 +01:00
Alexander Zeidler
c911678b94 docs: sysadmin: add section about Secure Boot
port from pve-docs (mention PBS instead of PVE, fix typos & style)

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-11-28 11:45:31 +01:00
Alexander Zeidler
7ea8407f3d docs: sysadmin: fix hyperlink ID conflicts & visual warning message
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-11-28 11:45:31 +01:00
Wolfgang Bumiller
78fc7b0e94 s/commando/command/
this has always bugged me

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-28 09:51:25 +01:00
Thomas Lamprecht
6c5248fbc6 tree-wide: run cargo fmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-27 15:37:35 +01:00
Maximiliano Sandoval R
dfe17914cf fix-3211: manager: Document --notify argument
Signed-off-by: Maximiliano Sandoval R <m.sandoval@proxmox.com>
2023-11-27 15:33:51 +01:00
Max Carrara
532e7d9522 proxy: redirect HTTP requests to HTTPS
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
2023-11-27 14:48:30 +01:00
Wolfgang Bumiller
e90f3402b6 bump reset-server dep to 0.5
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-27 14:48:30 +01:00
Hannes Laimer
5a667e6101 config: don't allow creation of sync job to same datastore
Reported-by: Gabriel Goller <g.goller@proxmox.com>
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2023-11-27 14:44:26 +01:00
Hannes Laimer
9039d6709e ui: fix sync job initial loading of local datastores
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2023-11-27 14:44:26 +01:00
Stefan Sterz
ad97a7a1aa manager: check if offline subscription is for the correct product
previously when an offline key was set it wasn't verified that the
subscription was for the correct product. while pom only applies
subscriptions for the corresponding products, a user could manually
invoke the `subscription set-offline-key` command to circumvent that.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-11-27 14:13:35 +01:00
Maximiliano Sandoval R
2711e94e3a use IsTerminal trait whenever possible
Continuation of
https://lists.proxmox.com/pipermail/pbs-devel/2023-November/007078.html.

Signed-off-by: Maximiliano Sandoval R <m.sandoval@proxmox.com>
2023-11-27 13:21:45 +01:00
Dietmar Maurer
22b5ae08f3 api: fix API macro for create_namespace.
Description and return-type was wrong.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-11-27 11:55:09 +01:00
Dominik Csapak
dc887e93be tape: library status: don't fail if the library does not support DVCID
some libraries (e.g. Qualstar) don't support the DVCID bit in the READ
ELEMENT (B8) command (to return vendor/model of connected drives), so
make that part optional if it fails. We only ever use the serial number
in the `pmtx` tool, so there is not much downside to not having this.

This increases compatibility with such libraries

Reported in the forum:
https://forum.proxmox.com/threads/cant-query-tape-robot-status.131833/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-27 11:35:36 +01:00
Thomas Lamprecht
c884061623 ui: avoid single-line if in optional-remote renderer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-25 17:13:47 +01:00
Hannes Laimer
535ca853c2 ui: add support for optional Remote in SyncJob
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Tested-by: Gabriel Goller <g.goller@proxmox.com>
2023-11-25 17:07:42 +01:00
Hannes Laimer
4ec733279b api: make Remote for SyncJob optional
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Tested-by: Gabriel Goller <g.goller@proxmox.com>
2023-11-25 17:07:42 +01:00
Hannes Laimer
d1100551fd manager: add completion for opt. Remote in SyncJob
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Tested-by: Gabriel Goller <g.goller@proxmox.com>
2023-11-25 17:07:42 +01:00
Hannes Laimer
076f36ec4e pull: add support for pulling from local datastore
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Tested-by: Gabriel Goller <g.goller@proxmox.com>
2023-11-25 17:07:42 +01:00
Hannes Laimer
05a52d0106 pull: refactor pulling from a datastore
... making the pull logic independent from the actual source
using two traits.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Tested-by: Gabriel Goller <g.goller@proxmox.com>
2023-11-25 17:07:42 +01:00
Hannes Laimer
09683f1290 accept a ref to a HttpClient
... since the functions don't actually need to own the value.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Tested-by: Gabriel Goller <g.goller@proxmox.com>
2023-11-25 17:07:42 +01:00
Thomas Lamprecht
8f49d60330 docs: use full subdomain link for main website
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-25 16:21:54 +01:00
Thomas Lamprecht
24f3c5516c docs: update copyright years
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-25 16:21:23 +01:00
Thomas Lamprecht
1ae2a84aed docs: specifiy that the PBS wiki is meant in the sidebar link
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-25 16:21:09 +01:00
Alexander Zeidler
f8c78d84a1 docs: replace path list with table for better readability
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-11-25 16:14:44 +01:00
Alexander Zeidler
9aa8df5b05 docs: fix typos
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-11-25 16:14:44 +01:00
Alexander Zeidler
2e83c6001c docs: pbs2to3: fix and improve wording
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-11-25 16:14:44 +01:00
Alexander Zeidler
160f917337 docs: epilog: update hyperlinks
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-11-25 16:14:44 +01:00