3826 Commits

Author SHA1 Message Date
Thomas Lamprecht
8354741294 fixup: s/wipe_disk/wipe_disks/ as we can to multiple at once
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-28 10:30:58 +01:00
Alwin Antreich
b4bf4a376f Factoring the wipe_disk out into CephTools
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-11-28 10:25:16 +01:00
Thomas Lamprecht
cccaf366a2 ceph: fixup s/add_storage/add-storage/
it's just the nicer interface and we want to go away from underscore
usage in new calls

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-28 10:07:08 +01:00
Thomas Lamprecht
8181673e71 fix #1430: ceph init: allow to specify separate cluster network
Allow to specify a separate cluster network when initializing ceph.
Ceph docs[0] imply a possibility for performance increase and
enhanced security in environments where the public network serves not
fully trusted peers, which could else provoke a DOS to the cluster
traffic[0].

Make this optional, but if passed `network` is required too.

[0]: http://docs.ceph.com/docs/luminous/rados/configuration/network-config-ref/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-28 09:29:22 +01:00
Thomas Lamprecht
b565ae16da ui: cephfs: only allow CephFS creation if MDS is configured
Introduce the mdsCount again, I know remember again why I had it in
v3 of my CephFS series.. Use this to disable the CephFS create button
if we have no MDS configured, as this is a requirement.
Further change the gettext for 'No XY configure' to a format string
so that it can be reused.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-27 15:24:13 +01:00
Thomas Lamprecht
5d7747290c api: cephfs: reuse rados connection when polling for active MDS
no point in recreating one, we have an active one from earlier

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-27 15:24:08 +01:00
Thomas Lamprecht
20783672bd pveceph: ensure ceph-fuse gets uptdated when installing ceph server
as we depend on ceph-fuse elsewhere (pve-storage) this gets installed
from Debians repositories with the Ceph 10 version.
So ensure that an up to date version, from our current supported Ceph
release, gets installed when doing `pveceph install` else you may
fall into certain issues which would have been already resolved with
a newer version.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-27 15:24:08 +01:00
Thomas Lamprecht
83a7c6e5a6 update shipped aplinfo index
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-26 18:45:55 +01:00
Thomas Lamprecht
614a0084c1 pveceph: mds destroy: fixup parameter s/id/name/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-26 17:11:37 +01:00
Thomas Lamprecht
b51bfddaca is_any_mds_active: check if state is correct
a MDS gets transferred to the active MDS info once it got selected as
active, not once it really _is_ active, it can be there in the
'up:creating' state. So ensure that a MDS with 'u:active' could be
found

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-26 16:55:37 +01:00
Dominik Csapak
123273bb92 gui: refactor render_full_name
this also fixes a missing  htmlEncode in UserSelector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-26 12:30:30 +01:00
Thomas Lamprecht
c460f95dc1 bump version to 5.1-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 19:16:40 +01:00
Thomas Lamprecht
b9031ded3f api: cephfs: wait for MDS to become active
A MDS gets only active once a FS is there, and we need an MDS active
to be able to add a storage, as the CephFS plugin does an immediate
mount check. As an MDS needs some time to get active we had a
problematic time window where this mounting could fail.

Wait for a MDS to get in active state.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 18:49:48 +01:00
Thomas Lamprecht
2ed99b32ff api: cephfs: check if SID is free when add_storage is set
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 18:35:16 +01:00
Thomas Lamprecht
a75068b184 update bump to 5.3-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 16:17:46 +01:00
Thomas Lamprecht
174daedcb8 api/ceph: import file_set_contents
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 16:17:13 +01:00
Thomas Lamprecht
57d471964d bump version to 5.3-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 15:13:45 +01:00
Thomas Lamprecht
1563353fd6 pveceph: also install ceph-mds for hyper converged install
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 15:11:03 +01:00
Thomas Lamprecht
3311f92cca bump version to 5.3-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 14:11:27 +01:00
Thomas Lamprecht
845956ccaf ui: add CephFS integration
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 13:59:49 +01:00
Thomas Lamprecht
db5acea2c3 pveceph: move to sub commands
add aliases for the existing ones, ignore the ones for MDS and
CephFS, they did never hit any repo.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 13:33:12 +01:00
Thomas Lamprecht
d7d317a562 ceph: add CephFS create and list API
Allow to create a new CephFS instance and allow to list them.

As deletion requires coordination between the active MDS and all
standby MDS next in line this needs a bit more work. One could mark
the MDS cluster down and stop the active, that should work but as
destroying is quite a sensible operation, in production not often
needed I deemed it better to document this only, and leaving API
endpoints for this to the future.

For index/list I slightly transform the result of an RADOS `fs ls`
monitor command, this would allow relative easy display of a CephFS
and it's backing metadata and data pools in a GUI.

While for now it's not enabled by default and marked as experimental,
this API is designed to host multiple CephFS instances - we may not
need this at all, but I did not want to limit us early. And anybody
liking to experiment can use it after the respective ceph.conf
settings.

When encountering errors try to rollback. As we verified at the
beginning that we did not reused pools, destroy the ones which we
created.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Co-authored-by: Alwin Antreich <a.antreich@proxmox.com>
2018-11-23 13:33:12 +01:00
Thomas Lamprecht
9700a50f53 ceph: add MDS create/delete/list API
Allow to create, list and destroy and Ceph Metadata Server (MDS) over
the API and the CLI `pveceph` tool.

Besides setting up the local systemd service template and the MDS
data directory we also add a reference to the MDS in the ceph.conf
We note the backing host (node) from the respective MDS and set up a
'mds standby for name' = 'pve' so that the PVE created ones are a
single group. If we decide to add integration for rank/path specific
MDS (possible useful for CephFS with quite a bit of load) then this
may help as a starting point.

On create, check early if a reference already exists in ceph.conf and
abort in that case. If we only see existing data directories later
on we abort but do not remove them, they could well be from an older
manual create - where it's possible dangerous to just remove it. Let
the user handle it themself in that case.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Co-authored-by: Alwin Antreich <a.antreich@proxmox.com>
2018-11-23 13:33:12 +01:00
Thomas Lamprecht
5870ae1b8b ceph: move create/destroy pool to CephTools
We will reuse this in the future, e.g., when creating a data and
metadata pool for CephFS.

Allow to pass a $rados object (to reuse it, as initializing is not
that cheap) but also create it if it's undefined, fro convenience.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 13:33:12 +01:00
Thomas Lamprecht
b24080c0ee api: document default for ceph service start/stop/restart
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 12:40:46 +01:00
Dominik Csapak
6140c3c815 gui: add ceph monitor restart button
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-23 12:23:42 +01:00
Dominik Csapak
81b29681d8 gui: add osd restart button
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-23 12:23:42 +01:00
Dominik Csapak
b0317ede2c ceph: add service restart api call
like start/stop but for restart, this makes maintenance a bit easier

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-23 12:23:42 +01:00
Thomas Lamprecht
5d2079a303 ui: ZFS: don't use gettext for ZFS specific columuns
hard to translate sensible and also better for user to have them in
english as much more can be found when searching those specific
terms. To what would one translate CKSUM for example?

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-23 07:13:07 +01:00
Thomas Lamprecht
106433617e api/hardware: fixup: add missing file
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 15:05:52 +01:00
Thomas Lamprecht
694517f083 bump version to 5.2-13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 15:01:31 +01:00
Thomas Lamprecht
464efe289c fix #1575: use reboot for node reboot
As requested by various users and also for Dominik's upcomming
restart Ceph [Mo, Mgr, ...} series where else two buttons just called
reboot would be exacly besides each other.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 14:45:46 +01:00
Thomas Lamprecht
1cc257e5d3 bump version dependency of libpve-common-perl to 5.0-43
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 14:23:57 +01:00
Thomas Lamprecht
3bca5efd9c api: move PCI from Scan to Hardware path
as discussed[0] lets move this to /nodes/{node}/hardware/pci

Put this in its own subfolder and adapt module names and paths in UI.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2018-November/034694.html
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 14:20:09 +01:00
Dominik Csapak
1536962631 gui: let users add PCI devices
this enables the gui part to enable the user to add a pci device
via the gui

we disable the button after 4 devices, since that is the maximum
in the backend

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-22 13:31:39 +01:00
Dominik Csapak
ed6296c4c5 gui: add qemu/PCIEdit
this patch adds the PCIEdit window and InputPanel uses PCISelector
and MDevSelector

when we detect an iommugroup of -1, we put a warning on top to inform
the user that IOMMU is not activated (but let him add the devices
regardless, so that he can use it after IOMMU is activated)

also puts a warning if he selects a device that shares an iommugroup
with a different device (but not the same device with different
function). that detection is not perfect, but we cannot do really
better

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-22 13:31:31 +01:00
Dominik Csapak
e1a9da2c7f gui: add MDevSelector
this is used to select a mediated device type

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-22 13:31:31 +01:00
Dominik Csapak
60bb91ba55 gui: add form/PCISelector
this adds a form field for selecting a pci device

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-22 13:31:31 +01:00
Dominik Csapak
35897d2018 api/Scan: allow to get a PCI device's mediated devices
this is for the gui to be able to select mediated devices
path ist /node/NODE/scan/pci/PCIID/mdev

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-22 13:30:50 +01:00
Dominik Csapak
fb766a62de api/Scan: allow to scan a nodes PCI devices
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-22 13:30:21 +01:00
Thomas Lamprecht
3489c56392 ui: storage/content: reference volid in confirm window and use new task description
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 13:27:34 +01:00
Thomas Lamprecht
21906d9b0b ui: storage/content: jslint and styling fixups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 13:26:56 +01:00
Wolfgang Link
8d3f227010 Add imageRemoveButton
If an image has a <vmid>  encoded in the image name
and the guest does not exist in the cluster
we can delete it on the GUI.

Also, if a config exists on another node and the storage is local
we can delete.

In all other cases, it is not allowed to delete it.

For safety reason the safe remove windows are used.
2018-11-22 11:57:19 +01:00
Thomas Lamprecht
5599da95a8 CephTools: cleanup module usage
as done with the api ceph modules:
most of this was imported by just copying without verifying if all is
actually required. Some lost its purpose as we re-used more from our
existing module code base (e.g., pve-common) but wasn't actually
removed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 11:06:12 +01:00
Thomas Lamprecht
6eb4f0271f api/Ceph: actually use imported file_{g,s}et_contents 2018-11-22 11:06:12 +01:00
Thomas Lamprecht
86573897c0 api/Ceph: cleanup module usage
most of this was imported by just copying without verifying if all is
actually required. Some lost its purpose as we re-used more from our
existing module code base (e.g., pve-common) but wasn't actually
removed.

As this file includes two perl modules you need to take a bit caution
when looking at this, as some things are used in one module but not
the other - simple grep'ing at this may give false positives.

Also add PVE::API2::Storage use which was missing here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 11:06:12 +01:00
Thomas Lamprecht
3b1f0fc22f api/CephOSD: cleanup and sort module usage
most of this was imported by just copying without verifying if all is
actually required. Some lost its purpose as we re-used more from our
existing module code base (e.g., pve-common) but wasn't actually
removed.

As this file includes two perl modules you need to take a bit caution
when looking at this, as some things are used in one module but not
the other - simple grep'ing at this may give false positives.

Also include the missing IO::File use.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 11:06:12 +01:00
Wolfgang Link
e7ef384b30 Move removeButton in a variable
The move is necessary to hide the removeButton.
2018-11-22 08:50:32 +01:00
Wolfgang Link
caa6adc62d Add imagedestroy to SafeDestroy 2018-11-22 08:50:32 +01:00
Wolfgang Link
8bf946980d Add function guestNode
This function extracts the node where the guest resists.
2018-11-22 08:50:32 +01:00