7386 Commits

Author SHA1 Message Date
Andrew A. Vasilyev
9f635919d5 Merge tag 'v3.1.2' 2023-12-04 16:45:48 +03:00
Thomas Lamprecht
d7e95d62e4 bump version to 3.1.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-30 11:56:54 +01:00
Fabian Grünbichler
4cc4ea64fd sync: fix source store+namespace printing
previously this would always refer to the "top" namespace of the source,
instead of properly iterating over the namespace tree. adapt the trait
accordingly, since this was the only call site.

this fixes a cosmetic issue only.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-11-30 11:53:22 +01:00
Fabian Grünbichler
b14e5dcb59 sync: fix recursive remote sync
the snapshot pulling code always selected the "top" namespace of the
source, instead of the passed in namespace parameter.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-30 11:52:39 +01:00
Thomas Lamprecht
1181bd5de8 bump version to 3.1.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-30 11:05:08 +01:00
Dominik Csapak
6ee8e0917d ui: fix deleting datastore without 'keep-job-configs'
without any default value in the viewModel, the resulting url would be:

`<id>?destroy-data=<value>&keep-job-configs=`

which is missing the actual value, so add the default

Fixes: e9979a1a ("ui: add 'keep configs' checkbox to datastore removal window")
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
2023-11-30 10:18:15 +01:00
Thomas Lamprecht
6685122c3b tree-wide: fix various typos
found with codespell

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 18:32:07 +01:00
Thomas Lamprecht
efbd1d488b bump version to 3.1.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 18:02:33 +01:00
Thomas Lamprecht
dc4f8964b5 ui: dashboard: increase panel height a bit
to make the system load/status summary one look less cramped, as that
got recently the boot-mode information line added.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 17:52:19 +01:00
Lukas Wagner
6ef0238f99 server: sync email notification: adapt template for local sync jobs
Add a guard clause that checks `job.remote`, otherwise the template
fails to render to to handlebars being configured in strict mode.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-29 17:36:18 +01:00
Dominik Csapak
ca8cf67187 docs: note that the webui has a show connection information button
so that users know where they can easily copy that information

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-29 17:12:41 +01:00
Dominik Csapak
a662274e69 ui: add fingerprint also to the 'show connection information' window
by globally calling the 'status' api once and saving the fingerprint
into the global Proxmox variable.

since not all users might have that permission, ignore errors for that,
and don't show the fingerprint in this case

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-29 17:12:41 +01:00
Dominik Csapak
4ea89615ae ui: add 'show connection information' button for datastores
this has a similar functionality as the 'show fingerprint' button,
but for repository strings that are needed e.g. for the cli

included with and without the current user for convenience

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: squash in window title rename and iconCls fix for light-mode ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 17:12:41 +01:00
Thomas Lamprecht
f5d5b454a4 ui: datastore content: add menu separator above forget entry
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 17:05:46 +01:00
Wolfgang Bumiller
2f699281c1 fix an unused import warning
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-29 15:34:43 +01:00
Wolfgang Bumiller
10d77d9712 fix variables not needing mut warnings
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-29 15:34:37 +01:00
Gabriel Goller
487922752b ui: dashboard: nicely display kernel version
Extract and display the build version and kernel
release nicely.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-29 15:31:35 +01:00
Gabriel Goller
de99031e49 node: status: declutter kernel-version
Return a struct with all the components of the kernel version like it
has been done in pve. Also return the legacy `kversion` to keep
backwards compat.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-29 15:31:35 +01:00
Gabriel Goller
220f3c1cd9 ui: dashboard: show the bootmode
Shows the bootmode of the instance. Options are Legacy BIOS,
EFI, or EFI(Secure Boot).

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-29 15:31:35 +01:00
Gabriel Goller
1656c53486 node: status: added bootmode
Added field that shows the bootmode of the node. The bootmode is either
Legacy Bios, EFI, or EFI (Secure Boot). To detect the mode we use the
exact same method as in pve: We check if the `/sys/firmware/efi` folder
exists, then check if the `SecureBoot-xx...` file in the `efivars`
directory has the SecureBoot flag enabled.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-29 15:31:35 +01:00
Wolfgang Bumiller
0b5ad8cf89 bump proxmox-sys dependency to 0.5.2
for boot mode info

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-29 15:31:35 +01:00
Thomas Lamprecht
e196f93c3e tree-wide: run cargo fmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 15:22:43 +01:00
Stoiko Ivanov
59a4f80422 pbs2to3: check for proper grub meta-package for bootmode
ported over from pve-manager:
'pve7to8: check for proper grub meta-package for bootmode'
`67c655b9333714f31d5115de80961a2abc4b6506`

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-29 15:22:01 +01:00
Stoiko Ivanov
d1b266ae59 pbs2to3: add check for dkms modules
ported over from pve-manager: 'pve7to8: Add check for dkms modules'
`0329876ccf1d78b848897718bb0c2337c6a55fbb`

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-29 15:21:44 +01:00
Hannes Laimer
6de99d3040 ui: disable rate-limit for local sync jobs
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-29 14:51:53 +01:00
Thomas Lamprecht
00b6152cde manager cli: disk wipe: ask over stdout and drop now useless loop
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 14:51:26 +01:00
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 3940f48c4702136ba2907ed8fc57401a3d930418 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: 9039d6709e375f37bb8a21680f6fefb18ee87ab3
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