Commit Graph

4600 Commits

Author SHA1 Message Date
Thomas Lamprecht
a5e921bf76 status: cleanup config parser regsistration
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-15 10:49:05 +01:00
Thomas Lamprecht
d35f97aa30 status plugins: add _connect to plugin method interface
in preparation of doing real transactions, with one batch connect +
send + disconnect, and not hundreds of those per update cycle..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-14 19:27:28 +01:00
Thomas Lamprecht
34fd8a7040 status plugins: add update_all and foreach_plug helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-14 19:24:24 +01:00
Thomas Lamprecht
c4c2402b77 remove some useless empty lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-13 17:05:44 +01:00
Thomas Lamprecht
77123edbd0 statd: refactor update_node_status
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-13 08:42:00 +01:00
Thomas Lamprecht
19978f7ec5 statd: cleanup update_node_status
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-13 08:40:13 +01:00
Aaron Lauterer
e1bd10bea7 ui: vm opts: add hint for spice foldersharing
Spice foldersharing needs the webdavd daemon installed inside the guest.
This patch adds a hint to remind the user to install it in the VM.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-11-12 11:28:48 +01:00
Stefan Reiter
82a0daae4d gui: fix onlineHelp for join window
We have an entire chapter written about this, why not link it too.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-11-11 11:47:45 +01:00
Thomas Lamprecht
1770237d1a 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>
2019-11-07 18:59:06 +01:00
Thomas Lamprecht
00892f8614 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>
2019-11-07 16:27:50 +01:00
Thomas Lamprecht
a8234b22b1 status/graphite: record missing module-use
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-07 16:26:54 +01:00
Dominik Csapak
c2a7475c3c 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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01:00
Dominik Csapak
5f80efc887 gui: qemu/HDEdit: use propertyStringSet helper
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01:00
Dominik Csapak
e90cffd3a7 gui: Utils: add propertyString helper
this helper conditionally sets the given value to the given property
on the given object, optionally a different value

this is useful for our MP/HD Edit panels, where we set the options
of the drive/mp this way for every gui option we have

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01:00
Dominik Csapak
6466578744 gui: lxc/Resources: improve reload behaviour
reload when a new disk was added, and set the button status
on a reload

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01:00
Dominik Csapak
bef2a1f5e3 gui: qemu/HardwareView: use builtin reload function
ObjectGrid (an ancestor of PendingObjectGrid) does already have
a 'reload' function which does exactly the same, so get rid
of the local one here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01:00
Thomas Lamprecht
a10cbb95b4 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>
2019-11-06 21:06:00 +01:00
Thomas Lamprecht
3a03f1160f status/graphite: refactor default assignments, no ternary
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-06 21:02:59 +01:00
Martin Verges
15a6ee93a3 add graphite tcp support
This change allows sending statistics to graphite over TCP.

So far only UDP is possible, which is not available in some environments, like behind a loadbalancer.

Configuration example:
~ $ cat /etc/pve/status.cfg

graphite:
    server 10.20.30.40
    port 2003
    path proxmox
    proto tcp
    timeout 3

Signed-off-by: Martin Verges <martin.verges@croit.io>
2019-11-06 20:48:35 +01:00
Thomas Lamprecht
f69a82f073 ui: dc/backup: add separators between panel buttons
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-06 19:56:33 +01:00
Thomas Lamprecht
8699f1b33e ui: dc/backup: refactor and fix run-job-now
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>
2019-11-06 19:55:43 +01:00
Stefan Reiter
95382bfc61 ui: fix backup "Run now" with specific node selected
Previous behaviour was bugged and displayed "Node is offline" for all
non-selected nodes (only 1 can be selected at a time).

Also fix progress window to show correct number of nodes in backup job.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-11-05 07:26:45 +01:00
Thomas Lamprecht
617160bfc9 update aplinfo
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-05 07:26:28 +01:00
Thomas Lamprecht
9dec675a32 pveversion: track libspice-server1 (again)
Removed in commit 248b121b22 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>
2019-10-30 18:22:51 +01:00
Thomas Lamprecht
2140ef3774 bump version to 6.0-11
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 18:02:50 +01:00
Thomas Lamprecht
34ed418b5c ui: pending revert: detect parent pending grid automatically
but cache it to avoid frequent, potential costly, up() calls

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 15:49:31 +01:00
Thomas Lamprecht
5ba4a8fefa ui: pending revert: rename baseurl config to apiurl
makes more sense and avoids confusion

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 15:48:33 +01:00
Thomas Lamprecht
e8c11fa9ab ui: factor out pending changes revert button
makes no sense to have the, more or less, exact same 25 line method 5
times..

could be moved to widget TK, but that's for another time.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 11:48:03 +01:00
Thomas Lamprecht
f82ac6bc5e ui: followup: minor code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 11:15:54 +01:00
Oguz Bektas
1db6851f0b gui: add revert button for lxc pending changes
adds the pending button for Resources, Options and DNS screens.

Co-developed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-10-30 09:54:02 +01:00
Oguz Bektas
6b22ceef70 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>
2019-10-30 09:00:50 +01:00
Thomas Lamprecht
995460679b 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>
2019-10-30 08:55:47 +01:00
Dominik Csapak
a1852813ea gui: remove chrome/extjs workaround
it seems that this is not needed anymore, at least i cannot
see any difference with/without it here (chromium 76)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-10-30 08:54:09 +01:00
Wolfgang Bumiller
82d2822fe4 ui: TFA: default to a 160 bit secret
This is base32, so we use only 5 bit per byte to make things simple,
so 32 byte * 5 bit/byte = 160 bit of entropy

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-10-29 09:43:02 +01:00
Wolfgang Bumiller
d06c99fe5e ui: TFAEdit: use 'v2' secret format
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-10-29 08:41:07 +01:00
Tim Marx
fa9d3c2d3e gui: reset cdimage selector on change
to improve UX, disabled child fields shouldn't show validation errors
when the parent widget (radiofield) isn't selected anymore.

Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-10-25 17:40:48 +02:00
Thomas Lamprecht
ccb28c9dba followup: use boxLabel to avoid big labelWidths
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-25 17:38:57 +02:00
Christian Ebner
fe878be938 fix #1291: add purge checkbox to VM/CT destroy dialog
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-10-24 13:48:41 +02:00
Stoiko Ivanov
40fe45105c 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.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-23 18:21:15 +02:00
Thomas Lamprecht
076ff52f47 ui: window settings: remove no-op onShow overwrite
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 18:20:56 +02:00
Thomas Lamprecht
3e4364096f 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>
2019-10-23 18:18:09 +02:00
Thomas Lamprecht
373f23a7a7 ui settings: fix noVNC scaling mode radiogroup setValue
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>
2019-10-21 15:20:22 +02:00
Thomas Lamprecht
3181324610 ui: settings: remove ":" from some gettext labels
to make those easier to be re-used

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-21 11:31:09 +02:00
Thomas Lamprecht
337e50bb76 bump version to 6.0-10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-18 22:30:30 +02:00
Oguz Bektas
86e9065f33 edit/show lxc pending changes in gui
uses the new /pending and the adapted /config API endpoints
to get pending changes and show them in a PendingObjectGrid

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-10-18 21:49:28 +02:00
Mira Limbeck
f905c95f1c 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>
2019-10-18 21:49:05 +02:00
Thomas Lamprecht
9fccaa4e78 d/control: bump doc-gen and guest-common deps for VZDump refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-18 10:58:54 +02:00
Christian Ebner
d3447e0b30 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>
2019-10-18 08:23:40 +02:00
Thomas Lamprecht
8b4ee3417d updated shipped aplinfo index
for Ubuntu 19.10, CentOS 8 and 6 (update), and deindexing of Alpine
Linux 3.8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-17 18:29:46 +02:00
Fabian Grünbichler
854d29b716 api: subscription: use rpcenv for permission check
commit a69749a6a1 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>
2019-10-17 16:53:57 +02:00