There is a race in the gate when removing an iscsi
target in the remove export flow where the target
is still active. It's about a 75% failure rate so
simply adding a configurable retry on the delete
call should clean that up.
Change-Id: I8531652e8b80f1c65c9942e109dea01fda5674e0
Closes-Bug: #
1363258
import stat
import time
+from oslo.config import cfg
import six
from cinder.brick import exception
LOG = logging.getLogger(__name__)
+CONF = cfg.CONF
+
class TargetAdmin(executor.Executor):
"""iSCSI target administration.
'--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")