RBD driver ignores user-configured max-clone-depth

Bug #1477706 reported by Jon Bernard
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Jon Bernard

Bug Description

1. Interface cinder with rbd
2. Edit cinder config file with rbd entry:
[DEFAULT]

enabled_backends = rbd
glance_api_version = 2

[rbd]
volume_driver = cinder.volume.drivers.rbd.RBDDriver
rbd_pool = volumes
rbd_ceph_conf = /etc/ceph/ceph.conf
rbd_flatten_volume_from_snapshot = false
rbd_max_clone_depth = 2
rbd_store_chunk_size = 4
rados_connect_timeout = -1
rbd_user = cinder
rbd_secret_uuid = fb0040d4-3b4a-48dd-9982-eb7dde3ada3a

It would be simpler to try with rbd_max_clone_depth = 0

3. Restart cinder services

4. Now create three volumes from a source cinder volume by cloning the cinder volume using "cinder create --source-volid"

5. Check the ceph cluster for info on all the cinder volumes created in step#3
 "rbd info volumes/volume-id"

Actual results:
After creating three cloned cinder volumes, the subsequent rbd volumes are still rbd clones and not flattened volumes.

Expected results:
The subsequent rbd volumes should be flattened and not rbd clones.

Additional info:

#cinder create --display-name vol5 1

# cinder create --source-volid 50351034-73d4-4c25-a490-b378bfbcf187 --display-name vol5-vol1 1

Create three such cinder volumes from vol5.

Info on the third volume with rbd_max_clone_depth set to 2.
# rbd info volumes/volume-ed0e869e-7fb5-41bf-a7f0-acbf359c9b4e
rbd image 'volume-ed0e869e-7fb5-41bf-a7f0-acbf359c9b4e':
 size 1024 MB in 256 objects
 order 22 (4096 kB objects)
 block_name_prefix: rbd_data.127943e823c8a
 format: 2
 features: layering
 flags:
 parent: volumes/volume-50351034-73d4-4c25-a490-b378bfbcf187@volume-ed0e869e-7fb5-41bfa7f0-acbf359c9b4e.clone_snap
 overlap: 1024 MB

Tags: ceph drivers
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/205202

Changed in cinder:
assignee: nobody → Jon Bernard (jbernard)
status: New → In Progress
Jon Bernard (jbernard)
tags: added: ceph drivers
Changed in cinder:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/205202
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=b7e6709e7cfc0a976a6d936db54973fc2f251363
Submitter: Jenkins
Branch: master

commit b7e6709e7cfc0a976a6d936db54973fc2f251363
Author: Jon Bernard <email address hidden>
Date: Thu Jul 23 13:47:03 2015 -0400

    RBD: use user-configured value for max_clone_depth

    This patch allows the user to override the default max-clone-depth in
    cinder.conf. Without this, the driver will ignore the user setting and
    always use the default.

    Change-Id: Ia8e6068bcf60d36063ff54c7038c03ef03126273
    Closes-Bug: #1477706

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to cinder (master)

Reviewed: https://review.openstack.org/207107
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=4a46b61114cfb81dac08a0289b509f3885f4fa8a
Submitter: Jenkins
Branch: master

commit 4a46b61114cfb81dac08a0289b509f3885f4fa8a
Author: Jon Bernard <email address hidden>
Date: Wed Jul 29 11:45:39 2015 -0400

    RBD: use user-configured value for chunk size

    This patch allows a user to override the default chunk size in
    cinder.conf. When the driver is initialized, the default configuration
    values in CONF are merged with the user-provided overrides into
    self.configuration. In most cases, self.configuration is used unless
    the original default value is needed. In this case, CONF was mistakenly
    used when self.configuration was intended, which has the effect of
    preventing the user from overriding the default chunk size by ignoring
    the provided value.

    Related-Bug: #1477706
    Change-Id: I66a99950b7c4080de932be7ddac2f1595b9d59f4

Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-3 → 7.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.