Commit Graph

7360 Commits

Author SHA1 Message Date
Fiona Ebner
9f2b84be01 ui: backup job: disable zstd thread count field when zstd isn't used
Also need to check for enable/disable of the compression selector,
because with PBS the value zstd is set, but the thread count setting
doesn't apply.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 16:05:09 +02:00
Fiona Ebner
bb4741c7e9 close #4513: ui: backup job: add tab for advanced options
pigz is not exposed, because it only works after manually installing
the pigz package.

ionice is not exposed, because it only works in combination with the
BFQ scheduler and even then not in all cases (only affects the
compressor when doing snapshot/suspend mode backup of a VM).

The pbs-entries-max performance option is not exposed. It is rather
niche and hard to understand. It serves as an escape hatch for
rare/extreme cases.

These can still be added with appropriate notes if there is enough
user demand.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 16:05:09 +02:00
Fiona Ebner
097fe04599 vzdump: use per-property fallback for performance settings
Currently, fallback for the 'performance' option is done as a whole,
taking away flexibility from the user. It also means that when only
one of the two sub-properties is specified, the other one will default
to the backend (i.e. QEMU or proxmox-backup-client) default rather
than the schema default. For the latter point in particular, it can be
argued to be incorrect. These limitations will only get worse in the
future with more sub-properties.

Switch to a per-property fallback mechanism to improve the situation,
having each go through the usual preference order (CLI/job > node-wide
default > schema default).

Technically, this is a breaking change, but pbs-entries-max is rather
new and potential for breakage seems rather low. Requirements for
breakage:
* job (or CLI) that defines only one of the performance options
* job also covers a guest where the other performance option applies
* the other performance option is defined in the node-wide configuration
* the node-wide setting is worse for the job than the implicit backend
  default (because this change will have the node-wide default win over
  the implicit backend default).

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 16:05:09 +02:00
Fiona Ebner
693b10f282 vzdump: actually honor schema defaults for performance
The 'performance' option itself defines no 'default' in the schema, so
what happened is that the defaults used by the backends (i.e. QEMU and
proxmox-backup-client) would be used. Luckily, they correspond to the
default values defined in the schema, i.e. in the 'backup-performance'
format. Make the code future-proof and use the actual defaults defined
in the schema instead of relying on that correspondence.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 16:05:09 +02:00
Thomas Lamprecht
70480c37b1 ui: backup job: code clean-up the add/edit window creation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 16:05:09 +02:00
Thomas Lamprecht
8aa6394eb3 ui: lxc: dev passthrough: rework labels
try to make it more clear that the file UID/GID/mode are for the
device file node inside the CT

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 11:53:22 +02:00
Thomas Lamprecht
891877c221 ui: lxc: dev passthrough: drop bogus type config from textfield
this does nothing here, would have to be a vtype to make sense

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 11:52:40 +02:00
Thomas Lamprecht
7ad9d0ca56 ui: lxc: dev passthrough: allow translating validation errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 11:52:07 +02:00
Thomas Lamprecht
80894c0277 ui: lxc: keep passthrough ID internal for now
this is not like mount points, where the order can make a difference,
but rather like the PCI passthrough for VMs, for which we do not
expose editing the ID either.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 11:33:56 +02:00
Thomas Lamprecht
d21fdb3451 ui: lxc: do not righ-align labels
This is totally out of line with the rest of the UI and looks quite
odd...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 11:18:59 +02:00
Thomas Lamprecht
3b8f2efc4e ui: lxc: fix maximum ID boundary for device passthrough
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 11:13:55 +02:00
Thomas Lamprecht
8543ed339f ui: lxc: pass full property name to for-each dev & mountpoint helpers
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 10:59:33 +02:00
Filip Schauer
4c406fedbd ui: lxc: add edit window for device passthrough
Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
2024-04-17 10:51:21 +02:00
Filip Schauer
3f40e12139 utils: clarify naming of LXC mount point utils
Clarify the naming of mount point utils to clearly indicate their
relation to LXC containers.

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
2024-04-17 10:51:21 +02:00
Christian Ebner
638e391e0d ui: lxc: add firewall log view filtering
Allow to filter firewall logs analogous to node and VM firewall logs.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2024-04-15 16:07:50 +02:00
Stefan Hanreich
9b361c6a9d firewall: properly detect changes when ip / cidr is used in rule
With the current implementation using queryDelay, this means that the
change event for the input never completes. This in turn leads to
the input panel never changing its dirty status. By using the
beforequery event we can simply cancel the query without resorting to
the queryDelay hack.

Reported-By: Mira Limbeck <m.limbeck@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
Reviewed-by: Mira Limbeck <m.limbeck@proxmox.com>
2024-04-12 14:12:43 +02:00
Stefan Hanreich
5ffedd2e87 fix #4963: firewall: fix editing firewall rules using ips / cidrs
fall back to using v.ref as value when we do not have an alias or ipset
since scope and name are not set for ips / cidrs

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by: Filip Schauer <f.schauer@proxmox.com>
Reviewed-by: Mira Limbeck <m.limbeck@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
2024-04-12 14:12:43 +02:00
Filip Schauer
bbffc765ea Allow moving unused disks to another storage
Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
2024-04-12 11:50:03 +02:00
Fabian Grünbichler
b76dc13ba5 postinst: move dir creation to helper
and guard it to only run on ceph-using systems (the regular 'inited' check
doesn't work as a guard for this, because it checks for new-style inits
including the dir existing).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-04-11 14:56:16 +02:00
Fabian Grünbichler
85c14e2826 postinst: remove blank lines
it looks confusing in `apt ..` output

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-04-11 11:56:10 +02:00
Fabian Grünbichler
59dd868c1f d/control: depend on pve-storage with new ceph parser
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-04-11 11:55:47 +02:00
Fabian Grünbichler
2ff48ca76c postinst: replace placeholder with actual version
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-04-11 10:55:35 +02:00
Max Carrara
70b800e944 bin/make: gather helper scripts in separate variable
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Friedrich Weber <f.weber@proxmox.com>
2024-04-11 10:42:11 +02:00
Max Carrara
11edd5d88d fix #4759: ceph: configure ceph-crash.service and its key
Due to Ceph dropping privileges when running the 'ceph-crash' daemon
[0], it is necessary to allow the daemon to authenticate with its
cluster in a safe manner.

In order to avoid exposing sensitive keyrings or somehow escalating
its privileges again, 'ceph-crash' is therefore provided with its own
keyring in the '/etc/pve/ceph' directory. This directory, due to being
on 'pmxcfs', may be read by members of the 'www-data' group, which
'ceph-crash' is made part of [1].

Expected Configuration
----------------------

 1. A keyring file named '/etc/pve/ceph/ceph.client.crash.keyring'
    exists
 2. A section named 'client.crash' exists in '/etc/pve/ceph.conf'
 3. The 'client.crash' section has a key named 'keyring' which
    references the keyring file as '/etc/pve/ceph/$cluster.$name.keyring'
 4. The 'client.crash' section has *no* key named 'key'

New Clusters
------------

The keyring file is created and the conf file is updated after the first
monitor has been created (when calling `pveceph mon create`).

Existing Clusters
-----------------

A new helper script creates and configures the 'client.crash' keyring in
`postinst`, if:
 * Ceph is installed
 * Ceph is initialized ('/etc/pve/ceph.conf' and '/etc/pve/ceph' exist)
 * Connection to RADOS is successful

If the above conditions are met, the helper script ensures that the
existing configuration matches the expected configuration mentioned
above.

The configuration is not changed if it is already as expected.

The helper script may be called again manually if the `postinst` hook
fails. It is installed to '/usr/share/pve-manager/helpers/pve-init-ceph-crash'.

Existing `client.crash` Key
---------------------------

If a key named 'client.crash' already exists within the cluster, it is
reused and not regenerated.

[0]: https://github.com/ceph/ceph/pull/48713
[1]: https://git.proxmox.com/?p=ceph.git;a=commitdiff;h=f72c698a55905d93e9a0b7b95674616547deba8a

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Friedrich Weber <f.weber@proxmox.com>
2024-04-11 10:42:11 +02:00
Max Carrara
a51a28e3cd ceph: introduce '/etc/pve/ceph'
This commit adds the '/etc/pve/ceph' directory to our overall expected
Ceph configuration.

This directory is meant to store cluster-wide, non-private
configuration files used by Ceph applications and services that are
executed with lower privileges, such as 'ceph-crash.service'.

The existence of the directory is now also checked for when checking
whether Ceph is configured correctly. This makes it easier for our
other tooling to rely on the directory's existence, reducing the
number of otherwise needless frequent checking.

* For new clusters: `pveceph init` now creates '/etc/pve/ceph' when
  called.

* For existing clusters: The 'postinst' hook this commit adds ensures
  that '/etc/pve/ceph' is created when updating.

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Friedrich Weber <f.weber@proxmox.com>
2024-04-11 10:42:11 +02:00
Stefan Hanreich
0cc99840e0 sdn: evpn: allow empty primary exit node in zone form
its broken since the change in semantics of the PUT endpoint [1]

[1] https://git.proxmox.com/?p=pve-network.git;a=commit;h=3e3cafabaf955d53c4c2d4e346bf5c3a5c6d1852

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Originally-by: Alexandre Derumier <aderumier@odiso.com>
2024-04-08 18:00:49 +02:00
Thomas Lamprecht
4b06efb5db bump version to 8.1.10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-28 19:57:10 +01:00
Thomas Lamprecht
a3be01c6ea guest import: allow setting VLAN-tag
can be a requirement for live-import to make sense

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-28 19:56:11 +01:00
Thomas Lamprecht
71ba92b1c9 bump version to 8.1.9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-28 18:12:50 +01:00
Thomas Lamprecht
302f0d083d fix #5337: ui: parse a port in the server field
Based on how we handle this for PBS but without the hidden fields,
which do not really make this simpler, at least not if the logic is
only required on creation due to the field being only editable then.

As example, if the port of the ESXi host would be 8080, one would
enter `192.168.1.2:8080` for an IPv4 address or `[2001:db8::42]:8443`
for an IPv6 one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-28 18:07:31 +01:00
Thomas Lamprecht
f2be47a4c5 node: wake-on-lan: document defaults and small style clean-up
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-28 17:52:25 +01:00
Christian Ebner
a967ff655f fix #5255: node: wol: configurable broadcast address
Allows to configure a custom broadcast address to use when sending a
wake on lan packet to wake a remote node.

Default behaviour remains to fallback to 255.255.255.255.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2024-03-28 17:27:47 +01:00
Christian Ebner
869c155c6a fix #5255: node: wol: add optional bind interface
Allows to optionally configure a local interface name to which to
bind to when sending a wake on lan packet to wake a remote node.

Default behaviour remains to send the packet via the interface for
the default gateway.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2024-03-28 17:27:47 +01:00
Christian Ebner
3f83a0332e node: config: make wakeonlan a property string
Moves the wakeonlan property to be a property string, with current mac
address as default key. This allows to later add further optional
properties such as bind-interface and broadcast-address.

Adds the `get_wakeonlan_config` helper function to parse the string
when read from the node config.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2024-03-28 17:27:47 +01:00
Thomas Lamprecht
0bd4061da8 ui: guest import: separate disk mapping and rendering cleanly
handle mapping purely in the change handler for the prepare-for-virtio
checkbox and avoid any such mapping logic in the renderer, while
slightly longer the code is much easier to reason about.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-28 17:25:36 +01:00
Thomas Lamprecht
ddb5a882b4 ui: guest import: avoid using "grid" as variable name for a window view
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-28 17:22:24 +01:00
Thomas Lamprecht
8f02fa4307 ui: guest import: actually copy vmconfig state before applying values
Otherwise changes will persist, e.g., disabling a CDROM drive won't
work if the values got assembled for the "Resulting Config" tab
before. Same for the "Prepare for VirtIO" checkbox, there one got the
disk twice, once as (old) mapped SATA and once as (original) SCSI.

To fix this do not work on a reference of the original VM config, but
rather always copy that to a new object before applying the form
values.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-28 17:15:42 +01:00
Thomas Lamprecht
d29041d9f8 bump version to 8.1.8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 14:36:05 +01:00
Thomas Lamprecht
d5336b9e2b d/control: bump versioned dependencies for libpve-storage-perl
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 14:36:05 +01:00
Thomas Lamprecht
b0a9a170d4 guest import: validate that selected VMID does not exist yet
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 14:31:34 +01:00
Thomas Lamprecht
549bffb7bb guest import: fine tune icons
We switched the storage browser navigation entry to 'Virtual Guests'
recently, but still used the icon for import.

For now switch to use to the one for VMs for this entry, matching the
label, and use the import icon for the "Import" button instead.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 12:44:41 +01:00
Thomas Lamprecht
e4ebc552df ui: guest import: use box-label style for prepare-for-virtio checkbox
Aaron originally designed the new "unique MAC address" checkbox after
this one for alignment reasons [0]. I changed it and argued that's
fine if there is a misalignment between those components [1], which I
still think, but tbh. I also like the boxLabel more for the "Prepare
for VirtIO" checkbox, so lets use it there too and hope all are happy
again.

[0]: https://lists.proxmox.com/pipermail/pve-devel/2024-March/062411.html
[1]: https://lists.proxmox.com/pipermail/pve-devel/2024-March/062412.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 11:45:32 +01:00
Thomas Lamprecht
c8c53aa413 ui: guest import: fix internal name for the prepare-for-virtIO feature
Mapping to SATA is only one thing it does, and what we actually want
to do is preparing for VirtIO, the effects are implementation detail,
so name it after the reason not one specific step.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 11:45:26 +01:00
Thomas Lamprecht
74a2419530 ui: network card selector: add Intel E1000E as choosable model
it's popular in VMware ESXi and so should be available to choose
directly, avoiding a invalid model field in the import wizard.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 11:39:24 +01:00
Thomas Lamprecht
911a62c592 ui: guest import: avoid one indentation level in deeply nested widget tree
best viewed with git show --ignore-space-change

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 10:50:41 +01:00
Thomas Lamprecht
2d101e4539 ui: guest import: use view-model for unique-mac-addr state
Avoid some global widget config to store internal state, rather use
the existing viewModel for that.

Also avoid unnecessary references and switch to a boxLabel, drop also
the tooltip, as that doesn't add much here where the effect can be
seen in the grid.

Avoid reconfiguring all grids if only the network one can have changed
due to a change of this check box value.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 10:36:03 +01:00
Aaron Lauterer
d71556966f ui: guest import: allow setting mac addresses to unique
by adding a new checkbox and render the grid accordingly.

If unique MAC addresses are enabled, set them to undefined when getting
the values from the grid.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2024-03-27 08:46:14 +01:00
Wolfgang Bumiller
8e460b76be ui: parser: recognize e1000e as network card
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-26 11:18:12 +01:00
Thomas Lamprecht
bbbaf45d62 bump version to 8.1.7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-22 16:08:20 +01:00
Thomas Lamprecht
a2ae3c5011 d/control: bump versioned deps for widget-toolkit and access-control
to ensure the new password confirmation API and UI is available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-22 16:08:20 +01:00