3807 Commits

Author SHA1 Message Date
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
Wolfgang Link
1c0dbfacc9 Add function storageIsShared
This function extracts the shared flag of the storage state.
2018-11-22 08:50:32 +01:00
Wolfgang Link
e46f232c29 Add parameter storage shared
So we know in the content call if storage is shared.
This is used by removeImageButton.
2018-11-22 08:50:32 +01:00
Thomas Lamprecht
5063987dfe ui: qemu/HW: menu setDisable mustn't ignore caps
We passed a 'disable' config to those menu items on creation, but
promptly ignored that after the first set_button_status call, which
only checked if it's possible to add another device, but not if our
capabilities heuristic is OK.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 08:40:15 +01:00
Thomas Lamprecht
6d350cdc71 ui: lxc/net: s/i.e./e.g./ and transform to emptyText
We want to name an example here, so `e.g.` would be better.

Also show that in the field if empty. No changes to gettext stuff.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-20 11:10:07 +01:00
Thomas Lamprecht
ba196e4b49 bump version to 5.2-12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 15:26:20 +01:00
Thomas Lamprecht
5e7d2a1845 d/control: bump version dependency for libpve-common-perl
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 15:04:38 +01:00
Dominik Csapak
aea0c82e74 rename PVE::API2::Storage::Scan to PVE::API2::Scan
and use it in the API

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-19 15:04:31 +01:00
Dominik Csapak
b81f821bf9 API/Scan: use scan_usb from PVE::SysFSTools
the code moved from PVE::Storage there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-19 15:04:02 +01:00
Dominik Csapak
b2c9bf16e0 API/Scan: remove unused HTTP::Status module
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-19 15:03:50 +01:00
Dominik Csapak
d87c583df7 Scan: whitespace fixes
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-19 15:03:45 +01:00
Dominik Csapak
7a6e7ec7d1 copy storage scan API from pve-storage
this will be used for the api endpoints in the future as
PVE::API2::Scan instead of PVE::API2::Storage::Scan since it will
contain endpoints to other modules (like qemu-server for pci/usb
scanning)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-19 15:03:12 +01:00
Thomas Lamprecht
695b6120eb ui: dc/storage: allow to add CephFS
Allow to add CephFS storage over GUI. Reuse viewcontroller and model from RBD
to detect if we can do a "hyper-converged" addition (with PVE maintained Ceph)
or if only external is possible.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 10:40:49 +01:00
Thomas Lamprecht
fbfcef596f ui: rbd: storage: obsolete strange getBinds binding assembly
this was added for our (also in other places used):
> xtype: me.isCreate ? 'pveCephPoolSelector' : 'displayfield',
construct. But as displayfield does not has a submitValue setter we
cannot bind it generally.

So add such a setter with a small override and declare the bindings
direct when declaring the items, less side effects and all the
configurations for an item stays in the same place.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 10:40:49 +01:00
Thomas Lamprecht
b262ec8d41 ui: storage: RBD: factor out view- model/controler
will be reused for CephFS, look at this with git's ignore whitespace
change flag '-w' to see that the changes consist mostly of indent and
hunk movement changes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 10:40:49 +01:00
Thomas Lamprecht
e39b0f1325 fix #1224: ui: ACLAdd: allow to filter by username
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 10:22:48 +01:00
Thomas Lamprecht
4038c603dd fix #1358: ui: show clustername besides 'Datacenter' node, if available
If we get the cluster name (successful login with '/' Sys.Audit
permissions) then display it in the resource tree's root node.

This updated on login and all ticket refreshs (every 15 minutes).
I currently have no functionallity to refresh it actively on cluster
create over WebUI, as it's not a straight forward change there.
Further, this is something which does not changes often (in
production), and we cannot detect CLI or API triggered (from non-pve
clients) cluster creations anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 10:15:14 +01:00
Thomas Lamprecht
27ab165b31 followup: split up and pull out html tags from gettext
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-16 12:19:50 +01:00
Tim Marx
2882eba124 fix #1928: ct snapshot: changed rollback message to warning
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2018-11-16 12:15:05 +01:00
Thomas Lamprecht
1de71bb8d0 d/control: bump version dependency to pve-doc-generator
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-14 16:20:51 +01:00