Commit Graph

4246 Commits

Author SHA1 Message Date
Thomas Lamprecht
1370f62818 ui: workspace: cope better with upgrade related false positive 401 HTTP codes
While we nowadays can work much better with package upgrades relating
the cluster stack it still happens that a pve-cluster upgrade can
produce a false-positive 401 (auth failure) code for a currently
valid ticket, e.g., because a pmxcfs lock was requested but the
pmxcfs was currently not mounted due an upgrade triggered restart.

A frequent case for a few false positive 401 is also a cluster
creation, especially if not done over the web GUI.

Thus add a counter, which gets set to 0 on each successful login or
ticket renewal and gets increased on each 401 error. Only show the
logged out window if we get five or more 401 responses. While 5 may
sound a bit much one needs to remember that we always have quite a
few API call in flight (resource update store, stores from current
panel ...) and thus, if one got really auth denied it will still show
quite fast (1 to 5 seconds, depending on which panel is currently
opened). Further, the backend naturally does not allows to do
anything during this time, this has no security implications
whatsoever.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-25 11:42:02 +02:00
Thomas Lamprecht
29bd3b5950 pve5to6: avoid Use of uninitialized value $osd_flags in pattern match
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-25 10:04:59 +02:00
Thomas Lamprecht
fa84f50c1f pve5to6 will never be a POD based man page, fake it for now
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-25 09:51:00 +02:00
Thomas Lamprecht
071d761a3f followups: pve5to6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-25 09:04:07 +02:00
Fabian Grünbichler
75584009f8 upgrade checklist
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-06-25 09:03:42 +02:00
Fabian Grünbichler
8ba0d0a05e Ceph: add get_cluster_versions helper
to make 'ceph versions' and 'ceph XX versions' accessible.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-06-25 09:03:42 +02:00
Thomas Lamprecht
8c6e5fc1b8 bin/make: fix pod2man generation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-25 09:03:42 +02:00
Thomas Lamprecht
deca45c125 followup: HW Raid note: move to bottom and fixup link
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-21 15:28:20 +02:00
Dominik Csapak
bd36813405 gui: add raid warnings for ceph and zfs
Wording is from the installer

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-21 15:19:02 +02:00
Thomas Lamprecht
c18db15ba0 ceph: ensure /etc/ceph belongs to ceph
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-19 17:00:21 +02:00
Thomas Lamprecht
790ebc9053 api: ceph mon: add missing perl use statement for Cephconfig
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-19 16:59:26 +02:00
Dominik Csapak
f4d0945862 ceph: mon destroy: do not stop monitor ourselves
a 'mon remove' does this already for us, so do not stop it
this lead to a race where we could stop the next to the last monitor
before it was removed from the cluster, leading to a state
where two monitor were needed for quorum, but only one did exist

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-19 15:26:33 +02:00
Dominik Csapak
ea2ecb0c2f ceph: mon destroy: remove from mon_host
we need to remove an ip, ip:port or a ipvector from monhost
so use multiple regex search and replaces for this

this looks not really nice, but due to the strange format
of the line (e.g. ',' is a seperator inside and outside of a vector,
also ipv6 adresses may be surrounded with [] but so are vectors),
i found no better way

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-19 15:26:33 +02:00
Dominik Csapak
9bc15eea0a ceph: mon destroy: add cfs lock
so that multiple users cannot remove a monitor simultaniously

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-19 15:26:33 +02:00
Dominik Csapak
3babcc1d52 ceph: mon destroy: refactor removal assertions
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-19 15:26:33 +02:00
Dominik Csapak
ad475e25db ceph: mon create: lock monitor creation
otherwise it is possible that multiple users create monitors at the same
time, resulting in a wrong ceph.conf and probably worse

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-19 15:26:33 +02:00
Dominik Csapak
10907e548d ceph: mon create: add to mon_host with msgr2
in nautilus, the default msgr protocol is v2, but it has to be
explicitely given to monmaptool, also we don't want to use the
monitor sections anymore so only update mon_host

ceph can cope with mixed mon_host and monitor sections, so this is
not a problem

also the ceph-create-keys part is not necessary anymore since
this is done by the monitor itself now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-19 15:26:33 +02:00
Dominik Csapak
db1c4cc8f3 ceph: mon create: refactor mon assertions
by using our new 'get_services_info'

this already checks for nautilus+ style 'mon_host' key in the ceph.conf
for the ip address

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-19 15:26:33 +02:00
Thomas Lamprecht
ca71cd5deb gui: ostypes: include 5.x in Linux series and reword to range
Make clear thet the 5.x is also supported and reword a bit as
"5.X/4.X/3.X/2.6" is a bit hard to read, so use "5.X - 2.6"

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-19 14:57:22 +02:00
Thomas Lamprecht
c5a673ed1d ceph: setup symlinks: ensure global ceph config directory exists
normally this gets created on package installation, but could be
deleted, e.g., by a debug purge. As it costs nothing to create just
do a mkdir on it, which does not fails if it already exists..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-18 17:15:07 +02:00
Dominik Csapak
d558d296f7 ceph: mon create: refactor and improve auth key creation
it makes no sense to have the mon key inside the client.admin.keyring
also the order and operations did not make much sense

also create the client admin keyring when creating the config

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-18 17:06:50 +02:00
Dominik Csapak
7e32d0bdc4 ceph: mon create: detect pubnet via config database
if we already have a monitor, we can try to get the public_network via
the ceph configuration database

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-18 16:17:35 +02:00
Dominik Csapak
78441ff8da ceph: mon list: make more robust
in a case where we cannot connect to any monitor, we did not get
any info even if we have them via the pmxcfs

so get the RADOS object in an eval, and get the info we have from the
config/pmxcfs, and set the state to unknown if we cannot query via RADOS

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-18 16:17:35 +02:00
Dominik Csapak
e7e615768f ceph: services: do not create rados object in get_services_info
we always gave one, and the only reason why it could be undef
is that we could not connect, so it makes no sense to try again
and add unecessary time to the api call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-18 16:17:35 +02:00
Dominik Csapak
3e4c0f06e7 ceph: init: lock ceph config
so that not multiple users can create a ceph cluster at the same time

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-18 16:17:35 +02:00
Dominik Csapak
b3d8b5f527 ceph: init: check for nautilus
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-18 16:17:35 +02:00
Dominik Csapak
52fea280cf ceph: init: update inital config for nautilus
since we do not support creating filestore osds anymore, drop
the journal size from the config

and move the keyring from global to client
this makes it possible to omit the osd keyring path
(which was the default but got overwritten from the global section)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-18 16:17:35 +02:00
Thomas Lamprecht
eb89111ddf ui: storage selector: adapt widths
with this one can see the avail/capacity columns in full even if we
have "xyz.ab GiB", i.e., the max length this can be.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-17 12:54:01 +02:00
Thomas Lamprecht
090dff2f43 ui: migrate: add source node field and rebalance field positions
This makes the window more symmetric, and additional has the
following small advantages:
* to the left we now have static fields only, user modifiable ones
  are all to the right (with shorter distance to the migrate "submit"
  button here)
* if one starts the migration from the tree's context menu it may not
  be really clear where the VM currently is located at, so showing
  the source node can help (especially on bigger clusters with a
  huge target node list)
* more symmetric

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-17 12:47:12 +02:00
Thomas Lamprecht
3188b0b707 ui: migrate: set window width to 600
700 feels a bit wide

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-17 12:39:51 +02:00
Tim Marx
9706707d2f ui: migrate: refactor migrate window & add migration with local disks
This patch depends on:
qemu-server: e1f0fbf4448b374eb9a19502aee565adb5be7ec0

This patch refactors the migrate ui to incoperate the viewmodel approach
which should help if we need to add functionality in future iterations.
Additionally it is now possible to migrate with local disks.

Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-06-15 11:15:30 +02:00
Thomas Lamprecht
9cd612044a www: storage content view: fix typo in var name
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-15 11:08:08 +02:00
Thomas Lamprecht
ec5052600f js: fix some common typos found with codespell
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-15 10:44:43 +02:00
Thomas Lamprecht
7618913027 perl: fix some common typos found with codespell
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-15 10:40:20 +02:00
Thomas Lamprecht
4caf8085bc bump version to 6.0-0+2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-14 21:16:45 +02:00
Thomas Lamprecht
cfb04a1a2e d/control: update version dependency of pve-cluster and libpve-storage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-14 21:16:34 +02:00
Thomas Lamprecht
90f2d251ac css: fixup: # is not a comment in css
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-14 13:52:46 +02:00
Alexandre Derumier
f31cc71c03 network api : reload : don't allow openswitch at all
ifupdown2 reload can't work with openswitch until we implement
ovs.

I don't think that too much users are mixing ovs && bridge anyway.

It's possible to use ifupdown2 with ovs for ifup/down with ifupdown script,
but config need to be changed, and I don't have tested too much.
(maybe add a conflict in ifupdown2 package with openvswitch package for now)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-14 09:14:58 +02:00
Alexandre Derumier
feaf369e77 network api : reload : always reload
reload also if interfaces.new don't exist
(for vnet or other user change in different file)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-14 09:14:58 +02:00
Alexandre Derumier
bf32b90e89 network api : reload : don't check bridge delete
we are doing it in ifupdown2 directly

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-14 09:14:58 +02:00
Alexandre Derumier
e46bf624d5 network api : reload : remove ifdown/up hack
This was for vxlan interfaces and fixed in ifupdown2 with my last patches.

simply reload network, and if we still have errors, we can use ifquery to check them later

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-06-14 09:14:58 +02:00
Thomas Lamprecht
9ba642dd0e css: tree: add some classes for specific locks
Add classes for suspended, suspending and migration.

They use the same symbol as in the buttons for consitency, size is a
bit smaller to fit better for the tree.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-13 21:32:49 +02:00
Thomas Lamprecht
82a33d4ef7 gui: tree: add lock information to tooltips
This was already proposed by Dominik[0], but it was was wished for a
faster backend backing of this[1], and as with most wishes one needs
to either be content with what's there or (try) to improve it one
self.. So with the IPCC approach proposed as backing for this I'd
like to add this again. It differs from [0] a bit, first it's rebased
as parts of the tooltip stuff got already applied[2].

I use "Config locked (<LOCK>)" as text for this, as it
1. Clarifies what the lock symbol means, which is always a good thing
   for tooltips
2. repeating the lock symbol here again would show the users three
   lock symbols at the same time if the VM was selected in the tree
   (the tree one, the VM config panel one, and this tool tip one)
   this is a bit much, so don't do it.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-February/035829.html
[1]: https://pve.proxmox.com/pipermail/pve-devel/2019-March/035930.html
[2]: https://pve.proxmox.com/pipermail/pve-devel/2019-March/036165.html

Co-developed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-13 21:28:53 +02:00
Dominik Csapak
3cc3b67d8b gui: add lock icons to css
and move the warning/error icons below that so that we
get the correct icon if multiple apply

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-13 11:11:38 +02:00
Dominik Csapak
6284a48ad1 gui: add lock to resource store and tree
add the lock to the css classes and to the columns, also check
the lock field for changed items

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-13 11:11:38 +02:00
Thomas Lamprecht
f79372c0dc api: cluster/resources: add information about guest locks
using the new get_guest_config_property helper from pve-cluster,
which allows us to get this info with relatively low overhead.

With a somewhat realistic setup of 303 guest configurations here my
API call timing changes from ~ 24 to 26 ms without this to 26 to 28
ms with this patch applied, which seems reasonable.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-13 11:11:38 +02:00
Thomas Lamprecht
68f371d4d1 fixup: while not an error here a trailing semicolon is good to have
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-13 11:08:28 +02:00
Thomas Lamprecht
0f6e6f6b5c api network: make IPv6 address checking spew out useful errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-13 11:06:15 +02:00
Tim Marx
6c7b8e2339 ui: cephwizard: add networkselector widget
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-06-12 11:19:55 +02:00
Oguz Bektas
6c09101a02 change error message related to maxbackups
make the message a bit more informative (with help from thomas), namely
mentioning the ability to change/increase the limit.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-06-11 18:25:10 +02:00