]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove LP bug ref in remove_iscsi_device
authorJohn Griffith <john.griffith@solidfire.com>
Mon, 30 Mar 2015 19:22:04 +0000 (13:22 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Mon, 30 Mar 2015 19:26:29 +0000 (13:26 -0600)
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

index 6c7b564641f4dca16f3f08e2b0a22f77a021e928..ffb60c7be33f0a7e0a927a88d5cd63002c24db68 100644 (file)
@@ -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