Skip to content

Instantly share code, notes, and snippets.

@unkn-one
Last active August 29, 2015 14:23
Show Gist options
  • Save unkn-one/ba50e5bd75a866c09e64 to your computer and use it in GitHub Desktop.
Save unkn-one/ba50e5bd75a866c09e64 to your computer and use it in GitHub Desktop.
Cinter locking tests

Cinter locking tests

General setup

Controller node

  • Redis server

Compute nodes

  • Python packages:
    • tooz>=16.0
    • redis
  • Tooz lock patch [1]
  • Replace any cinder.utils.synchronized with cinder.coordination.synchronized. Example [2]
  • Make sure that external locks are used when needed

cinder.conf:

[DEFAULT]
host=cinder

[coordination]
backend_url=redis://<controller-ip>
[1]https://review.openstack.org/183537
[2]https://review.openstack.org/#/c/185646/4

GlusterFS setup

Compute nodes

cinder.conf:

[DEFAULT]
default_volume_type = glusterdriver-1
enabled_backends = glusterdriver-1

[glusterdriver-1]
glusterfs_shares_config = /etc/cinder/glusterfs
volume_driver = cinder.volume.drivers.glusterfs.GlusterfsDriver
volume_backend_name = glusterdriver-1

/etc/cinder/glusterfs:

<compute#01-ip>:/<gluster-volume-name>

cinder/volume/drivers/remotefs.py:

@@ -88,7 +88,7 @@
-def locked_volume_id_operation(f, external=False):
+def locked_volume_id_operation(f, external=True):

Rally test

create-snapshot.yaml:

---
  CinderVolumes.create_and_list_snapshots:
    -
      args:
          force: false
      runner:
        type: "constant"
        times: 40
        concurrency: 10
      context:
        users:
          tenants: 1
          users_per_tenant: 1
        volumes:
          size: 1
        quotas:
          cinder:
            snapshots: 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment