ui: don't block offline migration due non-referenced disk in the config
All local disks can/will be migrated if not for a reason we don't
know about yet at this stage. The disks we get from the API call as
'local_disks' are either referenced by the config or by snapshots in
the config (which was not checked for and the reason one could run
into the 'else if' branch).
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
if our self-signed certificate expires in more than 825 days, but was
created after July 2019 it won't be accepted by modern Apple devices. we
fixed the issuance to generate shorter-lived certificates in November
2019, this cleans up the existing ones to fix this and similar future
issues.
two years / 730 days as cut-off was chosen since it's our new maximum
self-signed certificate lifetime, and should thus catch all old-style
certificates.
another positive side-effect is that we can now phase out support for
older certificates faster, e.g. if we want to move to bigger keys,
different signature algorithms, or anything else in that direction.
this modifies AuthEditBase so that if there is a sync inputpanel specified,
we display it in a second tab (we need to modify the bodyPadding here,
else the whole window has too much padding)
we use the same panel for both ldap/ad, since the most options behave
the same (except for user_attribute, but the default for AD is
sAMAccount which i think is good enough for now, users can still
override it in the cli)
ui: Utils: delete_if_default: add values by correct type
if 'delete' is an Array, we want to push into it, not append a string
this could be an issue when we use an edit window with multiple inputpanels
and deleteEmpty set on some fields
Thomas Lamprecht [Sun, 26 Apr 2020 10:29:24 +0000 (12:29 +0200)]
ui: drop login-user fixed token edit due to multi window/z-index issues
We normally do not stack windows and it breaks/allows some funky
stuff.. As this isn't really required and can be done just fine over
the the DC -> Token panel, especially as we prefill the username to
the logged in one for new tokens now..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Alwin Antreich [Wed, 11 Mar 2020 15:22:36 +0000 (16:22 +0100)]
Fix: ceph: mon_address not considered by new MON
The public_addr option for creating a new MON is only valid for manual
startup (since Ceph Jewel) and is just ignored by ceph-mon during setup.
As the MON is started after the creation through systemd without an IP
specified. It is trying to auto-select an IP.
Before this patch the public_addr was only explicitly written to the
ceph.conf if no public_network was set. The mon_address is only needed
in the config on the first start of the MON.
The ceph-mon itself tries to select an IP on the following conditions.
- no public_network or public_addr is in the ceph.conf
* startup fails
- public_network is in the ceph.conf
* with a single network, take the first available IP
* on multiple networks, walk through the list orderly and start on
the first network where an IP is found
ui: node: lower statusStore interval outside of summary panel
We normally only use that information for the nodes power management
buttons, only the Summary panel profits from more frequent updates
(due to the uptime, and resource usage graphs).
So use 5s interval in general and switch to 1s for the summary panel
only.
This also fixes a bug where the node-config panel owned store got
stopped by mistake if the summary panel, which shared the use of that
store, was "destroyed" (left).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This uses the newly introduced PVE::LXC::CGroup's
cpuset_controller_path() method to find the controller path,
so we need to depend on the newer pve-container package.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
on the view destroy we have to stop the updatestore again,
they do not get cleaned up by a destroy because until they are stopped
the have a reference on themselves, which prevent a garbage collection
Thomas Lamprecht [Thu, 26 Mar 2020 14:17:10 +0000 (15:17 +0100)]
followup sdn: move a bit below and fix showing on initial load
if the webinterface got loaded the api call to check if SDN is
available did not yet returned, so we could show it by accident -
even if libpve-network-perl wasn't instralled.
Fix that by hiding it (once) in the failure callback of the API call.
also move menu entries below, before Firewall, this fits better to
networking.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
So it has a more fixed position, independent of the column header
length. Also, this brings it nearer to the button where one can
adapt/turn off filters.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Stefan Reiter [Tue, 25 Feb 2020 15:32:00 +0000 (16:32 +0100)]
fix #2611: gui: use backendUnit and pretty renderer
Slightly confusing with the units:
* Backend stores values in KiB/s
* Frontend displays MiB/s (which is a good choice when considering
current generation network speeds as opposed to huge KiB numbers IMO)
* Renderer previously showed no units, which would usually be interpreted
as Bytes/s
So add a pretty renderer that shows units and set backendUnit to submit
correctly converted values.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Stefan Reiter [Thu, 20 Feb 2020 17:10:42 +0000 (18:10 +0100)]
qemu: add virtio-rng option to GUI
Warn the user when selecting /dev/random or disabling speed limits.
'hardware_counts' is used since technically more than one RNG could be
attached to a QEMU machine. It is limited to 1 however, since the
usefulness of such a setup is more than questionable, considering the
linux kernel only ever uses one hwrng at a time anyway.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Dominik Csapak [Mon, 24 Feb 2020 15:32:19 +0000 (16:32 +0100)]
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
Dominik Csapak [Mon, 24 Feb 2020 11:01:35 +0000 (12:01 +0100)]
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
Fabian Ebner [Mon, 2 Mar 2020 09:21:35 +0000 (10:21 +0100)]
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.
Thomas Lamprecht [Fri, 21 Feb 2020 15:36:48 +0000 (16:36 +0100)]
ui: add date column in per-guest backup archive panel
Similar to commit 12d50fcd21c045ba55a3cbadd27b91a9e8939310 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>
Stefan Reiter [Mon, 17 Feb 2020 13:36:28 +0000 (14:36 +0100)]
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>
Dominic Jäger [Mon, 17 Feb 2020 11:28:57 +0000 (12:28 +0100)]
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.
Stefan Reiter [Wed, 29 Jan 2020 10:27:22 +0000 (11:27 +0100)]
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>
Dominik Csapak [Wed, 12 Feb 2020 09:51:59 +0000 (10:51 +0100)]
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
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
Dominik Csapak [Tue, 11 Feb 2020 09:01:30 +0000 (10:01 +0100)]
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
Dominik Csapak [Mon, 10 Feb 2020 12:54:48 +0000 (13:54 +0100)]
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)
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
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>
Fabian Ebner [Thu, 6 Feb 2020 12:26:37 +0000 (13:26 +0100)]
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.