]> git.proxmox.com Git - pve-manager-legacy.git/log
pve-manager-legacy.git
5 years agogui: cluster: initial work to switch ringX to linkX params
Thomas Lamprecht [Tue, 25 Jun 2019 10:31:56 +0000 (12:31 +0200)]
gui: cluster: initial work to switch ringX to linkX params

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobackup jobs: Aquire lock before modifying vzdump.cron
Christian Ebner [Mon, 24 Jun 2019 15:26:26 +0000 (17:26 +0200)]
backup jobs: Aquire lock before modifying vzdump.cron

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
5 years agoui: workspace: cope better with upgrade related false positive 401 HTTP codes
Thomas Lamprecht [Mon, 24 Jun 2019 12:52:05 +0000 (14:52 +0200)]
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>
5 years agopve5to6: avoid Use of uninitialized value $osd_flags in pattern match
Thomas Lamprecht [Tue, 25 Jun 2019 08:04:59 +0000 (10:04 +0200)]
pve5to6: avoid Use of uninitialized value $osd_flags in pattern match

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agopve5to6 will never be a POD based man page, fake it for now
Thomas Lamprecht [Tue, 25 Jun 2019 07:09:24 +0000 (09:09 +0200)]
pve5to6 will never be a POD based man page, fake it for now

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofollowups: pve5to6
Thomas Lamprecht [Tue, 25 Jun 2019 07:04:07 +0000 (09:04 +0200)]
followups: pve5to6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoupgrade checklist
Fabian Grünbichler [Mon, 24 Jun 2019 11:56:40 +0000 (13:56 +0200)]
upgrade checklist

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agoCeph: add get_cluster_versions helper
Fabian Grünbichler [Mon, 24 Jun 2019 11:56:39 +0000 (13:56 +0200)]
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>
5 years agobin/make: fix pod2man generation
Thomas Lamprecht [Tue, 25 Jun 2019 07:03:33 +0000 (09:03 +0200)]
bin/make: fix pod2man generation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofollowup: HW Raid note: move to bottom and fixup link
Thomas Lamprecht [Fri, 21 Jun 2019 13:27:31 +0000 (15:27 +0200)]
followup: HW Raid note: move to bottom and fixup link

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agogui: add raid warnings for ceph and zfs
Dominik Csapak [Fri, 21 Jun 2019 10:03:50 +0000 (12:03 +0200)]
gui: add raid warnings for ceph and zfs

Wording is from the installer

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: ensure /etc/ceph belongs to ceph
Thomas Lamprecht [Wed, 19 Jun 2019 15:00:21 +0000 (17:00 +0200)]
ceph: ensure /etc/ceph belongs to ceph

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi: ceph mon: add missing perl use statement for Cephconfig
Thomas Lamprecht [Wed, 19 Jun 2019 14:59:26 +0000 (16:59 +0200)]
api: ceph mon: add missing perl use statement for Cephconfig

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoceph: mon destroy: do not stop monitor ourselves
Dominik Csapak [Wed, 19 Jun 2019 11:45:54 +0000 (13:45 +0200)]
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>
5 years agoceph: mon destroy: remove from mon_host
Dominik Csapak [Wed, 19 Jun 2019 11:45:53 +0000 (13:45 +0200)]
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>
5 years agoceph: mon destroy: add cfs lock
Dominik Csapak [Wed, 19 Jun 2019 11:45:52 +0000 (13:45 +0200)]
ceph: mon destroy: add cfs lock

so that multiple users cannot remove a monitor simultaniously

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: mon destroy: refactor removal assertions
Dominik Csapak [Wed, 19 Jun 2019 11:45:51 +0000 (13:45 +0200)]
ceph: mon destroy: refactor removal assertions

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: mon create: lock monitor creation
Dominik Csapak [Wed, 19 Jun 2019 11:45:50 +0000 (13:45 +0200)]
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>
5 years agoceph: mon create: add to mon_host with msgr2
Dominik Csapak [Wed, 19 Jun 2019 11:45:49 +0000 (13:45 +0200)]
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>
5 years agoceph: mon create: refactor mon assertions
Dominik Csapak [Wed, 19 Jun 2019 11:45:48 +0000 (13:45 +0200)]
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>
5 years agogui: ostypes: include 5.x in Linux series and reword to range
Thomas Lamprecht [Tue, 28 May 2019 11:17:18 +0000 (13:17 +0200)]
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>
5 years agoceph: setup symlinks: ensure global ceph config directory exists
Thomas Lamprecht [Tue, 18 Jun 2019 15:15:03 +0000 (17:15 +0200)]
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>
5 years agoceph: mon create: refactor and improve auth key creation
Dominik Csapak [Tue, 18 Jun 2019 13:42:52 +0000 (15:42 +0200)]
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>
5 years agoceph: mon create: detect pubnet via config database
Dominik Csapak [Tue, 18 Jun 2019 13:42:50 +0000 (15:42 +0200)]
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>
5 years agoceph: mon list: make more robust
Dominik Csapak [Tue, 18 Jun 2019 13:42:49 +0000 (15:42 +0200)]
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>
5 years agoceph: services: do not create rados object in get_services_info
Dominik Csapak [Tue, 18 Jun 2019 13:42:48 +0000 (15:42 +0200)]
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>
5 years agoceph: init: lock ceph config
Dominik Csapak [Tue, 18 Jun 2019 13:42:47 +0000 (15:42 +0200)]
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>
5 years agoceph: init: check for nautilus
Dominik Csapak [Tue, 18 Jun 2019 13:42:46 +0000 (15:42 +0200)]
ceph: init: check for nautilus

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: init: update inital config for nautilus
Dominik Csapak [Tue, 18 Jun 2019 13:42:45 +0000 (15:42 +0200)]
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>
5 years agoui: storage selector: adapt widths
Thomas Lamprecht [Mon, 17 Jun 2019 10:53:59 +0000 (12:53 +0200)]
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>
5 years agoui: migrate: add source node field and rebalance field positions
Thomas Lamprecht [Mon, 17 Jun 2019 10:41:16 +0000 (12:41 +0200)]
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>
5 years agoui: migrate: set window width to 600
Thomas Lamprecht [Mon, 17 Jun 2019 10:39:47 +0000 (12:39 +0200)]
ui: migrate: set window width to 600

700 feels a bit wide

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoui: migrate: refactor migrate window & add migration with local disks
Tim Marx [Fri, 14 Jun 2019 12:35:36 +0000 (14:35 +0200)]
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>
5 years agowww: storage content view: fix typo in var name
Thomas Lamprecht [Sat, 15 Jun 2019 09:08:08 +0000 (11:08 +0200)]
www: storage content view: fix typo in var name

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agojs: fix some common typos found with codespell
Thomas Lamprecht [Sat, 15 Jun 2019 08:44:43 +0000 (10:44 +0200)]
js: fix some common typos found with codespell

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoperl: fix some common typos found with codespell
Thomas Lamprecht [Sat, 15 Jun 2019 08:40:20 +0000 (10:40 +0200)]
perl: fix some common typos found with codespell

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 6.0-0+2
Thomas Lamprecht [Fri, 14 Jun 2019 19:16:45 +0000 (21:16 +0200)]
bump version to 6.0-0+2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agod/control: update version dependency of pve-cluster and libpve-storage
Thomas Lamprecht [Fri, 14 Jun 2019 19:16:34 +0000 (21:16 +0200)]
d/control: update version dependency of pve-cluster and libpve-storage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agocss: fixup: # is not a comment in css
Thomas Lamprecht [Fri, 14 Jun 2019 11:52:46 +0000 (13:52 +0200)]
css: fixup: # is not a comment in css

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agonetwork api : reload : don't allow openswitch at all
Alexandre Derumier [Thu, 13 Jun 2019 13:49:01 +0000 (15:49 +0200)]
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>
5 years agonetwork api : reload : always reload
Alexandre Derumier [Thu, 13 Jun 2019 13:49:00 +0000 (15:49 +0200)]
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>
5 years agonetwork api : reload : don't check bridge delete
Alexandre Derumier [Thu, 13 Jun 2019 13:48:59 +0000 (15:48 +0200)]
network api : reload : don't check bridge delete

we are doing it in ifupdown2 directly

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
5 years agonetwork api : reload : remove ifdown/up hack
Alexandre Derumier [Thu, 13 Jun 2019 13:48:58 +0000 (15:48 +0200)]
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>
5 years agocss: tree: add some classes for specific locks
Thomas Lamprecht [Thu, 13 Jun 2019 19:32:46 +0000 (21:32 +0200)]
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>
5 years agogui: tree: add lock information to tooltips
Thomas Lamprecht [Mon, 10 Jun 2019 17:04:10 +0000 (19:04 +0200)]
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>
5 years agogui: add lock icons to css
Dominik Csapak [Wed, 27 Feb 2019 11:32:35 +0000 (12:32 +0100)]
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>
5 years agogui: add lock to resource store and tree
Dominik Csapak [Wed, 27 Feb 2019 11:32:34 +0000 (12:32 +0100)]
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>
5 years agoapi: cluster/resources: add information about guest locks
Thomas Lamprecht [Mon, 10 Jun 2019 16:51:39 +0000 (18:51 +0200)]
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>
5 years agofixup: while not an error here a trailing semicolon is good to have
Thomas Lamprecht [Thu, 13 Jun 2019 09:08:28 +0000 (11:08 +0200)]
fixup: while not an error here a trailing semicolon is good to have

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi network: make IPv6 address checking spew out useful errors
Thomas Lamprecht [Thu, 13 Jun 2019 09:06:15 +0000 (11:06 +0200)]
api network: make IPv6 address checking spew out useful errors

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoui: cephwizard: add networkselector widget
Tim Marx [Wed, 12 Jun 2019 08:56:32 +0000 (10:56 +0200)]
ui: cephwizard: add networkselector widget

Signed-off-by: Tim Marx <t.marx@proxmox.com>
5 years agochange error message related to maxbackups
Oguz Bektas [Tue, 11 Jun 2019 15:55:11 +0000 (17:55 +0200)]
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>
5 years agogui: smbios: followup: make declaration fully static
Thomas Lamprecht [Tue, 11 Jun 2019 16:08:01 +0000 (18:08 +0200)]
gui: smbios: followup: make declaration fully static

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix #2190: Base64 encode SMBIOS value strings in order to allow more characters
Christian Ebner [Tue, 11 Jun 2019 13:31:12 +0000 (15:31 +0200)]
fix #2190: Base64 encode SMBIOS value strings in order to allow more characters

On some occasions e.g. license checking, the manufacturer string in the
SMBIOS settings edit has to allow characters such as whitespaces.
https://forum.proxmox.com/threads/proxmox-and-windows-rok-license-for-dell.53236/
In principle SMBIOS allows to pass any zero terminated string to the
corresponding fields in the structure type 1 (System Information).

By base64 encoding the values clashing of the config is avoided.

Relies on the corresponding patch to qemu-server to pass parameter verification
and correct parsing.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
5 years agovzdump: new: code cleanup
Thomas Lamprecht [Tue, 11 Jun 2019 15:37:34 +0000 (17:37 +0200)]
vzdump: new: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agogui: ceph: fix double slash
Tim Marx [Tue, 11 Jun 2019 12:15:20 +0000 (14:15 +0200)]
gui: ceph: fix double slash

Signed-off-by: Tim Marx <t.marx@proxmox.com>
5 years agogui: cephinstaller: fix create mon url
Tim Marx [Tue, 11 Jun 2019 12:47:54 +0000 (14:47 +0200)]
gui: cephinstaller: fix create mon url

Signed-off-by: Tim Marx <t.marx@proxmox.com>
5 years agoceph: pool destroy: give correct parameter for nautilus
Dominik Csapak [Tue, 11 Jun 2019 11:37:45 +0000 (13:37 +0200)]
ceph: pool destroy: give correct parameter for nautilus

this parameter changed sometime between luminous and nautilus
note that with this change, it is not possible to delete pools in
luminous anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: ceph: add encryption checkbox to osd create
Dominik Csapak [Tue, 11 Jun 2019 09:14:24 +0000 (11:14 +0200)]
gui: ceph: add encryption checkbox to osd create

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: osd create: add encrypted as parameter
Dominik Csapak [Tue, 11 Jun 2019 09:14:23 +0000 (11:14 +0200)]
ceph: osd create: add encrypted as parameter

uses cpeh-volumes --dmcrypt parameter to encrypt the osd

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: a little luminous backwards compatibility
Dominik Csapak [Tue, 11 Jun 2019 09:14:22 +0000 (11:14 +0200)]
ceph: a little luminous backwards compatibility

ceph luminous does not use the 'name' property in the metadata
everywhere, so fall back to 'id'

this makes the ceph dashboard usable while having still luminous
(relevant for upgrading)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: vm: add CPU flag selector with tri-state awareness
Thomas Lamprecht [Thu, 6 Jun 2019 20:22:19 +0000 (22:22 +0200)]
gui: vm: add CPU flag selector with tri-state awareness

This allows to select the tri-state (enforce on, enforce off, default
from QEMU+CPU Model) for each CPU flag independently.

For this a grid with a widgetcolumn is used hosting tree radio
buttons for each state. They're marked '+' for enforce on, '-' for
enforce off and the default has no label, as it isn't easy to add in
such a way that it does not confuses people and does not looks
completely ugly.. But, to help people which have a hard time figuring
out what the states mean, a fake column was added showing the current
selected state's outcome in words.

For show casing the new nice interface add all currently supported
flags from out API-
It could be worth to add some selected CPU model awareness, so that
flags are only enabled if they can make sense with the selected
model. But one should be able to add this relative easily with this
as base.

The hardcoded flag lists is not ideal, we should try to generate this
in the future, but here already qemu-server is lacking and this is
rather independent of the fact and can be done later one just fine
too.

Note that this /is/ an *advanced* feature so not visible for all
directly, while I try to document in short what a flag does it surely
isn't perfect and to short to explain all nuances, they should give
enough pointers to know if it's relevant at all (amd / intel cpu) and
for what one should research

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 6593d43d1047d335a3a95d37c6d2f51282697b26)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoui: diskselector: increase width and use flex for columns
Thomas Lamprecht [Thu, 6 Jun 2019 11:43:56 +0000 (13:43 +0200)]
ui: diskselector: increase width and use flex for columns

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi osd create: followup code cleanup
Thomas Lamprecht [Thu, 6 Jun 2019 11:43:32 +0000 (13:43 +0200)]
api osd create: followup code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoceph: make ceph osd create api more readable
Dominik Csapak [Wed, 5 Jun 2019 13:59:37 +0000 (15:59 +0200)]
ceph: make ceph osd create api more readable

The aim of this patch is to reorder/rework the code of the api call
so that it gets more readable

it adds comments of what/why something is done, removes
code duplication between db/wal checks/creation

There are two changes in behaviour:
* when a device is given more than once via the api,
  the user gets a parameter exception for the db or wal
  with the information that the explicit defined devices must be
  different

* we check the usage for db/wal before the worker, so that the user
  gets instant feedback if a device is already in use
  (this is more for api users than for gui users, since we do those
  checks there also)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: ceph osd: use correct reload function
Dominik Csapak [Wed, 5 Jun 2019 13:59:41 +0000 (15:59 +0200)]
gui: ceph osd: use correct reload function

In this component, reload is defined as a local variable in
initComponent not on the component itself

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: ceph osd: do not send empty values
Dominik Csapak [Wed, 5 Jun 2019 13:59:40 +0000 (15:59 +0200)]
gui: ceph osd: do not send empty values

that leads to a parameter exception

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: osd create: add missing gpt check
Dominik Csapak [Wed, 5 Jun 2019 13:59:39 +0000 (15:59 +0200)]
ceph: osd create: add missing gpt check

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: osd create: round size down to the next kib
Dominik Csapak [Wed, 5 Jun 2019 13:59:38 +0000 (15:59 +0200)]
ceph: osd create: round size down to the next kib

since the size of an LV can only be a multiple of 512b, we round
down to the next kib

we then have to mulitply it by 1024 for the partition, since
append_partition expects bytes and not kib

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: cep service list: generalize emptyText
Thomas Lamprecht [Wed, 5 Jun 2019 12:56:55 +0000 (14:56 +0200)]
gui: cep service list: generalize emptyText

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agogui: ceph: dashboard
Dominik Csapak [Tue, 4 Jun 2019 12:47:59 +0000 (14:47 +0200)]
gui: ceph: dashboard

this fixes the dashboard when one views it on a node

alternatively, we can add a node specific metadata api call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: ceph: use taskDone functionality for reloading
Dominik Csapak [Tue, 4 Jun 2019 12:47:58 +0000 (14:47 +0200)]
gui: ceph: use taskDone functionality for reloading

instead of simply reloading when the window is closed

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: ceph: leave osd selected after reloading
Dominik Csapak [Tue, 4 Jun 2019 12:47:57 +0000 (14:47 +0200)]
gui: ceph: leave osd selected after reloading

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: ceph: reword Cleanup
Dominik Csapak [Tue, 4 Jun 2019 12:47:56 +0000 (14:47 +0200)]
gui: ceph: reword Cleanup

since we do not only cleanup paritions anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: ceph: rework OSD Create window
Dominik Csapak [Tue, 4 Jun 2019 12:47:55 +0000 (14:47 +0200)]
gui: ceph: rework OSD Create window

to reflect the changes on the backend (no filestore, db/wal size)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: ceph: use ServiceList for MDS list
Dominik Csapak [Tue, 4 Jun 2019 12:47:54 +0000 (14:47 +0200)]
gui: ceph: use ServiceList for MDS list

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agogui: ceph services: adapt create to ID in API path
Thomas Lamprecht [Wed, 5 Jun 2019 10:40:35 +0000 (12:40 +0200)]
gui: ceph services: adapt create to ID in API path

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi: create mgr: also have id in path for create
Thomas Lamprecht [Wed, 5 Jun 2019 09:53:22 +0000 (11:53 +0200)]
api: create mgr: also have id in path for create

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi: mgr create: code cleanup, redue heavy empty line usage
Thomas Lamprecht [Wed, 5 Jun 2019 09:52:32 +0000 (11:52 +0200)]
api: mgr create: code cleanup, redue heavy empty line usage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi: create mon: also have monid in path for create
Thomas Lamprecht [Wed, 5 Jun 2019 09:48:36 +0000 (11:48 +0200)]
api: create mon: also have monid in path for create

similar to the MDS api, so that DELETE and POST calls can operate on
the same path. This does not changes the CLI pveceph interface

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi: mon create: code cleanup, redue heavy empty line usage
Thomas Lamprecht [Wed, 5 Jun 2019 09:48:02 +0000 (11:48 +0200)]
api: mon create: code cleanup, redue heavy empty line usage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agogui: ceph: add ServiceList component and use it
Dominik Csapak [Tue, 4 Jun 2019 12:47:53 +0000 (14:47 +0200)]
gui: ceph: add ServiceList component and use it

this is an abstraction for listing Ceph Services with a few improvements:
* start/stop/restart buttons for all services (incl. icons)
* a syslog button to view the syslog of that service
* correct reloading behaviour when creating/destroying

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoapi: ceph mgr list: check if active_name is really set
Thomas Lamprecht [Wed, 5 Jun 2019 10:38:32 +0000 (12:38 +0200)]
api: ceph mgr list: check if active_name is really set

As in a situation where we /had/ a manager but destroyed it this
key's value is a empty string, and if we pass that to the WebUI we
get strange results form of a ghost MGR entry with ExtJS auto-ID
generation as name -> pretty confusing.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi: osd destroy: try to remove PVs directly on the fly
Thomas Lamprecht [Wed, 5 Jun 2019 08:50:52 +0000 (10:50 +0200)]
api: osd destroy: try to remove PVs directly on the fly

no point in first building a list if we can just remove it directly
afterwards, it's eval-ed anyway and $osd_list did not get touched
in-between.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi: osd destroy: pull out cleanup param
Thomas Lamprecht [Wed, 5 Jun 2019 08:49:53 +0000 (10:49 +0200)]
api: osd destroy: pull out cleanup param

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoceph: osd: rework osd destroy to work with ceph-volume
Dominik Csapak [Tue, 4 Jun 2019 12:47:51 +0000 (14:47 +0200)]
ceph: osd: rework osd destroy to work with ceph-volume

with this, osd destruction is left to ceph-volume if the osd was created
with ceph-volume, else our old code remains mostly the same since
we want to be able to destroy upgraded osds

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agofollowup: api: osd create: code cleanup
Thomas Lamprecht [Wed, 5 Jun 2019 08:01:45 +0000 (10:01 +0200)]
followup: api: osd create: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi: osd create: use verbose_description and document defaults directly
Thomas Lamprecht [Wed, 5 Jun 2019 08:01:01 +0000 (10:01 +0200)]
api: osd create: use verbose_description and document defaults directly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofixup: ceph osd create: also put real UUID when adding a lv
Thomas Lamprecht [Wed, 5 Jun 2019 07:46:38 +0000 (09:46 +0200)]
fixup: ceph osd create: also put real UUID when adding a lv

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoceph: osd: rework creation with ceph-volume
Dominik Csapak [Tue, 4 Jun 2019 12:47:50 +0000 (14:47 +0200)]
ceph: osd: rework creation with ceph-volume

this completely rewrites the ceph os creation api call using ceph-volume
since ceph-disk is not available anymore

breaking changes:
no filestore anymore, journal_dev -> db_dev

it is now possible to give a specific size for db/wal, default
is to read from ceph db/config and fallback is
10% of osd for block.db and 1% of osd for block.wal

the reason is that ceph-volume does not autocreate those itself
(like ceph-disk) but you have to create it yourself

if the db/wal device has an lvm on it with naming scheme 'ceph-UUID'
it uses that and creates a new lv

if we detect partitions, we create a new partition at the end

if the disk is not used at all, we create a pv/vg/lv for it

it is not possible to create osds on luminous with this api call anymore,
anyone needing this has to use ceph-disk directly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoservice: add restart on-failure to pveproxy and pvedaemon
Thomas Lamprecht [Wed, 5 Jun 2019 06:47:53 +0000 (08:47 +0200)]
service: add restart on-failure to pveproxy and pvedaemon

This way they can cleanly exit (with a SIGTERM or systemctl stop) but
will get restarted if killed or they abort, but only for
StartLimitIntervalSec= time period with a total maximal count of
StartLimitBurst= retries.
See `man systemd.unit` for details, default are 10s total
restart retry period with at max 5 total retry counts, after that the
unit will placed in the failure state. So this is a best effort try
with no real downside.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agodrop references to un-maintained sheepdog plugin
Thomas Lamprecht [Tue, 4 Jun 2019 15:44:05 +0000 (17:44 +0200)]
drop references to un-maintained sheepdog plugin

as already announced over two months ago[0], remove the unofficial
SheepDog plugin now completely. Besides that it was never fully
supported in Proxmox VE one of its main developer and ex-maintainer
declared it as abandoned[1], and thus just let's remove it, git
allows to resurrect it any time if a wonder happens anyway.

[0]: https://pve.proxmox.com/pipermail/pve-user/2019-March/170497.html
[1]: http://lists.wpkg.org/pipermail/sheepdog/2019-March/068449.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoceph: add db/wal size helper
Dominik Csapak [Tue, 4 Jun 2019 12:47:49 +0000 (14:47 +0200)]
ceph: add db/wal size helper

reads the sizes from the ceph config db first, then from the
ceph config, first from the osd section then global

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agofollowup code cleanup
Thomas Lamprecht [Tue, 4 Jun 2019 15:18:09 +0000 (17:18 +0200)]
followup code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoceph: add ceph-volume helper
Dominik Csapak [Tue, 4 Jun 2019 12:47:48 +0000 (14:47 +0200)]
ceph: add ceph-volume helper

those will be needed for creation/destruction of nautilus osds

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: mon: use ceph_service_cmd to enable/disable the systemd service
Dominik Csapak [Tue, 4 Jun 2019 12:47:47 +0000 (14:47 +0200)]
ceph: mon: use ceph_service_cmd to enable/disable the systemd service

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: mgr: delete auth key on destruction
Dominik Csapak [Tue, 4 Jun 2019 12:47:46 +0000 (14:47 +0200)]
ceph: mgr: delete auth key on destruction

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: remove 'exclude-manager' api parameter
Dominik Csapak [Tue, 4 Jun 2019 12:47:45 +0000 (14:47 +0200)]
ceph: remove 'exclude-manager' api parameter

since we will have a seperate gui for the manager, we do not need this
anymore

this is a breaking api change

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoceph: add an index for mgr services
Dominik Csapak [Tue, 4 Jun 2019 12:47:44 +0000 (14:47 +0200)]
ceph: add an index for mgr services

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoget_cluster_service: do not always call cfs_update
Thomas Lamprecht [Tue, 4 Jun 2019 14:34:51 +0000 (16:34 +0200)]
get_cluster_service: do not always call cfs_update

This was done to ensure the nodelist, which get_node_kv uses
internally to loop over all nodes, is filled. But, everything coming
through API/CLI already has a cfs_update called so this is not
required outside from development testing calls. As we normally do
not do this for such calls, cfs_update call is a prerequisite for
such things. The better solution would be handling this internally in
get_node_kv, e.g., by checking if $clinfo->{versionn} was set once,
and if not call to cfs_update, or maybe even better, so adapt the IPC
call for a possibility to get the KV status hash for all nodes.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>