Christian Ebner [Tue, 22 Jan 2019 10:49:22 +0000 (11:49 +0100)]
pvenode: Return MAC address used for WoL call on success
Use the new format to verify the MAC addresses.
The wakeonlan API call now returns the MAC address of the node to wake on
successful sending of the WoL packet.
pvenode finally displays this MAC address to the user as feedback.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Thomas Lamprecht [Wed, 16 Jan 2019 12:40:24 +0000 (13:40 +0100)]
NodeConfig: support patterns in check_type
Add pattern support for the check_type method used by the
parse_config method. It would be much better to integrate the missing
stuff into either the JSONSchema check_prop or parse_config methods,
should be mostly the "description" assembly anyway, and if that is
not possible or to hacky it'd be still nice to have a common single
of those parser, not multiple ones (pve-container, qemu-server, ...)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Most other storage types do not have backup in their default content
selection when creating a new storage, so there it make sense to
initially have maxfiles disabled. But with CephFS we have default
_only_ backup as content type, so let it enabled here - as else one
must change something in the content selector to enable the field.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 27 Nov 2018 14:22:24 +0000 (15:22 +0100)]
ui: cluster: require ring0_addr if joinee's ring and node addr differ
Pass the ring addresses from the node we use to join a cluster with
the encoded cluster info. Use it to determine if the nodes public
address (i.e., the onei t's node name resolves to) differs from it'S
ring0 address, if that's the case and the cluster was created with
PVE tooling then we know that it's highly probable that the ring0 is
on another network than the public net, so require the ring0_addrss
field in this case. If we have a false positive, it's not to bad
here.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 27 Nov 2018 14:37:32 +0000 (15:37 +0100)]
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.
Thomas Lamprecht [Mon, 26 Nov 2018 15:56:27 +0000 (16:56 +0100)]
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.
Thomas Lamprecht [Mon, 26 Nov 2018 15:11:30 +0000 (16:11 +0100)]
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>
Thomas Lamprecht [Mon, 26 Nov 2018 15:52:05 +0000 (16:52 +0100)]
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>
Thomas Lamprecht [Fri, 23 Nov 2018 17:49:46 +0000 (18:49 +0100)]
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>
Thomas Lamprecht [Fri, 23 Nov 2018 11:01:39 +0000 (12:01 +0100)]
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>
Thomas Lamprecht [Fri, 23 Nov 2018 11:01:38 +0000 (12:01 +0100)]
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>
Thomas Lamprecht [Fri, 23 Nov 2018 06:09:49 +0000 (07:09 +0100)]
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>
Thomas Lamprecht [Thu, 22 Nov 2018 13:45:42 +0000 (14:45 +0100)]
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>
Dominik Csapak [Thu, 22 Nov 2018 10:35:45 +0000 (11:35 +0100)]
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
Thomas Lamprecht [Tue, 20 Nov 2018 08:34:39 +0000 (09:34 +0100)]
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>
Thomas Lamprecht [Tue, 20 Nov 2018 07:47:09 +0000 (08:47 +0100)]
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>
Thomas Lamprecht [Tue, 20 Nov 2018 07:44:04 +0000 (08:44 +0100)]
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>