RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 727786 - [tgtadm] don't fail service reload in case target already exits
Summary: [tgtadm] don't fail service reload in case target already exits
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: scsi-target-utils
Version: 6.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Andy Grover
QA Contact: Bruno Goncalves
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-03 08:53 UTC by Haim
Modified: 2018-12-04 14:27 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-23 14:26:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
tgtadm logs (25.35 KB, application/x-tar)
2011-08-03 08:53 UTC, Haim
no flags Details

Description Haim 2011-08-03 08:53:53 UTC
Created attachment 516460 [details]
tgtadm logs

Description of problem:

case:

sometimes, when I try to create new targets, service reload fails, running with bash -x reviles that it tries to create new target:

tgtadm -C 0 --lld iscsi --op new --mode target --tid 12 -T ErrorHandling-T1

and fail on tgtadm: this target already exists. 

Target actually already exists, and in this case i created different target called ErrorHandling-T21 and ErrorHandling-T22.

1) I don't understand why tgt use command to create new target if its already exits.
2) I think we should not fail service reload on such case, as its not harmful, its more problematic that user can'r reload. 

workaround:

tgtadm --lld iscsi --mode target --op delete --tid 12

reload service.

Comment 3 Andy Grover 2011-10-03 23:03:55 UTC
Does fixing bug 736740 resolve this bug as well?

Comment 4 David Naori 2011-10-04 14:24:23 UTC
changed the script manually in /usr/sbin/tgt-admin

+				$tgtadm_output_tid{$target} = $next_tid;
-	process_targets;

but from the line numbers i could tell that the upstream script is different.

* with those changes i still see the problem.

[root@filer03 ~]# tgt-admin --update ALL
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 98 -T david
exited with code: 22.

can you please provide a scratch build or the upstream git? this way we would be able test it with the same code.

Comment 5 Andy Grover 2011-10-04 17:16:01 UTC
sure, http://people.redhat.com/agrover/files/test_rpms/scsi-target-utils-1.0.14-3test1.el6.x86_64.rpm

So, this is the same issue as bug 736740? Or is this one about running tgtadm directly?

Comment 6 RHEL Program Management 2011-10-07 16:05:15 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 7 Haim 2012-01-08 07:10:24 UTC
(In reply to comment #5)
> sure,
> http://people.redhat.com/agrover/files/test_rpms/scsi-target-utils-1.0.14-3test1.el6.x86_64.rpm
> 
> So, this is the same issue as bug 736740? Or is this one about running tgtadm
> directly?

Andy, as we don't have a consistent repro of the problem, I cannot provide you the needed info if it does/doesn't fix the problem, however, i'm willing to patch my server with attached rpm and work with it extensively this week, if it does't reproduce then we can close down the bug.

Comment 8 Haim 2012-01-10 08:12:15 UTC
(In reply to comment #5)
> sure,
> http://people.redhat.com/agrover/files/test_rpms/scsi-target-utils-1.0.14-3test1.el6.x86_64.rpm
> 
> So, this is the same issue as bug 736740? Or is this one about running tgtadm
> directly?

Andy, installed scratch rpms and I still get the problem after adding new target and trying reload the service: 

tgtadm -C 0 --lld iscsi --op new --mode target --tid 246 -T rvaknin_igor
exited with code: 22

scsi-target-utils-1.0.14-3test1.el6.x86_64


Note You need to log in before you can comment on or make changes to this bug.