Commit Graph

4176 Commits

Author SHA1 Message Date
Thomas Lamprecht
b9355a8c27 service: add restart on-failure to pveproxy and pvedaemon
This way they can cleanly exit (with a SIGTERM or systemctl stop) but
will get restarted if killed or they abort, but only for
StartLimitIntervalSec= time period with a total maximal count of
StartLimitBurst= retries.
See `man systemd.unit` for details, default are 10s total
restart retry period with at max 5 total retry counts, after that the
unit will placed in the failure state. So this is a best effort try
with no real downside.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-05 08:48:01 +02:00
Thomas Lamprecht
4f6eb932a7 drop references to un-maintained sheepdog plugin
as already announced over two months ago[0], remove the unofficial
SheepDog plugin now completely. Besides that it was never fully
supported in Proxmox VE one of its main developer and ex-maintainer
declared it as abandoned[1], and thus just let's remove it, git
allows to resurrect it any time if a wonder happens anyway.

[0]: https://pve.proxmox.com/pipermail/pve-user/2019-March/170497.html
[1]: http://lists.wpkg.org/pipermail/sheepdog/2019-March/068449.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 17:45:38 +02:00
Dominik Csapak
4edf7a839e ceph: add db/wal size helper
reads the sizes from the ceph config db first, then from the
ceph config, first from the osd section then global

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 17:19:33 +02:00
Thomas Lamprecht
48d734600b followup code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 17:18:09 +02:00
Dominik Csapak
44d964cd6c ceph: add ceph-volume helper
those will be needed for creation/destruction of nautilus osds

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 17:16:03 +02:00
Dominik Csapak
569a8444e1 ceph: mon: use ceph_service_cmd to enable/disable the systemd service
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 17:07:43 +02:00
Dominik Csapak
597e4c7a97 ceph: mgr: delete auth key on destruction
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 17:07:39 +02:00
Dominik Csapak
dece9df27c ceph: remove 'exclude-manager' api parameter
since we will have a seperate gui for the manager, we do not need this
anymore

this is a breaking api change

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 16:51:18 +02:00
Dominik Csapak
a05be6f423 ceph: add an index for mgr services
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 16:45:04 +02:00
Thomas Lamprecht
03d58b2648 get_cluster_service: do not always call cfs_update
This was done to ensure the nodelist, which get_node_kv uses
internally to loop over all nodes, is filled. But, everything coming
through API/CLI already has a cfs_update called so this is not
required outside from development testing calls. As we normally do
not do this for such calls, cfs_update call is a prerequisite for
such things. The better solution would be handling this internally in
get_node_kv, e.g., by checking if $clinfo->{versionn} was set once,
and if not call to cfs_update, or maybe even better, so adapt the IPC
call for a possibility to get the KV status hash for all nodes.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 16:42:37 +02:00
Thomas Lamprecht
bf65825bf5 followup code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 16:42:37 +02:00
Dominik Csapak
4d8b2fe265 ceph: factor out the service info generation
and include a call to $type metadata to include the version

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 14:57:10 +02:00
Dominik Csapak
b17b5ee3df ceph: refactor broadcast_ceph_services and get_cluster_service
and use the broadcast when a service is added/removed
we will use 'get_cluster_service' in the future when we generate a list
of services of a specific type

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 14:56:24 +02:00
Dominik Csapak
5cef7366dc ceph: get_local_services: also check /var/lib/ceph/$type
so we do not miss disabled services

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 14:55:45 +02:00
Dominik Csapak
f9721131de ceph: add missing link for 'restart' in ceph api
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-04 14:55:13 +02:00
Thomas Lamprecht
6f4fa3d941 add beta text with link to bugtracker
to not confuse people, especially if they share screen shots or the
like...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 13:38:09 +02:00
Thomas Lamprecht
f1f1c34141 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
6d7b3daaf0 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
1f6f523fc3 gui: ceph: fix version comparison
'>' on strings is not numeric, so we use our compare_ceph_versions helper

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-31 15:46:01 +02:00
Dominik Csapak
f17bca3ed2 gui: ceph: hide outdated osd line if possible
when no osd is outdated, hide the line with 'outdated osts' in the
dashboard

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-31 15:45:54 +02:00
Dominik Csapak
1c45cdc433 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
Thomas Lamprecht
cb73156f9b followup: make ceph version handling more flexible
ceph has a bad reputation for chaging such minor things a few times,
even during a stable release, and as here a bit more flexibillity
cost exactly nothing let's do so and accept versions with one to
arbitrary version levels

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-31 15:45:37 +02:00
Dominik Csapak
4229afb885 gui: add compare_ceph_versions
this correctly compares ceph versions by its numeric parts
the way it is written, it can be used as a function for 'sort'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-31 15:28:14 +02:00
Tim Marx
8c699bde09 whitespace cleanup
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-05-31 15:24:57 +02:00
Dominik Csapak
177b83abb3 fix #2223: fix set_button_status isCDRom
value is not always a string (depending on the value that changed),
so we have to convert it to a string to have a 'match' function

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-31 11:03:58 +02:00
Thomas Lamprecht
3d58c0f939 pveceph install: allow nautilus and use as default
We allow 'luminous' still for testing purpose, it could be also
useful if one already upgraded his cluster to PVE 6.0 / Buster but
not yet ceph and due to a incident needs to setup a new luminous node
on Buster to get  healthy again. This is fabricated but not
unthinkable, as it costs nothing and isn't available for WebUI user
just keep it for now. Remove with a future point release though.
Use non-public repo for now, will be updated to testing soon.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-27 16:17:29 +02:00
Thomas Lamprecht
840a2f30fb pveceph install: output warnings from apt update, they're relevant
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
08c09e06a9 gui: add datacenter ceph option
links to the cluster wide dashboard
also link the datacenter dashboard to this instead of a random node

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
0e4e2d72fc gui: ceph: tweak heights
so that it uses the space better in 1-column and 2-column mode

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
622c4347d1 gui: ceph: add Services panel
to show the mon/mgr/mds services

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
21bd683ca1 gui: ceph: add pg pie chart
similar to what the ceph mgr dashboard shows, gives a rough
overview to pg state

also make the pg list scrollable to avoid to big panels
and show the state color with the pg category

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
a23565f4b1 gui: ceph: add metadata api call to dashboard
and use it for displaying outdated osds

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
813b9a0fc2 gui: ceph: make status panel node independant
and use the cluster wide api call if no nodename is given

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
e8324041e4 gui: ceph: prepare statusdetail for metadata
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
11b3410fa6 gui: ceph: remove mon specific code from StatusDetail
will be handled in ceph/Services.js

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
bf59da1b3b gui: ceph: add Services.js
Used for a new Panel in ceph dashboard, shows the ceph services
managed by us (mon,mgr,mds)

some code is copied from 'ceph/StatusDetail.js' and is not necessary there
anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
b2504d9dc8 gui: ceph: add get_ceph_icon_html to utils
returns html code for a ceph health icon, will be used in Services.js

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
10b5eef12d gui: ceph: add 'old' to ceph health
this will be used for the dashboard to show outdated services/osds

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
924b199341 gui: StateProvider: add fireevent option to set
this way, we can control if we want to fire the 'statechanged' event
when we set a value in the stateprovider

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00
Dominik Csapak
cf5fa92795 add cluster wide ceph api calls
add two new api calls in /cluster/ceph

status:
the same as /nodes/NODE/ceph/status, but accessible without
nodename, which we don't need, as in the hyperconverged case, all nodes
have the ceph.conf which contains the info on how to connect to the
monitors

metadata:
combines data from the cluster filesystem about the services,
as well as the 'ceph YYY metadata' info we get from ceph.
with this info we can convieniently display which services exists,
which are running and which versions they have

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-27 16:17:20 +02:00
Thomas Lamprecht
5af9556301 followup code cleanup for: broadcast ceph service data to cluster
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-27 15:52:12 +02:00
Dominik Csapak
27b5a728f4 broadcast ceph service data to cluster
so that we have a list of all existing ceph services in the cluster

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 15:52:12 +02:00
Thomas Lamprecht
0b9b4dfdd1 followup code cleanup for: add get_local_services for ceph
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-27 15:52:12 +02:00
Dominik Csapak
3067db5e13 add get_local_services for ceph
this returns a hash of existing service links for
mds/mgr/mons so that we know which services exists

this is necessary since ceph itself does not save if a service is
defined somewhere, only when it runs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 15:30:35 +02:00
Thomas Lamprecht
b597d23d35 pvecfg: adapt version and release semantic
Wit commit bcef9bde68 we switched over
to using the dpkg-dev provided helpers to set package version,
architecture and such in the buildsystem.

But unlike other repositories we used the version also for giving it
back over the API through the during build generated PVE::pvecfg
module, which wasn't fully updated to the new style.

This patch does that, and also cleans up semantics a bit, the
following two changed:

release is now the Debian release, instead of the "package release"
(i.e., the -X part of a full package version).
version is now simply the full (pve-manager) version, e.g., 6.0-1 or
the currently for testing used 6.0-0+1

This allows to do everything we used this information for even in a
slightly easier way (no  string concat needed anymore), and fits also
with the terminology we often used in our public channels (mailing
lists, forum, website)

Remove some cruft as we touch things.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 16:11:43 +02:00
Thomas Lamprecht
17dcedb801 api/ceph: create mon: drop now unsupported set-uid on autkey create
From Nautilus release changelog[0]:
> The auid property for cephx users and RADOS pools has been removed.
> This was an undocumented and partially implemented capability that
> allowed cephx users to map capabilities to RADOS pools that they
> “owned”. Because there are no users we have removed this support.

[0]: https://ceph.com/releases/v14-2-0-nautilus-released/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 15:22:42 +02:00
Thomas Lamprecht
6625fa65d1 ceph install: pull out ceph packages and apt command
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 13:41:16 +02:00
Thomas Lamprecht
7520303f90 ceph: install: run_command is imported, use directly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 13:39:41 +02:00
Thomas Lamprecht
a4cf33a69c ceph: drop systemd_managed - we now always are
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 13:35:39 +02:00
Thomas Lamprecht
880c01e319 api: install ceph: remove old cruft
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 12:40:33 +02:00