api2 : network: anybridge: don't display bridges if user have access to vnets.
This remove vmbr* from bridgeselector if user have access to vnets.
if user need to have also access to vmbr, we can add a permission
in path "/sdn/vnets/vmbrX"
Mira Limbeck [Fri, 29 May 2020 12:22:06 +0000 (14:22 +0200)]
ui: firwall: change icmp type selector to a combogrid
The combogrid contains all valid icmp types that iptables accepts. In
addition to the names, the Type[/Code] value is shown as well. But
specifying Type[/Code] is not supported.
As the simple solution with setStore() does not work to change the
store for the combogrid, we simply have 2 different
ICMPTypeSelectors, one for IPv4, the other for IPv6, which are
switched depending on the specified protocol.
As disabled fields don't submit their value, we can keep the values
for the dport and both icmp-type fields when switching protocols.
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Aaron Lauterer [Wed, 2 Mar 2022 10:12:49 +0000 (11:12 +0100)]
ui: osd: send in/out cmd to currently used node
The in & out commands for OSDs are not node specific and can be run on
any node in the Ceph cluster. By sending them to the node currently used
to access the UI they can still be sent even if the node on which the
OSDs are located is down.
This helps in a disaster scenario where a node is down. By default Ceph
will mark a downed OSD as out after 10 minutes. This could be too long
in some situations. Running the CLI command to mark the OSD as out
earlier on one of the remaining nodes does work, but if the admin is not
used doing it this way, this adds stress, in a potentially already
stressful situation.
Using
pvesh create /nodes/pve701/apt/repositories --path
"/etc/apt/sources.list" --index 0 --enabled 1
reliably leads to
error: invalid type: string "0", expected usize
Coerce to int to avoid this. I was not able to trigger the issue with
the "enabled" option being a string here (in PMG I was), but be on the
safe side and coerce there too. Otherwise it might get triggered by a
future, completely unrelated change further up in the API call
handling.
Fabian Ebner [Thu, 3 Feb 2022 11:32:19 +0000 (12:32 +0100)]
api: apt: list_updates: fix dependency detection for virtual package
A virtual package does not have SelectedState Install, but the
dependency will still be satisfied if a package providing it has.
Fixes a bug, wrongly showing that postfix will be installed, when a
different mail-transport-agent is installed and a pve-manager update
is available:
https://forum.proxmox.com/threads/103413/
Aaron Lauterer [Tue, 25 Jan 2022 08:51:53 +0000 (09:51 +0100)]
fix #3451 ui: ceph create osd: show custom device classes
Showing already configured custom device classes makes it easier to
create new OSDs with custom device classes.
The Crush map contains a list of all OSDs in the cluster, including
their device class.
This means we can create a list of used device classes from it, avoiding
adding another API endpoint.
Fetching the crushmap should also be quite a bit less data that needs to
be transferred, compared to the other possible nodes/<node>/ceph/osd
endpoint, especially in larger clusters.
Markus Frank [Fri, 28 Jan 2022 10:03:39 +0000 (11:03 +0100)]
fix #3815: metrics: influxdb: coerce guest name always to string
InfluxDB interprets the guest name '66601' as a number and the guest
name 'vm42' as a String. This leads to problematic metrics, that will
be dropped by influxdb. Whichever comes first decides how the
"schema" is defined.
To change that add a $to_quote hashmap to define which value
shouldn't get interpreted as number by always send it quoted.
For now only quote 'name'.
Note, that while the 'nodename' and 'host' properties would have the
same problem, they are tags in InfluxDB which are always interpreted
as strings:
https://docs.influxdata.com/influxdb/v2.1/reference/syntax/line-protocol/
Signed-off-by: Markus Frank <m.frank@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 27 Jan 2022 14:12:26 +0000 (15:12 +0100)]
ui: pci passthrough: fix labels of new id/vendor overrides
We do not use 'Set XYZ' anywhere else and it should be clear enough
from the PCI selector in the non-advanced section that the actual
device to get passed-through is chosen else where, but we still can
use the emptyText to avoid confusion where the (sub) vendor/id will
come from if a field is left empty.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Thu, 2 Dec 2021 10:41:43 +0000 (11:41 +0100)]
vzdump: add new 'next-run' field for vzdump job listing
and calculate it by getting the next event after 'now' since
we currently have no way to get the last run time for jobs only running
on different cluster nodes
ui: node: zfs: use ZFSDetail window from widget-toolkit
The only functional differences I could see are the missing
defaultValue for 'Scan' and the reduced height. For restoring the
height, there is a proposed patch for widget-toolkit.
Dominik Csapak [Tue, 11 Jan 2022 10:26:21 +0000 (11:26 +0100)]
ui: fix novnc scaling radio buttons
when having selected 'off', the next start of the window has both
radiobuttons selected and no change is possible anymore. It seems that
the 'checked: true' triggers only after the 'init' function.
So instead remove the 'checked: true', and add the default in the init
function.
some users in the forum[0][1] and oguz wondered and made me notice
it, its neither used nor referred too in pve-storage, qemu-server nor
the pve-manager package itself, so just drop it.
Fabian Ebner [Tue, 7 Dec 2021 13:08:44 +0000 (14:08 +0100)]
sorters: use correct property 'direction' and keep default 'ASC'
Ext.util.Sorter does not have an 'order' property, so 'order: DESC'
didn't have an effect. The default is 'ASC' and it is arguably the
preferred direction for all affected sorters anyways.
ui: calendar event: add once daily example and clarify workday one
Using 00:00 with relying on the implied default is sub optimal as its
a bit of a magic example that new users may not understand as easily.
So spell it out explicitly, even if there'd be a shorter version
possible.
We also had some request for the once-daily every day, and its a
sensible example to have in general, could help getting the
difference between an hour list and a single one.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Wed, 24 Nov 2021 14:47:48 +0000 (15:47 +0100)]
api: journal: stream the journal data to the client
instead of accumulating the whole output of 'mini-journalreader' in
the api call (this can be quite big), use the download mechanic of the
http-server to stream the output to the client.
we lose some error handling possibilities, but we do not have
to allocate anything here, and since perl does not free memory after
allocating[0] this is our desired behaviour.
to keep api compatiblitiy, we need to give the journalreader the '-j'
flag to let it output json.
also tell the http server that the encoding is gzip and pipe
the output through it.
Thomas Lamprecht [Mon, 22 Nov 2021 19:15:29 +0000 (20:15 +0100)]
pvescheduler: make jobs tracking more flexible, rework stop
Avoid hard-coding the current implication of the replication stack to
not get started again until the old worker is done..
We still apply the same check, but changing that to let the jobs have
control is rather easy now.
Also rework the stop logic, send terminate to _all_ workers and make
the timeout a actual shared one (not first gets all, remaining get
kill) and send a kill to the stuck, leftover ones in one go at the
end, including some logging so that the admin can actually know about
this non-ideal situation.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Thu, 18 Nov 2021 13:28:30 +0000 (14:28 +0100)]
pvescheduler: reworking child pid tracking
previously, systemd timers were responsible for running replication jobs.
those timers would not restart if the previous one is still running.
though trying again while it is running does no harm really, it spams
the log with errors about not being able to acquire the correct lock
to fix this, we rework the handling of child processes such that we only
start one per loop if there is currently none running. for that,
introduce the types of forks we do and allow one child process per type
(for now, we have 'jobs' and 'replication' as types)
Dominik Csapak [Thu, 18 Nov 2021 13:28:29 +0000 (14:28 +0100)]
pvescheduler: catch errors in forked childs
if '$sub' dies, the error handler of PVE::Daemon triggers, which
initiates a shutdown of the child, resulting in confusing error logs
(e.g. 'got shutdown request, signal running jobs to stop')
instead, run it under 'eval' and print the error to the sylog instead
Dominik Csapak [Wed, 17 Nov 2021 14:21:01 +0000 (15:21 +0100)]
api: backup: normalize 'dow' format when converting
the old web ui sends the days as seperate parameters, which will
be concatenated by a null-byte in the api, causing it to land it this
way in the jobs.cfg
to fix this, split+join the list to get a well-formed dow list
Thomas Lamprecht [Tue, 16 Nov 2021 13:17:42 +0000 (14:17 +0100)]
ui: qemu: disk edit: drop label widths from advanced columns
this is a historical left over from the time when the bandwidth
limits weren't in their own, separate tab, as there we got quite
long labels and we synced the width up for the remaining fields to
avoid that it looks to much off.
Luckily not required anymore, so just drop it for non BW fields.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fabian Ebner [Tue, 16 Nov 2021 13:08:22 +0000 (14:08 +0100)]
ui: ceph: osd: handle edge case with dead node
If there is a left-over entry for a dead node in the ceph osd tree
the panel wouldn't show and produce an
Uncaught TypeError: data.versions is undefined
because of an access
node.version = data.versions[node.name];
further below (not visible in the patch itself).
AFAICT, the same issue would also happen when something went wrong
with getting the broadcasted ceph-versions, or when a node is part
of Ceph, but not PVE.
Handle the situation gracefully by always initializing data.versions.