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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
previous commit 76235ae132c69898048c1f7579e7da40adbd7a6e accidentally
removed this column during refactoring, let's reintroduce it again.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>
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>
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>