Commit Graph

7061 Commits

Author SHA1 Message Date
Aaron Lauterer
38fa08d074 api: osd: destroy: remove mclock max iops settings
Ceph does a quick benchmark when creating a new OSD and stores the
osd_mclock_max_capacity_iops_{ssd,hdd} settings in the config DB.

When destroying the OSD, Ceph does not automatically remove these
settings. Keeping them can be problematic if a new OSD with potentially
more performance is added and ends up getting the same OSD ID.

Therefore, we remove these settings ourselves when destroying an OSD.
Removing both variants, hdd and ssd should be fine, as the MON does not
complain if the setting does not exist.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-11-17 08:09:15 +01:00
Alexandre Derumier
5caa663f3e ship default link config to disable systemd link mac-policy
since debian 11, systemd is changing behaviour of MAC address of
bridge, but also bond, where the mac is generated randomly instead
inherit from the first slave.

We tried to fix that with ifupdown2, but that seems to produce some
regressions and independent of that there was still another problem.
Namely, if a bridge don't have any slaves, systemd is keeping bridge
offline.

https://www.justinsteven.com/posts/2023/03/26/virtualbox-bridge-ports-none-no-carrier-debian-11/

That mean that a dhcp daemon like kea can't bind on a standalone
bridge (used for s-nat for example), until a tap interface is started.

So, set up a systemd link config to disable the systemd mac policy by
default (this don't break already fixed ifupdown2 mac).

Funnily CentOS && Fedora also disable it already:
https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none
c895351950/0028-udev-net-setup-link-change-the-default-MACAddressPol.patch (L43)

Before this patch:
```
~ ip a sh dev vmbr1
vmbr1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 10
```

After this patch:
```
~ ip a sh dev vmbr1
vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
```

Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
 [ TL: move to /usr/lib/.. where distro files belong and add comment ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-15 11:29:29 +01:00
Thomas Lamprecht
51fcf81434 d/control: bump versioned dependencies for proxmox-widget-toolkit to 4.1.0
to ensure new combo grid default value and firewall log (date time
range stuff) is available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-14 14:57:16 +01:00
Dominik Csapak
108a99ef15 ui: don't set the default value of combogrids to []
the combogrid sets the default itself correctly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-14 14:56:11 +01:00
Dominik Csapak
574a6da6b9 ui: don't set the default value of combogrids to ''
the combogrid does that itself already

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-14 14:56:11 +01:00
Dominik Csapak
6cfe65ff2e ui: ipset: make ip/cidr required
it is in the backend, so make it required in the gui too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-14 14:56:11 +01:00
Fabian Grünbichler
e337b2948b apt: use apt changelog for changelog fetching
support for it got added to Proxmox repositories, so there is no need to use
custom logic and manual fetching for this anymore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-11-14 09:28:41 +01:00
Thomas Lamprecht
a8d1bc80b5 ui: ceph status: rename working state into busy
Working could be confused with "being ok", which isn't what we want to
convey here, as the lack of this status doesn't mean something "isn't
working".

So use busy, not 100% perfect but a bit closer to what we want to
convey while not taking up a whole paragraph or the like.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 16:24:04 +01:00
Alexandre Derumier
19823a19c4 ui: ceph status: add pg warning state
Like ceph mgr dashboard, we need a warning state.

- set degraded as warning instead working
- set undersized as warning instead error
- rename error as critical
- add "busy" (info-blue) color for working state
- use warning (orange) color for warning state

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-By: Aaron Lauterer <a.lauterer@proxmox.com>
 [ TL: fold in CSS class addition ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 16:20:01 +01:00
Christian Ebner
038e94bbbe fix #4442: Add date-time filtering for firewall logs
Extend the current firewall log view to add date time based filtering.
The user can switch between live view, which shows logs from the
unrotated log file, or to filter mode, where date time based filtering,
including rotated logs can be performed.

Enable the feature by setting the property and the submit format
for since and until timestamps expected by the api.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-11-13 15:23:49 +01:00
Folke Gleumes
b4050780a6 acme: mark caaIdentities as an array
caaIdentities was mistakenly labled as a string in a previous patch
and not as an array of strings, as it is defined in the rfc [0].

[0] https://datatracker.ietf.org/doc/html/rfc8555#section-7.1.1

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
2023-11-13 15:15:22 +01:00
Thomas Lamprecht
25c0052ac8 api: bulk suspension: log if VMs are skipped due to not running
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 14:14:08 +01:00
Thomas Lamprecht
84e1e9d996 api: bulk suspension: code clean-ups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 14:14:08 +01:00
Thomas Lamprecht
ebb71cb505 api: bulk suspension: increase log severity to warn when guest is not a VM
That way it shows up in the task-log that something was requested that
cannot work currently.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 14:14:08 +01:00
Hannes Laimer
9ed1408b09 ui: add bulk suspend support
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2023-11-13 14:14:08 +01:00
Hannes Laimer
5f04abc2c3 api: add suspendall endpoint
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2023-11-13 14:14:08 +01:00
Thomas Lamprecht
dab65f7395 api: acme meta: require Sys.Audit on the node
As even though restricted to some specific endpoints and formats, one
can still scan HTTP, potentially also on the LAN.

We can do this here as the API call is new and was never packaged
since introduced, so this isn't a breaking change.
The TOS one will be removed with the next major release, so not a
problem anymore from then one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 14:14:08 +01:00
Thomas Lamprecht
c0ab227ab4 api: fixup missing trailing commas
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 12:28:34 +01:00
Thomas Lamprecht
0231e3043b api: acme: move description to the top
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 12:22:59 +01:00
Folke Gleumes
c8dba92e1b fix #4497: cli/acme: detect eab and ask for credentials
Since external account binding is advertised the same way as the ToS,
it can be detected when creating an account and asked for if needed.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
2023-11-13 12:06:10 +01:00
Folke Gleumes
7fb70c3b59 ui/acme: switch to new meta endpoint
Besides the switch from tos to meta endpoint, this fixes a visual bug,
where the 'Accept TOS' button would show up, even if no ToS was needed.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
2023-11-13 12:06:10 +01:00
Folke Gleumes
bd3f27adbc api/acme: deprecate tos endpoint in favor of meta
The ToS endpoint ignored data that is needed to detect if EAB needs to
be used. Instead of adding a new endpoint that does the same request,
the tos endpoint is deprecated and replaced by the meta endpoint,
that returns all information returned by the directory.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
2023-11-13 12:06:10 +01:00
Folke Gleumes
fe64969b63 fix #4497: acme: add support for external account bindings
Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
2023-11-13 11:54:22 +01:00
Dominik Csapak
ed38c56b2b ui: hide bulk migrate options on standalone nodes
since there is nowhere to migrate to and we hide the regular migrate
buttons/options too.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-13 11:19:46 +01:00
Dominik Csapak
01740cb2f7 ui: factor out standalone node check
into Utils and use it where we manually checked that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-13 11:19:46 +01:00
Maximiliano Sandoval
69cdcb12e9 ceph: api: use snake_case when setting options
Continuation of ab70343982. Discussion at
https://lists.proxmox.com/pipermail/pve-devel/2023-September/059013.html.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-11-12 18:17:04 +01:00
Maximiliano Sandoval
9b15baf29f ceph: mark global pg bits setting as deprecated
This setting was removed in [1] as part of the v13.0.2 tag. Running

    ceph config set global osd_pg_bits 42

results in

    Error EINVAL: unrecognized config option 'osd_pg_bits'

So we mark this api as deprecated and make it a no-op operation.

[1] e6acf2d1d5

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-11-12 18:17:04 +01:00
Dominik Csapak
872e9978fd ui: resource tree: add usage percentage to storage tooltip
it is a bit more verbose than the usage bar

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-12 18:12:59 +01:00
Dominik Csapak
1ed8e0096b ui: resource tree: fix showing empty tooltips
stop the tooltip show when the there is no text
this could happen for e.g. nodes that should not have a tooltip

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-12 18:12:59 +01:00
Dominik Csapak
128e8e826a ui: resource tree: don't save the tooltip
it shouldn't be called that often, and if we save it, it gets outdated,
e.g. when starting/stopping a guest

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-12 18:12:59 +01:00
Dominik Csapak
e3bc13e14a ui: add tooltips to non-full tags globally
by using the delegate function of ExtJS' tooltips on the global
Workspace element and using the proper css selectors

this way, we can limit the tooltips to the non-full ones
(in contrast to using data-qtip on the element, which would
always be show, even for tags with the 'full' style)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-09 12:12:36 +01:00
Dominik Csapak
2f414c50c1 ui: resource tree: limit tooltip to icon and text
and exclude the tags for that, since we want the tags to have their own
tooltips

we use the delegate function of the tooltips for that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-09 12:12:36 +01:00
Dominik Csapak
9fc36be82a ui: bulk actions: add clear filters button
to be able to clear all of them at once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-09 12:10:48 +01:00
Dominik Csapak
f0535b036d ui: bulk actions: rework filters and include tags
This moves the filters out of the grid header for the BulkActions and
puts them into their own fieldset above the grid. With that, we can
easily include a tags filter (one include and one exclude list).

The filter fieldset is collapsible and shows the active filters in
parenthesis. aside from that the filter should be the same as before.

To achieve the result, we regenerate the filterFn on every change of
every filter field, and set it with an 'id' so that only that filter is
overridden each time.

To make this work, we have to change three tiny details:
* manually set the labelWidths for the fields, otherwise it breaks
  the ones in the fieldset.
* change the counting in the 'getErrors' of the VMSelector, so that we
  actually get the count of selected VMs, not the one from the
  selectionModel
* override the plugins to '' in the BulkAction windows, so that e.g. in
  the backup window we still have the filters in the grid header
  (we could add a filter box there too, but that is already very crowded
  and would take up too much space for now)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-09 12:10:48 +01:00
Dominik Csapak
1aa92bac27 ui: bulk actions: reorder fields and drop local-storage warning
For a better screen-space utilization use two columns and remove the
local-storage warning, since this is rather obvious anyway.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: slight commit message rewording ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-09 12:10:19 +01:00
Folke Gleumes
2dac21405a fix #2336: ui: adjust message for bulk start/stop/migrate
The message in the Task Log has been 'Start/Stop/Migrate all...',
which is misleading since not everything might be affected by bulk actions.
This also affects the messages send at a nodes startup and shutdown, but
since this just affects a subgroup of VMs/Containers (those who are
onboot=1) the new wording still applies better than the previous.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
2023-11-07 16:50:56 +01:00
Thomas Lamprecht
2f6467d8eb api: ceph osd: fix description line-wrapping style
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-06 18:26:53 +01:00
Aaron Lauterer
ad1677d221 fix #4631: ceph: osd: create: add osds-per-device
Allows to automatically create multiple OSDs per physical device. The
main use case are fast NVME drives that would be bottlenecked by a
single OSD service.

By using the 'ceph-volume lvm batch' command instead of the 'ceph-volume
lvm create' for multiple OSDs / device, we don't have to deal with the
split of the drive ourselves.

But this means that the parameters to specify a DB or WAL device won't
work as the 'batch' command doesn't use them. Dedicated DB and WAL
devices don't make much sense anyway if we place the OSDs on fast NVME
drives.

Some other changes to how the command is built were needed as well, as
the 'batch' command needs the path to the disk as a positional argument,
not as '--data /dev/sdX'.
We drop the '--cluster-fsid' parameter because the 'batch' command
doesn't accept it. The 'create' will fall back to reading it from the
ceph.conf file.

Removal of OSDs works as expected without any code changes. As long as
there are other OSDs on a disk, the VG & PV won't be removed, even if
'cleanup' is enabled.

The '--no-auto' parameter is used to avoid the following deprecation
warning:
```
--> DEPRECATION NOTICE
--> You are using the legacy automatic disk sorting behavior
--> The Pacific release will change the default to --no-auto
--> passed data devices: 1 physical, 0 LVM
--> relative data size: 0.3333333333333333
```

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2023-11-06 18:23:28 +01:00
Stefan Lendl
e07191a081 ui: sdn: homogenize the casing of labels
use title case, or upper case for abbreviations, everywhere.

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
 [ TL: adapt commit subject to our style guides ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-06 18:17:45 +01:00
Stefan Lendl
9f17d27468 ui: refer to SDN subnets as 'Subnet' not as ID
The Subnet's CIDR in the Edit view is called 'Subnet'.
Also refer to it as Subnet in the list view.

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
 [ TL: prefix commit subject with sub-system ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-06 18:17:15 +01:00
Stoiko Ivanov
67c655b933 pve7to8: check for proper grub meta-package for bootmode
This should catch installations from our ISO on non-ZFS in uefi mode,
which won't get the updated grub efi binary installed upon upgrade,
because grub-pc is installed instead of grub-efi-amd64.

Adding this to pve7to8 should make this even more visible, than the
corresponding patch for promxox-kernel-helper (warnings printed during
regular package upgrades might be overlooked more easily than
a yellow line in the major upgrade checkscript)

The if/else order was chosen to limit the nesting level of the long
messages.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-06 18:12:17 +01:00
Thomas Lamprecht
3632a02974 ui: guest wizard: increase height to match 4:3 ratio
solving an issue where the CPU extra-flags grid had less space than
it's fixed height allowed.
While we also could have reduced that height, having a nicer ratio and
a bit more vertical "breathing room" seem slightly nicer to me.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-06 17:27:02 +01:00
Dominik Csapak
ca97f6301a ui: wizards: allow adding tags in the qemu/lxc create wizard
in the general tab in the advanced section.

For that to work, we introduce a new option for the TagEditContainer
named 'editOnly', which controls now the cancel/finish buttons,
automatically enter edit mode and disable enter/escape keypresses.

We also prevent now the loading of tags while in edit mode, so the tags
don't change while editing (this can be jarring and unexpected).

Then we wrap that all in a FieldSet that implements the Field mixin, so
we can easily use that in the wizard. There we set a maxHeight so that
the field can grow so that it still fits in the wizard.

To properly align the input with the '+' button, we have to add a custom
css class there. (In the hbox we could set the alignment, but this is
not possible in the 'column' layout)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-06 17:02:08 +01:00
Fabian Grünbichler
7914f5e7b2 node console: allow usage for non-pam realms
non-login commands are still restricted to root@pam if they where before.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-11-06 15:37:38 +01:00
Fabian Grünbichler
4fb92ae88a node console: restrict all non-login commands to root@pam
and not just upgrade.

note that the only other non-login command (ceph_install) is restricted to
root@pam in the web UI anyway, and that the termproxy endpoint is lacking this
check and thus always falls back to a login prompt for non-login commands
requested by non-root users.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-11-06 15:37:28 +01:00
Thomas Lamprecht
6e167f9a9a report: add hint for dir2text
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-02 21:00:05 +01:00
Aaron Lauterer
e5ecadec9e report: add sdn config directory
the /etc/pve/sdn directory contains the config files, not just what they
translate to in interface configs (/etc/network/interfaces.d/snd).

The current way will also include dotifiles that may contain the
current/running state. Which can be useful to troubleshoot.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2023-11-02 21:00:03 +01:00
Aaron Lauterer
b2b516f3fc report: add interfaces.d directory
With the SDN becoming more prevalent, it is a good idea to include any
additional config files in '/etc/network/interfaces.d'.

Since no special suffix is enforced, we need to match against any file.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2023-11-02 21:00:01 +01:00
Aaron Lauterer
798bd39a37 report: dir2text: ignore special . and .. files
So far this hasn't been an issue as each user of dir2text wanted files
with a specific pattern. But if we want every file in the directory, we
need to skip the special files '.' and '..'.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2023-11-02 20:59:59 +01:00
Thomas Lamprecht
bb4c00c073 update shipped aplliance info index
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-30 13:39:43 +01:00