Merge "Retry remove iscsi target"

This commit is contained in:
Jenkins
2014-11-11 03:32:13 +00:00
committed by Gerrit Code Review

View File

@@ -23,6 +23,7 @@ import re
import stat
import time
from oslo.config import cfg
import six
from cinder.brick import exception
@@ -35,6 +36,8 @@ from cinder import utils
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
class TargetAdmin(executor.Executor):
"""iSCSI target administration.
@@ -301,7 +304,8 @@ class TgtAdm(TargetAdmin):
'--force',
'--delete',
iqn,
run_as_root=True)
run_as_root=True,
attempts=CONF.num_shell_tries)
except putils.ProcessExecutionError as e:
LOG.error(_("Failed to remove iscsi target for volume "
"id:%(vol_id)s: %(e)s")