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
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__)
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.