From: John Griffith Date: Mon, 30 Mar 2015 19:22:04 +0000 (-0600) Subject: Remove LP bug ref in remove_iscsi_device X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6905485343fab724f5f94ed4e849984f3e445af9;p=openstack-build%2Fcinder-build.git 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 --- 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