Commit Graph

82 Commits

Author SHA1 Message Date
Aaron Lauterer
6242a6009d ui: osd: mon: mds: warn if stop/destroy actions are problematic
Check if stopping of a service (OSD, MON, MDS) will be problematic for
Ceph. The warning still allows the user to proceed.

Ceph also has a check if the destruction of a MON is okay, so let's use
it.

Instead of the common OK button, label it with `Stop OSD` and so forth
to hopefully reduce the "click OK by habit" incidents.

This will not catch it every time as Ceph can need a few moments after a
change to establish its current status. For example, stopping one of 3
MONs and then right away destroying one of the last two running MONs
will most likely not trigger the warning. Doing so after a few seconds
should show the warning though.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-11-17 18:27:48 +01:00
Aaron Lauterer
d9415cc4f7 ui: osd: warn if removal could be problematic
If an OSD is removed during the wrong conditions, it could lead to
blocked IO or worst case data loss.

Check against global flags that limit the capabilities of Ceph to heal
itself (norebalance, norecover, noout) and if there are degraded
objects.

Unfortunately, the 'safe-to-destroy' Ceph API endpoint will not help
here as it only works as long as the OSD is still running. By the time
the destroy button is enabled, the OSD will already be stopped.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-11-17 18:27:48 +01:00
Aaron Lauterer
8fdc97938b ui: osd: send in/out cmd to currently used node
The in & out commands for OSDs are not node specific and can be run on
any node in the Ceph cluster. By sending them to the node currently used
to access the UI they can still be sent even if the node on which the
OSDs are located is down.

This helps in a disaster scenario where a node is down. By default Ceph
will mark a downed OSD as out after 10 minutes. This could be too long
in some situations. Running the CLI command to mark the OSD as out
earlier on one of the remaining nodes does work, but if the admin is not
used doing it this way, this adds stress, in a potentially already
stressful situation.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-03-03 12:15:38 +01:00
Thomas Lamprecht
16c6f8afa6 ui: ceph osd: just spread default + custom class values directly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-28 13:11:18 +01:00
Aaron Lauterer
e7ec42ff45 fix #3451 ui: ceph create osd: show custom device classes
Showing already configured custom device classes makes it easier to
create new OSDs with custom device classes.

The Crush map contains a list of all OSDs in the cluster, including
their device class.
This means we can create a list of used device classes from it, avoiding
adding another API endpoint.

Fetching the crushmap should also be quite a bit less data that needs to
be transferred, compared to the other possible nodes/<node>/ceph/osd
endpoint, especially in larger clusters.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-01-28 12:31:39 +01:00
Fabian Ebner
2ee96d1c40 ui: ceph: osd: handle edge case with dead node
If there is a left-over entry for a dead node in the ceph osd tree
the panel wouldn't show and produce an
    Uncaught TypeError: data.versions is undefined
because of an access
    node.version = data.versions[node.name];
further below (not visible in the patch itself).

AFAICT, the same issue would also happen when something went wrong
with getting the broadcasted ceph-versions, or when a node is part
of Ceph, but not PVE.

Handle the situation gracefully by always initializing data.versions.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-11-16 14:11:45 +01:00
Dominik Csapak
30a6ce73f4 ui: ceph: add more compatibilty code for versions
we now have to handle the version of 'old' nodes, as well as the
new nodes, which are missing the 'version' field in the metadata/osd call

so set the 'versions' object to a default empty object for osds
and get the host version directly from the treenode
(the parent node of the osd node)

also compare the host version in the dashboard by getting first the
new version field, and the old one as fallback.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-12 17:02:27 +01:00
Fabian Ebner
76e0823a97 partially fix #2285: ui: ceph: allow selecting partitions
For DB and WAL disks, not only partitions will show up now, but one
more type of disk, that didn't show up before: Namely, GPT-partitioned
disks with any partitions detected as used.

It's confusing as the size shown is of the full disk, with no
indication that a new partition will be appended at the end. This
problem was already present before, but only affected GPT-partitioned
disks where no usage on a partition was detected.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-11-11 21:50:54 +01:00
Dominik Csapak
d6fb92d747 ui: ceph: make version handling actually future proof
It seems we did not prepare the GUI enough for the API changes
planned when stopping to broadcast the old single string version. We
have to use the node specific versions, not the global 'versions'
object.

Also use the `PVE.Utils.compare_ceph_versions` everywhere, since some
versions are strings and others are the parts of the version (e.g.
["16", "2, "6"])

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-10 14:36:23 +01:00
Fabian Ebner
596bb7b11a api: ceph: osd: create: rename size parameters
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-09 11:29:34 +02:00
Dominik Csapak
1bd7bcdbf1 ui: Utils: use render functions from widget-toolkit
they live there now, so we can delete them here and use the ones from
widget-toolkit instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 18:34:34 +02:00
Fabian Ebner
b6b4c816a4 ui: ceph: fix keeping selection after operation
Found by having the console open and getting a message that 'me' (the
controller) does not have a method getRootNode()

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-01-26 18:21:44 +01:00
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +01:00
Thomas Lamprecht
0b9e52ddc6 ui: osd: do not confuse view and controller scopes
The me variable should only be assigned from `this`, else it gets
confusing and wrong fast.

here the managed listener tried to do a this.reload, but this is
ambiguous here, and not the controller.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-28 10:49:52 +01:00
Thomas Lamprecht
4f14c9c94b ui: osd: eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-28 10:49:52 +01:00
Thomas Lamprecht
37dbbda8d9 followup: correct NVMe casing
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-22 18:50:04 +02:00
Alwin Antreich
c4f39f9a23 ceph: gui: add device class select on OSD create
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2020-10-22 18:50:04 +02:00
Dominik Csapak
d0cfe2eadd ui: use pmxDiskSelector from widget-toolkit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-16 11:43:05 +02:00
Stoiko Ivanov
f71b7c28ff change .pve-hint to .pmx-hint css-class
With introducing pmx-hint to pmg as well, by adding a 'pmx-hint' css-class
to proxmox-widget-toolkit, it makes sense to use the definition everywhere.
this patch drops the .pve-hint class from pve's css and replaces all occurences
in the GUI-source.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-09 09:11:04 +02:00
Dominik Csapak
9b80367057 fix #2340: gui: ceph: handle 'null' versions for hosts
the api returns 'null' for a host that is in the crushmap, but
without actual version information, so just check for falsyness instead
of 'undefined', else we run later into javascript exceptions and no
content on the osd page

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-08-22 14:09:20 +02:00
Thomas Lamprecht
1225095df1 ceph: move flag API endpoints to node-agnostic /cluster/ceph path
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 17:15:37 +02:00
Thomas Lamprecht
3ddccb37ca ceph flags: rename flags2 to flag before public release
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 13:59:44 +02:00
Thomas Lamprecht
cd86360d69 ui: ceph/osd: add a real fix for the window-not-centered issue
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 13:47:36 +02:00
Thomas Lamprecht
844a81ba35 ui: ceph/flags: ensure window is vertically centered with a hack
and some small changes of col width and missing semicolon

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 13:19:43 +02:00
Thomas Lamprecht
f65561968c ui: ceph/flags: commit changes into flag store to avoid having dirty rows
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 13:19:43 +02:00
Thomas Lamprecht
60456379d8 ui: ceph/flags: rename 'Set Flags' to 'Manage Global Flags'
as one can also unset, not only set them, further the scope should be
made a bit more clear, "Cluster could have worked too"

Additionally specify that we mean the "OSD Flags" in the window
title (it's a bit to long for the button)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 13:19:43 +02:00
Dominik Csapak
1c58ffa63b gui: ceph: convert 'set noout' button to 'set flags'
by using the new CephSetFlags EditWindow

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-23 10:23:31 +02:00
Dominik Csapak
5960a66cd8 gui: ceph: add a ceph flag EditWindow
this simply shows a grid with the available flags of the backend,
with a checkbox indicating the status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-23 10:23:31 +02:00
Dominik Csapak
0b88c18abf gui: ceph osd: improve version hints
we now traverse the whole tree for the versions and save not only
the maxversion but if we have mixed versions at all

the traversal contains code to inject the host versions into the treenodes

this way we can omit any icon in case everything is on the same level
and if not we:

* show a check at update hosts and services
* show a 'restart' symbol for osds that only need a restart
* show an 'upgrade' symbol (fa-upload) for osds/hosts that need
  a package upgrade

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-22 15:52:07 +02:00
Thomas Lamprecht
fad28c95b1 ui: remove notify calls on viewmodel
They should not be required and result in exceptions thrown if this
component is used in combination with ExtJS debug sources

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 14:16:11 +02:00
Thomas Lamprecht
a9e23b28ae ui: ceph/osd: merge apply + commit latency columns
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 14:16:11 +02:00
Thomas Lamprecht
cfb103131f ui: ceph/osd: split out used% and total avail column
as "used -> total" is just confusing

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 14:16:11 +02:00
Thomas Lamprecht
413ada0fbb ui: ceph/osd: hide Type column by default
this column shows what type the current row is (host, osd, root),
nowadays that's quite visible through the tree view + icons, so just
hide it by default to make this interface a bit less noisier.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 14:16:11 +02:00
Thomas Lamprecht
a336875216 ui: ceph/osd: only show at max 5 digits after decimal point for weight
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 14:16:11 +02:00
Thomas Lamprecht
3b0ae6b2f0 ui: ceph/osd: rename Action to More
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 14:16:11 +02:00
Thomas Lamprecht
a3f146fcc1 ui: ceph OSD: tweak default column width a bit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 14:16:11 +02:00
Thomas Lamprecht
35c9c3d6da ui: ceph/osd: reintroduce Used column
previous commit 76235ae132c69898048c1f7579e7da40adbd7a6e accidentally
removed this column during refactoring, let's reintroduce it again.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 14:16:11 +02:00
Dominik Csapak
3982a21441 gui: ceph osd: rewrite osd panel and add scrub button
this rewrite of the osd panel converts it to a static declaration of
the layout with a controller/viewmodel logic

while doing this, add icons to buttons, and add a scrub/deep scrub entry

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-11 14:16:11 +02:00
Thomas Lamprecht
deca45c125 followup: HW Raid note: move to bottom and fixup link
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-21 15:28:20 +02:00
Dominik Csapak
bd36813405 gui: add raid warnings for ceph and zfs
Wording is from the installer

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-21 15:19:02 +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
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
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
Thomas Lamprecht
7f08e4fe8c ceph: remove cube symbol for now, confusion with CTs
This was the exact same symbol we use for container, and as this is
_not_ CT related, and box did not make sense for the version here for
me, just remove it for now before we forget it..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-31 16:33:39 +02:00
Thomas Lamprecht
fcb30b4941 ceph: just use "0" as initial value for ceph version
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-31 16:31:02 +02:00
Dominik Csapak
e02970235d gui/ceph: show versions in osd overview
and highlight the not current osds

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-31 15:45:48 +02:00