Add retry to lvm snapshot create
We have some occasional issues with snapshot-create failing for what looks to be conflicts with udev. It looks like this problem is a status conflict between LVM cache and udev, and in most cases the best way to get around this is to retry the command a few times until the cache and udev are back in sync. This patch uses the newly added retry decorator and for now we're just adding it to the snapshot create call. We're using the default values for interval and retry count but we can certainly adjust this as needed. Change-Id: Ic884b829591361da979fde968f5710237b34565f Closes-Bug: #1335905
This commit is contained in:
parent
a8499b24a9
commit
e302cefafc
|
@ -29,6 +29,7 @@ from cinder.brick import exception
|
|||
from cinder.brick import executor
|
||||
from cinder.i18n import _, _LE, _LI, _LW
|
||||
from cinder.openstack.common import log as logging
|
||||
from cinder import utils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -509,6 +510,7 @@ class LVM(executor.Executor):
|
|||
LOG.error(_LE('StdErr :%s') % err.stderr)
|
||||
raise
|
||||
|
||||
@utils.retry(putils.ProcessExecutionError)
|
||||
def create_lv_snapshot(self, name, source_lv_name, lv_type='default'):
|
||||
"""Creates a snapshot of a logical volume.
|
||||
|
||||
|
|
Loading…
Reference in New Issue