Commit Graph

7343 Commits

Author SHA1 Message Date
Friedrich Weber
e8b411f1c5 fix #4474: ui: guest stop: offer to overrule active shutdown tasks
Implement a new "guest stop" confirmation message box which first
checks if there is an active shutdown task for the same guest that is
visible to the logged-in user. If there is at least one, the dialog
displays an additional default-on checkbox for overruling active
shutdown tasks. If the user confirms and the checkbox is checked, the
UI sends a guest stop API request with the `overrule-shutdown`
parameter set to 1. If there are no active shutdown tasks, or the
checkbox is unchecked, the UI sends a guest stop API request without
`overrule-shutdown`.

To avoid an additional API request for querying active shutdown tasks,
check the UI's current view of cluster tasks instead, which is fetched
from the `pve-cluster-tasks` store.

As the UI might hold an outdated task list, there are some
opportunities for races, e.g., the UI may miss a new shutdown task or
consider a shutdown task active even though it has already terminated.
These races either result in a surviving shutdown task that the user
still needs to abort manually, or a superfluous `override-shutdown=1`
parameter that does not actually abort any tasks. Since "stop
overrules shutdown" is merely a convenience feature, both outcomes
seem bearable.

The confirmation message box is now always marked as dangerous (with a
warning sign icon), whereas previously it was only marked dangerous if
the stop issued from the guest panel, but not when issued from the
resource tree command menu.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: squash in some slightly opinionated code/style clean-ups ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-20 20:32:32 +02:00
Thomas Lamprecht
2a5fd75de5 ui: browser local settings: add new edit-notes-on-double-click option
The NotesView in the widget-toolkit learned to respect this opt-out
setting recently.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-20 20:32:32 +02:00
Thomas Lamprecht
409dbc9a5a ui: virtual machines: add Windows Server 2025 to OS types
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-20 20:32:32 +02:00
Stefan Hanreich
a18e436b5d firewall: expose configuration option for new nftables firewall
There's a new firewall implementation available as `proxmox-firewall`
package, in contrast to the existing `pve-firewall` package it is
using nftables directly, not the legacy iptables, and can thus
leverage a modern stack with atomic updates, avoiding the need for
different tools (e.g., ebtables), and not requiring intermediate
firewall bridges to handle VM flow correctly. Additionally it's
written in rust, making it more efficient and safer to change.

The new implementation is using the same configuration file as source
and should be mostly the same in semantic behavior, it basically is a
drop-in replacement besides one known issue:

There is currently one major issue that we still need to solve:
REJECTing packets from the guest firewalls is currently not possible
for incoming traffic (it will instead be dropped).

This is due to the fact that we are using the postrouting hook of
nftables in a table with type bridge for incoming traffic. In the
bridge table in the postrouting hook we cannot tell whether the packet
has also been sent to other ports in the bridge (e.g. when a MAC has
not yet been learned and the packet then gets flooded to all bridge
ports). If we would then REJECT a packet in the postrouting hook this
can lead to a bug where the firewall rules for one guest REJECT a
packet and send a response (RST for TCP, ICMP port/host-unreachable
otherwise).

While this is being addressed, and the whole stack is better tested in
general, the new FW will be only enabled if the admin enables a
boolean configuration which this patch exposes on the UI.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2024-04-19 20:14:47 +02:00
Alexander Zeidler
bbef6b29b1 pveversion: fix whitespaces
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2024-04-19 19:40:42 +02:00
Fiona Ebner
cb1653fdad bump version to 8.1.11
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-04-19 17:18:55 +02:00
Fiona Ebner
96c50c22cc d/control bump versioned dependency for libpve-(guest-)common-perl and qemu-server
to make the backup fleecing feature available. The bump for
qemu-server is also required for moving unused disks of VMs.

The bump for libpve-common-perl is required because of pve-common
commit c302a28 ("json schema: add format description for
pve-storage-id standard option"), which is required for API
verification.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-04-19 17:15:03 +02:00
Fiona Ebner
77266e2961 api: backup/vzdump: add permission check for fleecing storage
Similar to how Datastore.AllocateSpace is required for the backup
storage, it should also be required for the fleecing storage.

Removing a fleecing storage from a job does not require more
permissions than for modifying the job.

Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-04-19 15:57:28 +02:00
Fiona Ebner
98cb465a37 vzdump: handle new 'fleecing' property string
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-04-19 15:57:26 +02:00
Fiona Ebner
f25bcd0673 vzdump: have property string helpers always return the result
Previously, the result would only be returned implicitly and if not
already parsed. While callers do not strictly need the return value,
future callers might mistakenly rely on it and even work by chance in
some scenarios, because of the implicit return. Make the code more
future proof by explicitly returning the result in all cases.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-04-19 15:57:23 +02:00
Lukas Wagner
3941bc7f43 api: notifications: add 'smtp' to target index
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-04-19 12:33:52 +02:00
Fabian Grünbichler
ff019b70b1 pvesh: use SSH command helper
to benefit from future improvements like known host key pinning.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-04-19 09:09:44 +02:00
Fabian Grünbichler
23d1d28307 vnc: use SSH command helper
to benefit from future improvements there, like pinning the known host key.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-04-19 09:09:44 +02:00
Alexander Zeidler
9296b34317 report: list held back packages
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2024-04-18 22:27:05 +02:00
Alexander Zeidler
b7e677d578 report: add apt-cache policy to list recognized APT sources
with their details as well as pinned packages. Omit the "origin"
lines, as their value is already visible in the URLs.

 # apt-cache policy ...
 Package files:
  100 /var/lib/dpkg/status
      release a=now
  500 https://enterprise.proxmox.com/debian/pve bookworm/pve-enterprise amd64 Packages
      release o=Proxmox,a=stable,n=bookworm,l=Proxmox VE Enterprise Debian Repository,c=pve-enterprise,b=amd64
 ...
 Pinned packages:
      intel-microcode -> 3.20231114.1~deb12u1 with priority 1234

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2024-04-18 22:26:59 +02:00
Alexander Zeidler
f4c1565a1b report: fix regex of config filenames
to only match those that are correct/accepted by their software

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2024-04-18 22:26:53 +02:00
Alexander Zeidler
a26e547edb report: create "jobs" section, add jobs.cfg
to recognize temporal correlations with network/load/backup/etc issues

Suggested-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2024-04-18 22:24:13 +02:00
Alexander Zeidler
5148f21a40 report: add kernel command line from current boot
to get a first clue for debugging passthrough and similar issues, when
no dmesg output has been provided yet.

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2024-04-18 22:24:13 +02:00
Fiona Ebner
44e5325e56 ui: acl: group selector: allow search
Makes it consistent with the user selector and token selector.

Requested in the community forum:
https://forum.proxmox.com/threads/144978/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-04-18 22:19:18 +02:00
Thomas Lamprecht
34d63c2ba8 api: apt versions: track optional pve-esxi-import-tools package
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-18 22:15:17 +02:00
Alexander Zeidler
8aeed8d1e8 api: apt versions: track optional amd64/intel-microcode packages
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2024-04-18 22:14:15 +02:00
Thomas Lamprecht
05ca3b6037 d/control: bump versioned b-d for guest-common
so that our replication regression tests work correctly.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-18 10:22:22 +02:00
Fiona Ebner
464449239e Revert "tests: update expected replication log output"
This reverts commit 3a259c22e6.

There was an oversight with recent replication fixes that led to
attempting to remove snapshots that do not exist (in more scenarios).
While not an issue with real consequences, it's confusing to users.
This has since been fixed by pve-guest-common commit "replication:
snapshot cleanup: only attempt to remove snapshots that exist".

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-04-18 10:18:06 +02:00
Folke Gleumes
c18a2db238 ui: acme: add External Account Binding (EAB) related fields
Adds fields for eab credentials. By default eab is optional, but if the
directory should report that eab is required, the eab credential fields
are marked as mandatory and prevent the form from being submittable
until credentials are provided.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 21:16:02 +02:00
Folke Gleumes
fdc4c229ad fix #5093: ui: acme: expose custom directory option
This patch allows the user to set a custom ACME directory by providing
a 'Custom' option in the directory dropdown. This in turn reveals an
input for the url. When using a custom directory the directory has to
be manually queried via button press to prevent from spamming the
directory on every input.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 21:16:02 +02:00
Thomas Lamprecht
3a259c22e6 tests: update expected replication log output
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 21:16:02 +02:00
Friedrich Weber
0a083b4da1 ui: fix typo to make pve-cluster-tasks store globally available
This way, it can be used to retrieve the current list of tasks.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
2024-04-17 20:45:16 +02:00
Fabian Grünbichler
8d47732670 d/postinst: make deb-systemd-invoke non-fatal
else this can break an upgrade for unrelated reasons (regular debhelper also
constructs the restart invocations like this, it even redirects output to
/dev/null)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-04-17 16:56:13 +02:00
Thomas Lamprecht
5abdd1e4e2 ui: backup job: rework advanced empty text and descriptions
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 16:05:24 +02:00
Thomas Lamprecht
cadc57ee38 ui: backup job: make add/edit window wider
it looks a bit tall and cramped nowadays, so go for 720, like the
wizard class uses by default.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 16:05:09 +02:00
Thomas Lamprecht
380bb15265 ui: backup job: avoid calling max-workers VM workers
that could make some users (not reading the explanation on the right
closely) belief that this controls the amount of parallel VMs to be
backed up or the like.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 16:05:09 +02:00
Thomas Lamprecht
a32a5c4a65 ui: backup job: rework hint about fallback config and make it less flashy
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 16:05:09 +02:00
Fiona Ebner
1d777a46c8 ui: backup job: move repeat-missed option to advanced tab
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
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