Tgt has a bug where it can have multiple copies of an initiator
if there has been a reconnect.
See https://bugs.launchpad.net/cinder/+bug/
1159948
Change-Id: I9a1b6757eb780efbaa1403016e50de7c0e45d720
self.flags(volumes_dir=self.persist_tempdir)
self.script_template = "\n".join([
'tgt-admin --update iqn.2011-09.org.foo.bar:blaa',
- 'tgt-admin --delete iqn.2010-10.org.openstack:volume-blaa'])
+ 'tgt-admin --force '
+ '--delete iqn.2010-10.org.openstack:volume-blaa'])
def tearDown(self):
try:
else:
raise exception.ISCSITargetRemoveFailed(volume_id=vol_id)
try:
+ # NOTE(vish): --force is a workaround for bug:
+ # https://bugs.launchpad.net/cinder/+bug/1159948
self._execute('tgt-admin',
+ '--force',
'--delete',
iqn,
run_as_root=True)