Commit Graph

4246 Commits

Author SHA1 Message Date
Thomas Lamprecht
2711037a6f gui: smbios: followup: make declaration fully static
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-11 18:08:01 +02:00
Christian Ebner
150ad74a2c 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>
2019-06-11 17:42:33 +02:00
Thomas Lamprecht
1e4583d5de vzdump: new: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-11 17:38:18 +02:00
Tim Marx
d219366458 gui: ceph: fix double slash
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-06-11 14:53:40 +02:00
Tim Marx
ca62eebd58 gui: cephinstaller: fix create mon url
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-06-11 14:51:09 +02:00
Dominik Csapak
f8eade23dd 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>
2019-06-11 13:47:55 +02:00
Dominik Csapak
6c311f2c17 gui: ceph: add encryption checkbox to osd create
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-11 12:58:24 +02:00
Dominik Csapak
4ce045788a 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>
2019-06-11 12:58:24 +02:00
Dominik Csapak
46fb9c5017 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>
2019-06-11 12:58:24 +02:00
Thomas Lamprecht
06064872c2 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 92572ead6d)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-07 17:45:33 +02:00
Thomas Lamprecht
cc708c9cfe ui: diskselector: increase width and use flex for columns
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-06 13:43:56 +02:00
Thomas Lamprecht
970f96fdbb api osd create: followup code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-06 13:43:32 +02:00
Dominik Csapak
45d45a63cd 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>
2019-06-06 12:41:14 +02:00
Dominik Csapak
02a1b548bd 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>
2019-06-05 18:23:49 +02:00
Dominik Csapak
4c94e9de1d gui: ceph osd: do not send empty values
that leads to a parameter exception

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-05 18:23:49 +02:00
Dominik Csapak
3d7b3992dd ceph: osd create: add missing gpt check
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-05 18:23:49 +02:00
Dominik Csapak
ab62d137e1 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>
2019-06-05 18:23:49 +02:00
Thomas Lamprecht
e148c752eb gui: cep service list: generalize emptyText
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-05 14:56:55 +02:00
Dominik Csapak
44dde2cb22 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>
2019-06-05 12:41:11 +02:00
Dominik Csapak
2b142c4f99 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>
2019-06-05 12:41:11 +02:00
Dominik Csapak
e2924302bf gui: ceph: leave osd selected after reloading
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-05 12:41:11 +02:00
Dominik Csapak
c56634f133 gui: ceph: reword Cleanup
since we do not only cleanup paritions anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-05 12:41:11 +02:00
Dominik Csapak
4d3e918aa5 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>
2019-06-05 12:41:11 +02:00
Dominik Csapak
7a1aa33bba gui: ceph: use ServiceList for MDS list
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-05 12:41:11 +02:00
Thomas Lamprecht
7ce1e64ccf gui: ceph services: adapt create to ID in API path
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-05 12:41:11 +02:00
Thomas Lamprecht
48983cdb8c api: create mgr: also have id in path for create
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-05 12:41:11 +02:00
Thomas Lamprecht
a91fa58ebd api: mgr create: code cleanup, redue heavy empty line usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-05 12:41:11 +02:00
Thomas Lamprecht
a435eaf9a0 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>
2019-06-05 12:41:11 +02:00
Thomas Lamprecht
7760a8beba api: mon create: code cleanup, redue heavy empty line usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-05 12:41:11 +02:00
Dominik Csapak
a6c60aed86 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>
2019-06-05 12:41:11 +02:00
Thomas Lamprecht
6dc136a178 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>
2019-06-05 12:41:11 +02:00
Thomas Lamprecht
b32e925587 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>
2019-06-05 10:50:54 +02:00
Thomas Lamprecht
5ebb945c3c api: osd destroy: pull out cleanup param
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-05 10:49:53 +02:00
Dominik Csapak
9b44d03dad 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>
2019-06-05 10:43:12 +02:00
Thomas Lamprecht
0154e79558 followup: api: osd create: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-05 10:01:45 +02:00
Thomas Lamprecht
0e5f83badc api: osd create: use verbose_description and document defaults directly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-05 10:01:01 +02:00
Thomas Lamprecht
afa09e02c7 fixup: ceph osd create: also put real UUID when adding a lv
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-05 09:46:38 +02:00
Dominik Csapak
7783f755e3 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>
2019-06-05 08:55:28 +02:00
Thomas Lamprecht
4fd2027ea2 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>
2019-06-05 08:48:01 +02:00
Thomas Lamprecht
76bbe3e2d5 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>
2019-06-04 17:45:38 +02:00
Dominik Csapak
d4e7f1bf3d 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>
2019-06-04 17:19:33 +02:00
Thomas Lamprecht
d79e9eb587 followup code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 17:18:09 +02:00
Dominik Csapak
48e8a06de1 ceph: add ceph-volume helper
those will be needed for creation/destruction of nautilus osds

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 17:16:03 +02:00
Dominik Csapak
da92b5fcce ceph: mon: use ceph_service_cmd to enable/disable the systemd service
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 17:07:43 +02:00
Dominik Csapak
b521573040 ceph: mgr: delete auth key on destruction
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 17:07:39 +02:00
Dominik Csapak
919513b01b 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>
2019-06-04 16:51:18 +02:00
Dominik Csapak
66fb085fc0 ceph: add an index for mgr services
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 16:45:04 +02:00
Thomas Lamprecht
930c1d6a15 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>
2019-06-04 16:42:37 +02:00
Thomas Lamprecht
9ecb3d10e4 followup code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 16:42:37 +02:00
Dominik Csapak
d5373b7dc3 ceph: factor out the service info generation
and include a call to $type metadata to include the version

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 14:57:10 +02:00