status/graphite: refactor write_graphite to send all at once
Instead of doing multiple sends, for each status metric line one,
assemble it all in a string and send it out in a single go.
Per VM/CT/Node we had >10 lines to send, so this is quite the
reduction. But, also note that thanks to Nagler's delay algorithm
this may not had a big effect for TCP, as it buffered those small
writes anyhow.
For UDP it can reduce the packet count on the line dramatically,
though.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
status/graphite: just use setsockopt to set timeouts
after rethinking this it felt weird, sockets already can to this
themself, so I checked out the IO::Socket::Timeout module, and yeah,
it's just a OOP wrapper for this, hiding the "scary" struct pack.
So instead of adding that as dependency lets do it ourself.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Thu, 31 Oct 2019 08:33:44 +0000 (09:33 +0100)]
gui: lxc/MPEdit: save and use the mountpoint propertyString
this way, backend only settings do not get lost (like 'size', 'shared')
when editing in the gui
this was most obvious with the new pending options, as every time
we edited a mp, we lost its size, and even setting the options
to exactly the same as the originals, we still had the mp as
'pending', but without the size
status/graphite: reduce default timeout to 1 second
This is for TCP only, and TCP needs roughly 1.5 time of the Round
Trip Time for connection setup, So, with 1 second timeout we're still
good for connections with 660 ms latency in-between.
The assumption is that most of the time the status server is
relatively near (same datacenter, or region), and connections to it
are datacenter grade, and not like a spotty GPRS modem.
So, reduce this timeout to ensure that we do not block to long.
If anybody needs higher timeouts they can just change the default
anyway.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
rather than reducing the total job count during execution (and that
not for all cases) do some checks first and pass only the known good
nodes to the for-each-node-POST-request loop, so we can omit all
checks there.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 30 Oct 2019 17:22:26 +0000 (18:22 +0100)]
pveversion: track libspice-server1 (again)
Removed in commit 248b121b22313c894b2db2d6869c0de49650c0dc as we
wanted to re-use Debian Busters upstream version, but we re-uploaded
our own again. And besides that, this version would be still
interesting if it was not uploaded by us..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Oguz Bektas [Tue, 29 Oct 2019 14:50:17 +0000 (15:50 +0100)]
ui: qemu: update grid button status with events from correct store
as we noticed at the container side, we should use diffStore in order
to update the button status without delay.
Effectively alls ObjectGrids, and thus their descendants,
PendingObjectGrids use a DiffStore, where we have two effective
stores, a remote store and a local, in-memory, proxy store.
Co-developed-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Oguz Bektas <o.bektas@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 16 Oct 2019 09:05:36 +0000 (11:05 +0200)]
aplinfo: see trusted keys as build product, always assembly
Don't track the binary trustedkeys.gpg but see it just as normal
build product with the armored keys as source.
This ensures we always ship those from TRUSTED_KEYS variable, not
more, not less.
Instead of the "gpg import+export in temporary home dir" just
de-armor and concatenate them our self, that's what happens anyway.
This could be even simplified by just using base64 -d on the pubkeys,
after the non base64 stuff was trimmed, that would omit our need for
gpg here completely.
Thanks to Wolfgang B. for giving the idea to just do simple stuff :)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Stoiko Ivanov [Wed, 23 Oct 2019 16:10:28 +0000 (18:10 +0200)]
add versioned postinst run of newaliases
When installing from ISO '/etc/aliases' gets written correctly, however
postfix needs '/etc/aliases.db' (generated by running newaliases)
in order to work.
added to the postinst script to fix the issue for users having installed from
the ISO before this fix.
Thomas Lamprecht [Wed, 23 Oct 2019 16:18:08 +0000 (18:18 +0200)]
ui: window settings: use column layout
This change shouldn't be noticeable, main advantage is that we can
add a top or botton spanning row for hints or a save/restore feature
(in the future)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
radio groups set and get Value helper are objects, as they are
expected to be key, value, where key is a field-name of the radio
group and values is the inputValue from the radiobutton to be set.
So ensure we extract only the value in the change event handler, as
we do not want to save the whole object. But on restoring (setValue)
we need to wrap it as object again, else radiogroup won't know what
field we want to set..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Mira Limbeck [Mon, 7 Oct 2019 10:07:47 +0000 (12:07 +0200)]
fix #2364: allow offline migration with local cloudinit disk
As the cloudinit disk itself does not get copied on an offline
migration, just the config, there's no conflict. Ignore the local
cloudinit disk on offline migration. Also adds a useful message when
trying to live migrate with a local cloudinit disk.
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
Christian Ebner [Tue, 15 Oct 2019 11:00:22 +0000 (13:00 +0200)]
vzdump: move code needed for cfs register of vzdump.cron to guest-common
This moves the cfs register code for vzdump.cron to the
pve-guest-common package. Therefore, it relies on the corresponding
patches in pve-guest-common and pve-docs as build dependencies.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
api: subscription: use rpcenv for permission check
commit a69749a6a1fc1f18442ec0a475495bb00adb322c had a valid cause but
unnecessarily used the static PVE::AccessControl::check_permissions.
As the RPCEnvironment based check method has a "$noerr" parameter and
we already have a rpcenv instance readily available, we can use that
one just fine.
this is the last caller of PVE::AccessControl::check_permissions(),
which is the last caller of PVE::AccessControl::permission(). both can
thus be dropped altogether.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 10 Oct 2019 09:53:36 +0000 (11:53 +0200)]
ui: vm opts: clarify QGA option
To make it more clear that PVE does not somehow magically injects a
QHA into the VM, but that this can be set if one has installed the
QGA in the VM themself.
So slightly adapt the label by prepending "Use" and adding a hint for
further details.
Also ensure we call it the real name everywhere, i.e., "QEMU Guest
Agent", this makes it a bit more consistent and easier to find
information for users.
Suggested-by: Aaron Lauterer <t.lamprecht@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Stoiko Ivanov [Mon, 7 Oct 2019 19:37:34 +0000 (21:37 +0200)]
change .pve-hint to .pmx-hint css-class
With introducing pmx-hint to pmg as well, by adding a 'pmx-hint' css-class
to proxmox-widget-toolkit, it makes sense to use the definition everywhere.
this patch drops the .pve-hint class from pve's css and replaces all occurences
in the GUI-source.
simply return a empty object for cases we would get an exception
anyway, this is not wrong and allows easier usage for cases where
it's not sure if the value is set or not.
We could still do a Ext.isDebugEnabled() check and then throw up, but
this really should not matter much and I do not like if my debug mode
breaks and the non-debug not..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Mira Limbeck [Fri, 4 Oct 2019 09:29:58 +0000 (11:29 +0200)]
fix #2389: ceph wizard showing network of target node
Before this patch the wizard shows the available networks for the node
one is connected to, not the actual target node where ceph is
configured. This patch changes this to access the network information of
the target node instead of the local one.
It could be that not every node in the cluster is part of the ceph
cluster (and the same network) which makes this useful.
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
ui: labelWidth gets `px` suffixed so `auto` won't work
This is a common mistake with widths in ExtJS, most of them have the
'px' unit implicit, so using things like 'auto' or '100%' does not
works with them.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominic Jäger [Thu, 3 Oct 2019 09:58:38 +0000 (11:58 +0200)]
Harmonize reset buttons in "My Settings"
- Rename both buttons to a single word as it is clear where they belong
to. Use "Reset" instead of "Clear" as you can rather "Reset a saved
user name" than "Clear a layout".
- Use container instead of panels as they are simpler (e.g. no "border:
false" necessary) and sufficient.
- Align the buttons at the right for visual appeal.
- Use title case for the user name label for consistency.
Stefan Reiter [Tue, 10 Sep 2019 17:11:44 +0000 (19:11 +0200)]
Make CPU Model Selector a searchable grid view
Uses a ComboGrid with search feature and a column for vendor. Can be
sorted by both columns.
Default sort is as given in this file, I tried to align it as
* AMD
* Intel
* Other
alphabetically and in QEMU order (as before, seems to be release date?)
within those "groups".
Doesn't work with value set in widget definition (would need to be
preferredValue), but we always call setValue() anyway (and if we don't,
value will be '', aka the default, which is correct too), so just remove
that from ProcessorEdit.js.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
mobile: implement login with OTP based TFA enabled
roughly copied over from the full-fledged manager UI, but enough
differences between manager <-> mobile and ExtJS <-> Sencha Touch to
just adapt it here instead of having a force-shared implementation
with lots of corner case checks and even more callback methods..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 26 Sep 2019 16:00:54 +0000 (18:00 +0200)]
ui: usbselector: refactor USB Speed rendering, add USB 3.1
Fixes also an issue where unregonized (often faster) devices would
get recognized as "USB 1.x" due to the else fallback.
Now, if we do not recognize the speed value, just print the speed
with the MBps unit (it's not exactly megabit per second, but mega
baud (= symbols) per second - the effective rate is dependent on the
used signal encoding)
adapt widths a bit further
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Enable USB3 by default. There are no restrictions anymore that the speed
of the dev must match the USB3 speed. The xhci controller can deal with
USB 2 and 1 devices. USB3 devices can be plugged in a USB2 (ehci)
controller. As discussed in [0]
When using a USB device for SPICE passthrough my tests showed that USB2
devices connecting to the xhci controller work but a USB3 device passed
via Spice cannot connect to an ehci controller (no USB3 enabled).
qemu-server 6.0-9 supports USB3 also for Spice USB passthrough. See
commit 733234b [1].
All this means we can get rid of the separate handling of USB3 and non
USB3 devices and leave the decision to the user if USB3 should be
enabled or not.
Thomas Lamprecht [Mon, 23 Sep 2019 15:06:21 +0000 (17:06 +0200)]
ui: vm/usbedit: don't use getUSBValue to avoid possible duplicate "usb3"
As getUSBValue() always added the "usb3" property if the selected
device was recognized as USB3. But we can now also pass such a device
as USB2 so lift this restriction - which also fixes a bug for USB3
selected devices with the USB3 checkbox set.
The solution also avoids the me.down query, which is nice too.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>