[Bug 1498697] [NEW] Targets are not consistently shown with large numbers of targets

Launchpad Bug Tracker 1498697 at bugs.launchpad.net
Thu Sep 24 16:23:45 UTC 2015


You have been subscribed to a public bug by Ubuntu Foundations Team Bug Bot (crichton):

SRU JUSTIFICATION

[Impact]

 * tgtadm returns inconsistents results. Some targets are not 
   listed during one run, but are shown by a run immediately after.

[Test Case]

 * With large number of targets :

# ./tgtadm -L iscsi --mode target --op show | fgrep -c Target
564

# dpkg -l | fgrep tgt
ii tgt 1:1.0.43-0ubuntu4 amd64 Linux SCSI target user-space tools

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

----
Buggy 1.0.43 version:

# for i in {1..100} ; do diff -u <(/usr/sbin/tgtadm -L iscsi --mode target --op show | fgrep Target) <(/usr/sbin/tgtadm -L iscsi --mode target --op show | fgrep Target) ; sleep 1 ; done
--- /dev/fd/63 2015-09-22 23:05:38.648448562 +0000
+++ /dev/fd/62 2015-09-22 23:05:38.648448562 +0000
@@ -560,3 +560,5 @@
 Target 574: iqn.2010-10.org.openstack:volume-7adaa3bc-fafc-4421-baf7-b25102de1922
 Target 578: iqn.2010-10.org.openstack:volume-892c6840-ca04-4474-9976-9eaa8b54c4d2
 Target 579: iqn.2010-10.org.openstack:volume-d1d8062f-be47-4f33-b5b9-1befdfb09f65
+Target 580: iqn.2010-10.org.openstack:volume-32a9e401-cf44-4f8f-ba93-fd43ff758e45
+Target 581: iqn.2010-10.org.openstack:volume-ddcebcc4-eb13-459e-be1d-2068ee03a4c6
--- /dev/fd/63 2015-09-22 23:05:40.720506264 +0000
+++ /dev/fd/62 2015-09-22 23:05:40.720506264 +0000
@@ -560,3 +560,4 @@
 Target 574: iqn.2010-10.org.openstack:volume-7adaa3bc-fafc-4421-baf7-b25102de1922
 Target 578: iqn.2010-10.org.openstack:volume-892c6840-ca04-4474-9976-9eaa8b54c4d2
 Target 579: iqn.2010-10.org.openstack:volume-d1d8062f-be47-4f33-b5b9-1befdfb09f65
+Target 580: iqn.2010-10.org.openstack:volume-32a9e401-cf44-4f8f-ba93-fd43ff758e45
--- /dev/fd/63 2015-09-22 23:05:41.752535004 +0000
+++ /dev/fd/62 2015-09-22 23:05:41.752535004 +0000
@@ -560,3 +560,5 @@
 Target 574: iqn.2010-10.org.openstack:volume-7adaa3bc-fafc-4421-baf7-b25102de1922
 Target 578: iqn.2010-10.org.openstack:volume-892c6840-ca04-4474-9976-9eaa8b54c4d2
 Target 579: iqn.2010-10.org.openstack:volume-d1d8062f-be47-4f33-b5b9-1befdfb09f65
+Target 580: iqn.2010-10.org.openstack:volume-32a9e401-cf44-4f8f-ba93-fd43ff758e45
+Target 581: iqn.2010-10.org.openstack:volume-ddcebcc4-eb13-459e-be1d-2068ee03a4c6
--- /dev/fd/63 2015-09-22 23:05:43.828592816 +0000
+++ /dev/fd/62 2015-09-22 23:05:43.828592816 +0000
@@ -560,4 +560,3 @@
 Target 574: iqn.2010-10.org.openstack:volume-7adaa3bc-fafc-4421-baf7-b25102de1922
 Target 578: iqn.2010-10.org.openstack:volume-892c6840-ca04-4474-9976-9eaa8b54c4d2
 Target 579: iqn.2010-10.org.openstack:volume-d1d8062f-be47-4f33-b5b9-1befdfb09f65
-Target 580: iqn.2010-10.org.openstack:volume-32a9e401-cf44-4f8f-ba93-fd43ff758e45

[Regression Potential]

 * None expected, the patch comes from tgt upstream repo and it is
already implemented in Ubuntu Wily and Debian.

[Other Info]
 
 * The fix has been tested by the community and the fix resolved the issue. For more details see Comment #4

[Original Description]

With a large number of targets tgtadm --mode target --op show returns
inconsistent results. Some targets are not listed during one run, but
are shown by a run immediately after.

I grabbed the binary from the wily package and I am getting consistent
results, so somewhere between 1.0.43 and 1.0.57 upstream seems to have
patched the bug.

Can we get 1.0.57 (or whatever version has the fix) backported to
trusty?

----
# ./tgtadm -L iscsi --mode target --op show | fgrep -c Target
564

# dpkg -l | fgrep tgt
ii  tgt                              1:1.0.43-0ubuntu4              amd64        Linux SCSI target user-space tools

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

----
Buggy 1.0.43 version:

# for i in {1..100} ; do diff -u <(/usr/sbin/tgtadm -L iscsi --mode target --op show | fgrep Target) <(/usr/sbin/tgtadm -L iscsi --mode target --op show | fgrep Target) ; sleep 1 ; done
--- /dev/fd/63	2015-09-22 23:05:38.648448562 +0000
+++ /dev/fd/62	2015-09-22 23:05:38.648448562 +0000
@@ -560,3 +560,5 @@
 Target 574: iqn.2010-10.org.openstack:volume-7adaa3bc-fafc-4421-baf7-b25102de1922
 Target 578: iqn.2010-10.org.openstack:volume-892c6840-ca04-4474-9976-9eaa8b54c4d2
 Target 579: iqn.2010-10.org.openstack:volume-d1d8062f-be47-4f33-b5b9-1befdfb09f65
+Target 580: iqn.2010-10.org.openstack:volume-32a9e401-cf44-4f8f-ba93-fd43ff758e45
+Target 581: iqn.2010-10.org.openstack:volume-ddcebcc4-eb13-459e-be1d-2068ee03a4c6
--- /dev/fd/63	2015-09-22 23:05:40.720506264 +0000
+++ /dev/fd/62	2015-09-22 23:05:40.720506264 +0000
@@ -560,3 +560,4 @@
 Target 574: iqn.2010-10.org.openstack:volume-7adaa3bc-fafc-4421-baf7-b25102de1922
 Target 578: iqn.2010-10.org.openstack:volume-892c6840-ca04-4474-9976-9eaa8b54c4d2
 Target 579: iqn.2010-10.org.openstack:volume-d1d8062f-be47-4f33-b5b9-1befdfb09f65
+Target 580: iqn.2010-10.org.openstack:volume-32a9e401-cf44-4f8f-ba93-fd43ff758e45
--- /dev/fd/63	2015-09-22 23:05:41.752535004 +0000
+++ /dev/fd/62	2015-09-22 23:05:41.752535004 +0000
@@ -560,3 +560,5 @@
 Target 574: iqn.2010-10.org.openstack:volume-7adaa3bc-fafc-4421-baf7-b25102de1922
 Target 578: iqn.2010-10.org.openstack:volume-892c6840-ca04-4474-9976-9eaa8b54c4d2
 Target 579: iqn.2010-10.org.openstack:volume-d1d8062f-be47-4f33-b5b9-1befdfb09f65
+Target 580: iqn.2010-10.org.openstack:volume-32a9e401-cf44-4f8f-ba93-fd43ff758e45
+Target 581: iqn.2010-10.org.openstack:volume-ddcebcc4-eb13-459e-be1d-2068ee03a4c6
--- /dev/fd/63	2015-09-22 23:05:43.828592816 +0000
+++ /dev/fd/62	2015-09-22 23:05:43.828592816 +0000
@@ -560,4 +560,3 @@
 Target 574: iqn.2010-10.org.openstack:volume-7adaa3bc-fafc-4421-baf7-b25102de1922
 Target 578: iqn.2010-10.org.openstack:volume-892c6840-ca04-4474-9976-9eaa8b54c4d2
 Target 579: iqn.2010-10.org.openstack:volume-d1d8062f-be47-4f33-b5b9-1befdfb09f65
-Target 580: iqn.2010-10.org.openstack:volume-32a9e401-cf44-4f8f-ba93-fd43ff758e45

----
Working 1.0.57 version:

# for i in {1..100} ; do diff -u <(./tgtadm -L iscsi --mode target --op show | fgrep Target) <(./tgtadm -L iscsi --mode target --op show | fgrep Target) ; sleep 1 ; done
#

** Affects: tgt (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: tgt (Ubuntu Precise)
     Importance: Undecided
         Status: New

** Affects: tgt (Ubuntu Trusty)
     Importance: High
     Assignee: Eric Desrochers (eric-desrochers-z)
         Status: In Progress

** Affects: tgt (Ubuntu Vivid)
     Importance: Undecided
         Status: New


** Tags: patch verification-done
-- 
Targets are not consistently shown with large numbers of targets
https://bugs.launchpad.net/bugs/1498697
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list