]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson: use given osd_fsid when mkfs 28800/head
authorKefu Chai <kchai@redhat.com>
Sun, 30 Jun 2019 15:34:53 +0000 (23:34 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 30 Jun 2019 15:42:55 +0000 (23:42 +0800)
commit7b17f983f33ec9f53456dacc74161bd873df9afa
treeb987b2364d805252e9075f9c68c0cf8b289c032d
parent5f0f83589f504cf86b2a0bf8af2317a896235c1f
crimson: use given osd_fsid when mkfs

MemStore does not have this feature, but CyanStore needs it. because
`qa/tasks/ceph.py` uses following steps when creating/starting an OSD

1. ceph-osd --mkfs --mkkey -i <osd_id> --monmap <monmap>
2. read the osd_fsid of osd.<osd_id>
3. ceph osd new <osd_fsid> <osd_id>

when we mkfs for the OSD, the osd_fsid is still unknown. so we cannot
use the configured one, as it is always empty. in that case, we need to
use a random uuid, and persist it to both ${osd_data}/fsid and
superblock.osd_fsid

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/os/cyan_store.cc
src/crimson/os/cyan_store.h
src/crimson/os/futurized_store.h
src/crimson/osd/osd.cc