Store additional OSD information in ZK

Ensures that information like the FSIDs and the OSD LVM volume are
stored in Zookeeper at creation time and updated at daemon start time
(to ensure the data is populated at least once, or if the /dev/sdX
path changes).

This will allow safer operation of OSD removals and the potential
implementation of re-activation after node replacements.
This commit is contained in:
2022-05-02 12:11:32 -04:00
parent cea8832f90
commit 464f0e0356
4 changed files with 159 additions and 11 deletions

View File

@ -540,7 +540,7 @@ class ZKHandler(object):
#
class ZKSchema(object):
# Current version
_version = 7
_version = 8
# Root for doing nested keys
_schema_root = ""
@ -700,6 +700,12 @@ class ZKSchema(object):
"node": "/node",
"device": "/device",
"db_device": "/db_device",
"fsid": "/fsid",
"ofsid": "/fsid/osd",
"cfsid": "/fsid/cluster",
"lvm": "/lvm",
"vg": "/lvm/vg",
"lv": "/lvm/lv",
"stats": "/stats",
},
# The schema of an individual pool entry (/ceph/pools/{pool_name})