Comment 0 for bug 1644129

Revision history for this message
zhangdaolong (zhangdaolong) wrote : RBD drivers create volume from volume when the config "rbd_max_clone_depth" changed.

Reproduce the process:

1.config rbd_max_clone_depth
  #vim cinder.conf
  ----------------------
  rbd_max_clone_depth=3
  ----------------------
2.create vol
3.create vol1 from vol
4.create vol1-1 from vol1
5.create vol1-1-1 from vol1-1
  volume relationship:
  vol----->vol1----->vol1-1----->vol1-1-1

5.chang rbd_max_clone_depth from 3 to 1
   # vim cinder.conf
   -----------------------
   rbd_max_clone_depth=1
   -----------------------
6.create test from vol1-1-1 or vol1-1

Except results:
The volume was created successfully

In fact results:
Failed to create volume

The error log is as follows
-------------------------------------------
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 138, in _dispatch_and_reply
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher incoming.message))
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _dispatch
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 127, in _do_dispatch
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 633, in create_volume
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher _run_flow_locked()
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 271, in inner
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 622, in _run_flow_locked
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher _run_flow()
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 618, in _run_flow
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher flow_engine.run()
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/engine.py", line 230, in run
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher for _state in self.run_iter(timeout=timeout):
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/engine.py", line 308, in run_iter
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher failure.Failure.reraise_if_any(fails)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/taskflow/types/failure.py", line 336, in reraise_if_any
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher failures[0].reraise()
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/taskflow/types/failure.py", line 343, in reraise
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher six.reraise(*self._exc_info)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py", line 82, in _execute_task
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher result = task.execute(**arguments)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py", line 825, in execute
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher context, volume_ref=volume_ref, **volume_spec)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py", line 483, in _create_from_source_volume
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher model_update = self.driver.create_cloned_volume(volume_ref, srcvol_ref)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/rbd.py", line 471, in create_cloned_volume
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher depth = self._get_clone_depth(client, src_name)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/rbd.py", line 445, in _get_clone_depth
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher return self._get_clone_depth(client, parent, depth + 1)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/rbd.py", line 445, in _get_clone_depth
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher return self._get_clone_depth(client, parent, depth + 1)
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/rbd.py", line 443, in _get_clone_depth
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher (self.configuration.rbd_max_clone_depth))
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher Exception: clone depth exceeds limit of 1
2016-11-23 15:49:38.365 32221 ERROR oslo_messaging.rpc.dispatcher