Commit Graph

4835 Commits

Author SHA1 Message Date
Stefan Reiter
e08c232118 qemu: fix icon alignment in "Add Hardware" menu
It was ever so slightly off.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-03-06 18:19:39 +01:00
Dominik Csapak
7e98f79e40 ceph: make all service name regexes the same
instead of having multiple regexes in various places for the name,
define a 'SERVICE_REGEX' in PVE::Ceph::Services, and use that
everywhere in the api where we need it

additionally limit new sevices to 200 characters, since
systemd units have a limit of 256 characters[0] (including suffix), and
200 seems to be enough.

users can now create ceph services on machines with hostnames
longer than 32 characters

0: https://www.freedesktop.org/software/systemd/man/systemd.unit.html

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-03-04 15:38:09 +01:00
Dominik Csapak
a0ef509a66 ceph: do not check ips if no network is configured
the network and the cluster network are optional in the ceph config
and with 'pveceph init', so only check if we have an ip address
from those networks if it is actually configured

otherwise, the createosd call dies with an 'ip' error message
even if it would work

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-03-04 15:38:09 +01:00
Fabian Ebner
5ae4718fbe Add all standard output options that are not yet defined
When a property description already contained an option, no standard
output options at all would be added to it, e.g. '/nodes/NODE/vzdump'
already defines its own 'quiet'. Now all not yet defined options are
added to the description, this is done by using the fact that we can
pass a explicit list of std options to add to
add_standard_output_properties, so we filter all already defined ones
out and just pass that as list.

Fixes
pvesh create /nodes/NODE/vzdump -vmid ID -storage STORAGE
issued from a different node and
pvesh create /nodes/NODE/vzdump -vmid ID -storage STORAGE --output-format json
and maybe other calls.

Reported here: https://forum.proxmox.com/threads/output-format-error-with-pvesh-create.47711/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-02 20:17:53 +01:00
Thomas Lamprecht
afd3b0718e ui: add date column in per-guest backup archive panel
Similar to commit 12d50fcd21 which
added this column to the storage content grid let's also add it here.
As we also base off the 'pve-storage-content' it's just a matter of
copying over the column definition 1:1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-21 16:36:50 +01:00
Dietmar Maurer
3b8f599bca storage content GUI: improve detection of backup volumes
Include new proxmox backup server volumes.
2020-02-19 14:02:05 +01:00
Dietmar Maurer
1a87db9e56 vzdump: add support for proxmox backup server 2020-02-19 14:02:05 +01:00
Stefan Reiter
5b23d68382 gui: pci passthrough: fix 'Add PCI' dialog for new devices
Commit f36240c507 (gui: pci passthrough: consider domain in PCISelector)
used 'values.host' without checking if it's set, resulting in an error
when the dialog was opened for a new device (where values.host is
undefined).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-02-17 15:34:38 +01:00
Dominic Jäger
6e7f4ca63f ceph api: Make systemd unit type suffix optional
To (re)start and stop Ceph services the API calls systemd units using the
function ceph_service_cmd.  If unspecified, this function assumes the type
".target" for a unit. By making the unit type suffix in the API optional, it
can make use of this assumption.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2020-02-17 13:08:21 +01:00
Dominic Jäger
7da6ff2671 pveceph: Make service parameter optional
The default value for "pveceph start" and "pveceph stop" is "ceph.target".
However, omitting the parameter to use the default has been forbidden.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2020-02-17 13:06:43 +01:00
Stefan Reiter
e65817a1da gui/cluster: show all links (up to 8) in cluster overview
Show only links found on the cluster.

'enableColumnHide' is set to false, since it causes confusing behaviour
for the user, considering we'd overwrite part of their choices every 5
seconds.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-02-13 09:52:10 +01:00
Dominik Csapak
7dc5c40c26 gui: form/ControllerSelector: fix autoselection
changing from Ext.Array.each to a for loop and changing the return
to a 'break', resulted in exiting the wrong loop (previously the outer,
now the inner) resulting in wrongly looping through all controllers
instead of only until we found a match

using a label and labeled break, we can break the outer loop

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-12 12:34:53 +01:00
Dominik Csapak
28e5e13756 gui: dc/Summary: improve dashboard storage calculation
if no storage is selected in 'My Settings' our calculatin was done as follows:
* for every node, count 'local',
* every other storage gets only counted *once*, even if it is a local storage

as we have the 'shared' flag available, we can count local storages
for every node where they are defined which results in a storage total
calculation:
sum of all local storages on all nodes + all shared storages once

should make a better overview of storage for a cluster with local storages

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-12 12:03:03 +01:00
Dominik Csapak
49b54908ff gui: dc/TFAEdit: show an error message if tfa api call fails
setting the loadmask did not really work, so show a messagebox instead
and close the window

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-11 18:51:28 +01:00
Dominik Csapak
bfdfea5074 gui: TFAEdit: use viemodel binding for hiding/showing qr code
the verification textfield, and the selected tab.

also remove the code that used the value by the userview panel, since
this is the only way to have a consistent behaviour on the userview
setting and the usermenu tfa setting

this fixes the issue that on the 'user menu' we accidentally showed
the qr code and verification field, even if the user already had a
totp code

now it shows 'Unchanged' like when opened via dc/UserView

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-11 18:51:28 +01:00
Thomas Lamprecht
b552db1897 ui: lxc/network: fix initial empty text on edit
Editing an existing interface with DHCP set showed the emptyText
"None", which is confusing (and wrong)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-10 16:34:47 +01:00
Dominik Csapak
a216345471 gui: lxc/Network: add 'None' EmptyText for static mode
this way it is more clear that leaving that field empty results in
no configured ip for that interface, this may help prevent
users to select 'dhcp' for e.g. ipv6 when they do not want an ipv6
and do not have a dhcp6 server in the network (which would result
in a long boot time of the container, because of the dhcp timeout)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-10 16:27:20 +01:00
Thomas Lamprecht
43b72913ac pvesh: refactor and cleanup
use $res as variable name, as $json which may not be JSON is a bit
confusing.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-10 11:37:37 +01:00
Alexandre Derumier
a84a2ae8c5 pvesh: proxy : display result if not json
When a remote node not return a json, we got and error.

This is fixing this:

pvesh set /nodes/localname/network
UPID:kvmformation2:0034937B:09352894:5E41106C:srvreload:networking:root@pam:

pvesh set /nodes/remotenode/network
JSON text must be an object or array (but found number, string, true, false or null, use allow_nonref to allow this) at /usr/share/perl5/PVE/CLI/pvesh.pm line 125.

This patch simply return raw result if it's not a json

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-02-10 11:20:55 +01:00
Thomas Lamprecht
df2d3636f4 VZDump: sort module usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-10 11:16:32 +01:00
Dominik Csapak
99541dcceb gui: lxc/Network: remove trailing whitespace
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-10 11:16:32 +01:00
Thomas Lamprecht
3892d1e62e ui: snapshots: move hint to bottom and make it shorter
Moving it to the bottom of the dialog avoids other UI elements
jumping around when it gets displayed.

Further shorten the text itself, while the originally was good it was
a bit on the long side, users tend to overead to long warnings/hints
more easily, so try to be more terse.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-06 22:39:25 +01:00
Fabian Ebner
a6ebb96d7c Warn about file system state when a freeze would be needed, but isn't possible
If a snapshot of a running VM is taken and the RAM is not included, the backend
checks whether the QEMU Guest Agent is running inside the VM. If it is, it freezes
the file system, otherwise the snapshot is taken without freezing, which
could lead to an inconsistent file system state in the snapshot.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-02-06 22:31:39 +01:00
Fabian Ebner
7fb02366e0 Hide 'Include RAM' when VM isn't running
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-02-06 22:31:39 +01:00
Fabian Ebner
85b4f3cc12 Use 'isCreate' instead of 'snapname' to determine window layout
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-02-06 22:31:39 +01:00
Fabian Ebner
1952d3d953 Fix error message
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-02-06 22:31:39 +01:00
Dominik Csapak
c16c13020d gui: tree/SnapshotTree: fix gettext invocation
our gettext extractor cannot handle such statements to extract the
gettext, so change it to two gettexts

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-05 20:23:17 +01:00
Dominik Csapak
cf0d139ea3 gui: increase scsi value to that in the backend
we now can have 31 scsi disks, so show/allow them in the gui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-05 10:03:05 +01:00
Dominik Csapak
29bfee7bb2 gui: do not allow to edit 'special' roles
since any change to them is currently silently ignored by the backend
and should result in an error anyway

partially fixes #2575

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-31 20:38:28 +01:00
Thomas Lamprecht
acddfb9bd9 ui CT Features: add checkbox for new "allow mknod device creation in CT"
note that it's experimental..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-31 20:37:46 +01:00
Thomas Lamprecht
68c86905f9 ui LxcFeaturesEdit: refactor+cleanup and make slightly wider
Avoid the initComponent, just use autoLoad.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-31 20:35:40 +01:00
Thomas Lamprecht
561020ecfd bump version to 6.1-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 20:32:03 +01:00
Thomas Lamprecht
87ae19d1ee ui snapshot tree: avoid another exception in delayd load when view is gone
similar story than commit 9cc4958f5a
We cannot really assert anything about the state of me (the view) and
consorts if me.destroyed is true, just early return.

We can get here because this is a delayed task, i.e., async,
everything can happen in between triggering it and receiving the
actual callback, so guard!

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 20:06:16 +01:00
Thomas Lamprecht
9cc4958f5a ui snapshot tree: avoid exception in delayd load when view is gone
If one switched through guest fast (e.g., keeping the down-arrow key
pressed) while staying on the snapshot panel, it could happen that
the previous view got already destroyed once the success callback of
the feature API request got executed.

Then the ExtJS ViewModels' set method got a "null" back from its
me.getStub(...) call, and tried to access members of that, resulting
in a TypeError exception.

Avoid that by checking if we're already destroyed or still around
before doing that call. During the time we are already in the
callback we shouldn't be able to get destroyed in parallel due to JS
single thread nature and no yield point here, so this is safe.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 19:43:20 +01:00
Thomas Lamprecht
37a48e7423 ui snapshot: improve template string usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 19:42:21 +01:00
Thomas Lamprecht
e1af138576 ui snapshot tree: add label when no new snapshot is possible
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 19:42:02 +01:00
Thomas Lamprecht
b9c780c5a8 ui snapshot tree: express formulas more concisely
Use arrow functions to bring them in a more simple boolean expression
style. Further, we can reuse the "isSnapshot" formula in the
"canRollback" and "canRemove" ones.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 19:34:35 +01:00
Thomas Lamprecht
9a6b894fcc ui: follow up style fixes, don't cram expressions into one line
We do not want to have multiple expressions on the same line, if it'
really is an exception.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 19:31:54 +01:00
Dominik Csapak
b06d011e31 fix #2572: gui: make snapshot panel visible for VM.Audit
with the now rewritten panels, this works as expected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00
Dominik Csapak
5b1b9360eb gui: refator SnapshotTree
using the better View, ViewModel, Controller style,
while doing this, make it generic so that we can use it for qemu and lxc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00
Dominik Csapak
4e0e6b77e9 gui: refactor snapshot window
using an Proxmox.window.Edit, which does many of the things we did
manually, also rewrite is in such way that we can use it for qemu
and lxc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00
Thomas Lamprecht
a76a8a7d3f ui dc: move cluster name info into join button
Avoids another textfield while still giving the information to the
user.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 16:08:10 +01:00
Stefan Reiter
003e502f87 gui/cluster: show cluster name from joinInfo in join dialog
To help a user identify if they put in the joinInfo for the correct
cluster.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-01-30 15:13:01 +01:00
Stefan Reiter
63584726fc gui/cluster: validate cluster name length on create
API limits this to 15, validate in GUI as well for instant user
feedback.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-01-30 15:13:01 +01:00
Thomas Lamprecht
96ed94ad6f ui: fix disk controllers sortByPreviousUsage iteration
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 13:38:31 +01:00
Thomas Lamprecht
4415d038c0 bump version to 6.1-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-29 21:29:00 +01:00
Fabian Grünbichler
98d4857044 www: add permissions button to userview
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-29 10:41:08 +01:00
Fabian Grünbichler
a901f94a2c api/tasks: attribute token tasks to user
and store token ID in separate, currently unused member.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-29 10:28:16 +01:00
Thomas Lamprecht
4c32d77c2a d/control: bump version dependencies for libpve-http-server-perl
For new auth extract helper support

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-29 10:27:06 +01:00
Fabian Grünbichler
9a5a1655f1 pveproxy: use new cookie extraction method
we only care about the regular cookie case for the index.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-29 10:27:06 +01:00