Project

General

Profile

Add Metadata Mechanism To LibRBD

Summary

Now rbd client only can accept config value from ceph.conf, it's too inflexible to let diferent image uses different config value. Add metadata mechanism to librbd interface, let librbd internal can aware specified metadata key and associated it with config value.

Owners

  • Haomai Wang (UnitedStack)
  • Name (Affiliation)
  • Name

Interested Parties

  • Name (Affiliation)
  • Name (Affiliation)
  • Name

Current Status

Detailed Description

Recently encounter some problems about rbd options. We want to make
each librbd client uses different option such as whether enable
rbd_cache, cache_size, read_ahead bytes etc. It 's very important for
cloud solution which need to make different image.

But now it's inconvenient to do this(or nearly impossible). We have
another class options such stripe_count/size, order and image_format.
They have their standalone method in librbd impl to write/read. But
the way isn't good for other lightweight options.

So I think we could let rbd options become the image's attributes not
just reading from config. I think we could add "metadata_get" and
"metadata_set" method for librbd, all other options are associated
with a special metadata name, when opening a image we will scan all
metadata and regard them as configs.

It's much more like what OpenStack Nova/Cinder/Glance did. Let newer
option adding and don't need to change too much.

Work items

Coding tasks

  1. Metadata interface and implementation
  2. Let librbd internal aware of metadata keys

Build / release tasks

  1. Task 1
  2. Task 2
  3. Task 3

Documentation tasks

  1. Describe the metadata method and let users know we can set metadata instead of ceph.conf to configurate librbd

Deprecation tasks

  1. Task 1
  2. Task 2
  3. Task 3