From 6905485343fab724f5f94ed4e849984f3e445af9 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Mon, 30 Mar 2015 13:22:04 -0600 Subject: [PATCH] Remove LP bug ref in remove_iscsi_device Some like referencing bugs in code comments, others don't. In general we try and avoid it, but I certainly don't agree with blocking a patch solely for that reason. So instead this patch tries to modify the previous commit to fix it up rather than having a contest of wills to see who will bend first. Change-Id: I98bca9e3a98383c994bc49426a71d944e10fae17 --- cinder/brick/initiator/connector.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cinder/brick/initiator/connector.py b/cinder/brick/initiator/connector.py index 6c7b56464..ffb60c7be 100644 --- a/cinder/brick/initiator/connector.py +++ b/cinder/brick/initiator/connector.py @@ -402,8 +402,12 @@ class ISCSIConnector(InitiatorConnector): dev_name = self._linuxscsi.get_name_from_path(host_device) if dev_name: self._linuxscsi.remove_scsi_device(dev_name) - # make sure the volume is gone before moving on - # Bug #1437441 - Race removing iscsi device + + # NOTE(jdg): On busy systems we can have a race here + # where remove_iscsi_device is called before the device file + # has actually been removed. The result is an orphaned + # iscsi session that never gets logged out. The following + # call to wait addresses that issue. self._linuxscsi.wait_for_volume_removal(host_device) # NOTE(vish): Only disconnect from the target if no luns from the -- 2.45.2