Commit Graph

4631 Commits

Author SHA1 Message Date
Thomas Lamprecht
e051836377 status: cleanup config parser regsistration
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-15 10:49:05 +01:00
Thomas Lamprecht
68f58b5d59 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
5e82aaac89 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
b25f645957 remove some useless empty lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-13 17:05:44 +01:00
Thomas Lamprecht
0dd73a7fec statd: refactor update_node_status
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-13 08:42:00 +01:00
Thomas Lamprecht
7887310045 statd: cleanup update_node_status
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-13 08:40:13 +01:00
Aaron Lauterer
ff4d18e1b1 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
a202f65a95 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
108e0c8b9f 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
8dcf2cac46 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
228f017ee4 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
f9b633668f 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
e4e36020aa 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
49dfba72c8 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
69f36699b6 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
18f57a2319 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
c44a0c01c8 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
dd4268e50e 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
2c927f113b 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
7a04ce2376 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
a0fecb88ba 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
448454ffcd 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
56894d029c update aplinfo
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-05 07:26:28 +01:00
Thomas Lamprecht
4cfe5534e2 pveversion: track libspice-server1 (again)
Removed in commit fcb8022169 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
c832c2ec9d 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
417f904f78 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
3ee15859b2 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
591efb6725 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
b8d53fbe54 ui: followup: minor code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 11:15:54 +01:00
Oguz Bektas
273b5ce3a3 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
141aba6b62 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
6976163d1b 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
d20469e93b 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
7cfd876e34 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
20ce59c33d 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
9d7d6ed71a 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
9afda559ff 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
743b391c50 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
4e435ad13d 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
8cfcb41b00 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
9d6d8d8620 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
f5c68a74c7 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
94666c47dd 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
48b8b63548 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
9fd8d73ea8 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
cea7382bd8 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
498ffb1fa9 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
2424074ee7 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
84981ac2d2 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
d8645329d6 api: subscription: use rpcenv for permission check
commit 2d2ed7ab53 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