DEPRECATED, Direct usage of Cinder Block Storage drivers without the services
Go to file
Gorka Eguileor b6bc89d61e Fix RBD connector
RBD nos-brick connector has a bug where it only detaches the first
volume if we are running cinderlib in a container as root and the host
doesn't have the ceph-common package installed.

The library says it has detached it, but it really hasn't, so we end up
with a /dev/rbdX device leftover in our system.

This patch fixes this by taking into account that directories and
symlinks may already exist.

The connect_volume method will, on failure, clean up (unmap and remove
config file) and raise BrickException.  And the disconnect_volume will
ignore if an unlink fails because the link doesn't exist anymore.

Closes-Bug: #1819705
Change-Id: Ib61acdd4c469ac4316e2f5e518301c44dd3a6321
2019-03-19 17:13:07 +01:00
cinderlib Fix RBD connector 2019-03-19 17:13:07 +01:00
doc Add zuul jobs 2019-02-26 16:21:34 +01:00
playbooks Add zuul jobs 2019-02-26 16:21:34 +01:00
releasenotes Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
tools Add zuul jobs 2019-02-26 16:21:34 +01:00
.gitignore Add zuul jobs 2019-02-26 16:21:34 +01:00
.gitreview Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
.stestr.conf Add zuul jobs 2019-02-26 16:21:34 +01:00
.zuul.yaml Add zuul jobs 2019-02-26 16:21:34 +01:00
CONTRIBUTING.rst Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
HACKING.rst Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
LICENSE Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
README.rst Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
babel.cfg Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
lower-constraints.txt Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
requirements.txt Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
setup.cfg Add zuul jobs 2019-02-26 16:21:34 +01:00
setup.py Format as a Cinder-related OpenStack project 2019-02-19 16:28:03 +01:00
test-requirements.txt Add zuul jobs 2019-02-26 16:21:34 +01:00
tox.ini Add zuul jobs 2019-02-26 16:21:34 +01:00

README.rst

Cinder Library

image

image

image

Introduction

The Cinder Library, also known as cinderlib, is a Python library that leverages the Cinder project to provide an object oriented abstraction around Cinder's storage drivers to allow their usage directly without running any of the Cinder services or surrounding services, such as KeyStone, MySQL or RabbitMQ.

The library is intended for developers who only need the basic CRUD functionality of the drivers and don't care for all the additional features Cinder provides such as quotas, replication, multi-tenancy, migrations, retyping, scheduling, backups, authorization, authentication, REST API, etc.

The library was originally created as an external project, so it didn't have the broad range of backend testing Cinder does, and only a limited number of drivers were validated at the time. Drivers should work out of the box, and we'll keep a list of drivers that have added the cinderlib functional tests to the driver gates confirming they work and ensuring they will keep working.

Features

  • Use a Cinder driver without running a DBMS, Message broker, or Cinder service.
  • Using multiple simultaneous drivers on the same application.
  • Basic operations support:
    • Create volume
    • Delete volume
    • Extend volume
    • Clone volume
    • Create snapshot
    • Delete snapshot
    • Create volume from snapshot
    • Connect volume
    • Disconnect volume
    • Local attach
    • Local detach
    • Validate connector
    • Extra Specs for specific backend functionality.
    • Backend QoS
    • Multi-pool support
  • Metadata persistence plugins:
    • Stateless: Caller stores JSON serialization.
    • Database: Metadata is stored in a database: MySQL, PostgreSQL, SQLite...
    • Custom plugin: Caller provides module to store Metadata and cinderlib calls it when necessary.

Demo