The whole thing is already prepared for this, the systemd timer was
just a fixed periodic timer with a frequency of one minute. And we
just introduced it as the assumption was made that less memory usage
would be generated with this approach, AFAIK.
But logging 4+ lines just about that the timer was started, even if
it does nothing, and that 24/7 is not to cheap and a bit annoying.
So in a first step add a simple daemon, which forks of a child for
running jobs once a minute.
This could be made still a bit more intelligent, i.e., look if we
have jobs tor run before forking - as forking is not the cheapest
syscall. Further, we could adapt the sleep interval to the next time
we actually need to run a job (and sending a SIGUSR to the daemon if
a job interval changes such, that this interval got narrower)
We try to sync running on minute-change boundaries at start, this
emulates systemd.timer behaviour, we had until now. Also user can
configure jobs on minute precision, so they probably expect that
those also start really close to a minute change event.
Could be adapted to resync during running, to factor in time drift.
But, as long as enough cpu cycles are available we run in correct
monotonic intervalls, so this isn't a must, IMO.
Another improvement could be locking a bit more fine grained, i.e.
not on a per-all-local-job-runs basis, but per-job (per-guest?)
basis, which would improve temporary starvement of small
high-periodic jobs through big, less peridoci jobs.
We argued that it's the user fault if such situations arise, but they
can evolve over time without noticing, especially in compolexer
setups.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Dominik Csapak [Wed, 10 Nov 2021 12:15:56 +0000 (13:15 +0100)]
ui: ceph: make version handling actually future proof
It seems we did not prepare the GUI enough for the API changes
planned when stopping to broadcast the old single string version. We
have to use the node specific versions, not the global 'versions'
object.
Also use the `PVE.Utils.compare_ceph_versions` everywhere, since some
versions are strings and others are the parts of the version (e.g.
["16", "2, "6"])
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
this also removes the "content" selector from the window.
as far as it seems, this selector was never able to select
more than one entry, so it was useless.
the check for FormData() is also removed, because this is
supported by all major browsers for a long time. therefore
doStandardSubmit() is also not necessary.
ui: storage content: avoid redundant options hasNotesColumn and hideColumns
Replace both by a showColumns option instead. As the current use of
hasNotesColumn already indicates, when new content-specific columns
are added, it is more natural for each derived class to specify the
columns it wants, rather than those it doesn't.
For hideColumns, there was no user. For hasNotesColumn, the only user
was the backup view.
Set the column information in the storage.BackupView class itself
rather than the instance (like hasNotesColumn was).
vzdump: skip protected backups for dumpdir pruning
Keeps the behavior consistent with what happens for storages. It also
is required to not get into conflict with the check in archive_remove,
i.e. pruning here marks a backup as 'remove' and then archive_remove
complains that it's protected.
Dominik Csapak [Fri, 5 Nov 2021 14:23:47 +0000 (15:23 +0100)]
ceph: fix version check shortcut
with 'get_node_kv', we get a hash which contains the value for
all nodes in the cluster (with the nodename as key), so we have to use
the value from the hash corresponding to our nodename.
also the 'str' property is inside the 'version' hash
ui: join info: rework error handling/checking for no-cluster
check if error is set before trying to access it and check for the
new HTTP code a newer pve-cluster may return, and do a more fuzzy
match for older ones.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
we may want to return null or an empty object for the join info on a
node without a cluster in the future (i.e., PVE 8.0+), so get
compatible for that now already as it costs not much and as we can
now use es2020 we even can write the object access nicer..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Thu, 7 Oct 2021 08:27:22 +0000 (10:27 +0200)]
d/postinst: use reload-or-restart instead of try-reload-or-try-restart
The only difference is that reload-or-try-restart does not do
anything if the service isn't already running, while
reload-or-restart also starts a stopped service.
We explicitly check if the service is enabled on upgrade before doing
any start/reload-or-restart action anyway. So, it would now start
daemons that were stopped but not disabled, which is not a really
valid state and would have happened on the next reboot anyway.
This starts new daemons (like the pvescheduler) automatically on a
package upgrade
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Aaron Lauterer [Mon, 4 Oct 2021 10:25:42 +0000 (12:25 +0200)]
ui: storage: change CIFS to SMB/CIFS
This will hopefully help people to find the needed storage as not
everyone will be aware of the fact that CIFS is also a name used for it
(technically it was only SMB v1).
Stefan Reiter [Mon, 4 Oct 2021 15:29:21 +0000 (17:29 +0200)]
ui: add support for adding TPM devices
Inspired by HDEfi for efidisks. Extends the DiskStorageSelector to allow
hiding the format, since tpmstate can only be stored in 'raw' format
(even on directory storages).
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
ui: qemu/OSTypeEdit: drop throwing an error on multiple widgets
we will have multiple panels with the same widget. Instead
of raising an error in that case, simply ignore it, since
we normally only want to set the default initially, not when
users configured something else
ui: qemu/HDEdit: move Bandwidth options to a different tab
for that we have to nest the now two tabs in a tabpanel into an inputpanel.
to prevent the options to be collected twice, we override the
'getValues' function of the 'sub-inputpanels' to return an empty object.
(we could make that an option for the inputpanel, but not necessary for
now)
also we have to move the 'bodyPadding' of the wizard to the 'defaults'
so we can override it for specific panels
and we have to manually set the width of the edit window since it
believes we only have a single column ('twoColumns' could also be an
option of the edit window should we need that again)
Aaron Lauterer [Tue, 10 Aug 2021 13:27:26 +0000 (15:27 +0200)]
ui: ceph install wizard: fix config exists note position
During the Ceph installation, in the configuration step, a note is shown
if there already is a Ceph configuration present. This notification
should be in the center of the wizard but is currently barely visible.
ExtJS is having trouble calculating the position and the result is that
the note is placed almost out of the visible area.
Setting a fixed height helps ExtJS calculate the vertical position.
Changing from the 'beforeshow' listener to the 'afterrender' one helps
for the horizontal position.
There is a udev bug [0] which can ultimately lead to the udev database
for certain devices not being actively updated. The Diskmanage package
relies upon lsblk for certain info, and lsblk queries the udev
database. Ensure the information is updated by manually calling
'udevadm trigger' for the changed devices.
Without the fix, and a bit of bad luck, a cleaned up disk could still
show up as an 'LVM2_member' for example.
ui: cluster backup: only restrict storages to node when it's selected
Previously, only the storages for the local node would be shown, which
prevented configuring a job for remote nodes when the storage is not
available on the local node.
which allows selecting storages available in the whole cluster and
controls whether usage information or node/shared information is
displayed. It is still possible to filter by node and content type.
ui: storage selector: only check for nodename before loading storage
but allow an empty nodename to be set. This is in preparation for
allowing a cluster view as well, where an empty node name will
indicate that no node is selected.
Since the reloadStorageList function still returns early if there is
no nodename, this should not lead to any issues.