Commit Graph

7327 Commits

Author SHA1 Message Date
Dominik Csapak
5f9bdaecf3 docs: tape: replace 'export-media' with 'export-media-set'
there is no 'export-media' option, only 'export-media-set'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-12-13 12:23:36 +01:00
Dominik Csapak
667ec4a3c2 tape: fix 'eject-before-unload' api type
by converting the bool into an option, otherwise having the options not
set at all will fail the unload while deserializing with
'eject-before-unload is not optional'

Also if we can automatically decide this in the future, we can now
detect if the option was explicitely set or not.

Fixes: 66402cdc ("fix #4904: tape changer: add option to eject before unload")
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-12-13 12:14:33 +01:00
Dominik Csapak
66402cdc1b fix #4904: tape changer: add option to eject before unload
some tape libraries need the tape being ejected from the drive before
doing an unload. Since we cannot easily detect if that's the case,
introduce an 'eject_before_unload' option.

Instead of just adding a bool flag to the config, add a new 'options'
property string where we can put such niche options similar to how we
handle the datastore tuning options.

Extend the LtoTapeHandle with 'medium_present' which just uses a
TEST UNIT READY command to check for present medium, so we don't
try to eject an already ejected tape.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-12-12 14:36:19 +01:00
Dominik Csapak
d555c3839b tape: changer: save whole LtoTapeDrive config in MtxMediaChanger
we'll need more info from there in the future, so derive clone for it
and save the whole config instead of adding an additional field.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-12-12 14:36:08 +01:00
Dietmar Maurer
9c1c0780c2 tape: derive Debug for ElementType (fix previous commit)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2023-12-12 14:21:24 +01:00
Dominik Csapak
24bfaa646e tape: improve error on decode element status page
instead of wrapping the function body in a 'try_block', simply move the
map_err to the only call site, where we can even add more context than
in the function itself.

aside from better error output, no functional change intended

this could help in debugging cases like this issue reported in the forum:
https://forum.proxmox.com/threads/137391/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-12-12 13:59:25 +01:00
Dominik Csapak
47da06beed api: tape: add lto9 initialization message to task log
so that it's clear that this operation can take a while

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-12-12 13:33:00 +01:00
Dominik Csapak
0b1a30aa39 tape: adapt format_media for LTO9+
starting with LTO9, a FORMAT(04h) command also reinitializates the tape,
which can take up to tw hours. Since we don't actually want to do that
every time we format, use 'erase_media' when we want a fast erase.
(On a slow erase, we let it run and wait until the drive is ready
again).

The users have to pre-initializate the tapes before using it for them to
work properly though.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-12-12 13:32:30 +01:00
Dominik Csapak
70706fc9f6 tape: derive PartialEq and PartialOrd for TapeDensity
so that we can compare more easily

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-12-12 13:24:58 +01:00
Dominik Csapak
ee6c5560a8 tape: add optional timeout to wait_until_ready
instead of hardcodign the default timeout as only option. This will come
in handy when we need to wait for LTO9+ initialization that can take up
to two hours.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-12-12 13:24:43 +01:00
Gabriel Goller
cbb478fa19 status: use Option on avail/used datastore attrs
Instead of returning -1 if we can't get the attributes, we use an
Option which will not be serialized on `None`.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2023-12-11 13:09:13 +01:00
Gabriel Goller
0cac699e0c ui: datastore summary handle non-existent values
Correctly display missing 'avail' and 'used' attributes in the
datatstore summary. This simply sets it to 0, so that we don't get any
errors in the console.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2023-12-11 13:08:51 +01:00
Wolfgang Bumiller
1e3ed74be5 api-types: add a missing serde(default)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-06 15:53:57 +01:00
Wolfgang Bumiller
53fc0e97e4 bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-06 13:22:17 +01:00
Wolfgang Bumiller
67cb8f4351 fixup comment and condition readability
(not macro specific)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-06 12:58:10 +01:00
Folke Gleumes
54ddd689ab cli: acme: add possibility to set eab via the cli
If the ca demands external account binding credentials, the user will be
asked for them. If a custom directory is used, the user will be asked if
eab should be used.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
2023-12-06 12:45:40 +01:00
Folke Gleumes
6aeb96e708 acme: api: add eab options to api
Optionally allow for setting external account binding credentials at the
account registration endpoint.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
2023-12-06 12:45:38 +01:00
Wolfgang Bumiller
92fcc4c3cd update to proxmox-acme 0.5
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-06 12:45:35 +01:00
Wolfgang Bumiller
7fb5bd39e2 tools/disks: skip lsblk for partition check
We already have a 'Disk' which has a udev 'Device' which we can query
directly.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-01 09:52:08 +01:00
Wolfgang Bumiller
7dddf742b8 add partition entry value getters to Disk
The ID_PART_ENTRY_* values describe what kind of partition this is and
thus can be used to implement the `.is_partition()` method which we
use in the next patch to avoid calling out to `lsblk`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-01 09:47:55 +01: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