Targets are not consistently shown with large numbers of targets
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tgt (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Precise |
Fix Released
|
Medium
|
Eric Desrochers | ||
Trusty |
Fix Released
|
High
|
Eric Desrochers | ||
Vivid |
Fix Released
|
Medium
|
Eric Desrochers |
Bug Description
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_
DISTRIB_
DISTRIB_
----
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-
Target 578: iqn.2010-
Target 579: iqn.2010-
+Target 580: iqn.2010-
+Target 581: iqn.2010-
--- /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-
Target 578: iqn.2010-
Target 579: iqn.2010-
+Target 580: iqn.2010-
--- /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-
Target 578: iqn.2010-
Target 579: iqn.2010-
+Target 580: iqn.2010-
+Target 581: iqn.2010-
--- /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-
Target 578: iqn.2010-
Target 579: iqn.2010-
-Target 580: iqn.2010-
[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_
DISTRIB_
DISTRIB_
----
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-
Target 578: iqn.2010-
Target 579: iqn.2010-
+Target 580: iqn.2010-
+Target 581: iqn.2010-
--- /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-
Target 578: iqn.2010-
Target 579: iqn.2010-
+Target 580: iqn.2010-
--- /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-
Target 578: iqn.2010-
Target 579: iqn.2010-
+Target 580: iqn.2010-
+Target 581: iqn.2010-
--- /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-
Target 578: iqn.2010-
Target 579: iqn.2010-
-Target 580: iqn.2010-
----
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
#
Changed in tgt (Ubuntu Trusty): | |
importance: | Undecided → High |
status: | New → Confirmed |
assignee: | nobody → Eric Desrochers (eric-desrochers-z) |
tags: | added: verification-done |
Changed in tgt (Ubuntu Trusty): | |
status: | Confirmed → In Progress |
tags: | added: sts |
tags: |
added: verification-done removed: verification-needed |
Changed in tgt (Ubuntu): | |
importance: | Undecided → Medium |
tags: |
added: verification-done removed: verification-needed |
For reference there is also an old RHEL bug that may related https:/ /bugzilla. redhat. com/show_ bug.cgi? id=865960