From owner-freebsd-scsi@freebsd.org Fri Jul 3 11:03:13 2015 Return-Path: Delivered-To: freebsd-scsi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00FD4993E6D for ; Fri, 3 Jul 2015 11:03:13 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AF1E2DC5 for ; Fri, 3 Jul 2015 11:03:12 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by widjy10 with SMTP id jy10so107115447wid.1 for ; Fri, 03 Jul 2015 04:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=k0VCcTA4uTe2Xmh4ropl8zViNtrcrpTk1sVh7fdIjEc=; b=k1RU8VGVLTUyLBv3rWOWynmV2SiwBnY+MErwqvcAnAyf2UfYO232xOObdX27hyuw8D uNcKyuRNuGurtH1wBhmwH2S8CgLSlQeSV+f3wcFgRLta6xTUvfQKIguG8+5MPrm6+VN7 uecxoKzbahi701YzVw3F1YRPqjh1IuvDvFczmcb0NgsN5rCSgpijVWoyCKSvzWaI2Nxz iRZbpS/HCpu8ebsbHx002AuXxpuoFdMxeG9WshwBywJpiw/wcb1/Hy4XDNIEsGlNzx3k VRqAiTENshDcjVN2z3tmZ0iPra/JViCnRIbIbYiO2fsjJh+6roi7WT77VmyjpifJJOfi 0TvQ== X-Received: by 10.194.71.105 with SMTP id t9mr69177766wju.128.1435921390915; Fri, 03 Jul 2015 04:03:10 -0700 (PDT) Received: from brick.home (abqt164.neoplus.adsl.tpnet.pl. [83.8.87.164]) by mx.google.com with ESMTPSA id l14sm12816041wjq.21.2015.07.03.04.03.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jul 2015 04:03:09 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 3 Jul 2015 13:03:07 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: RA H Cc: freebsd-scsi@freebsd.org Subject: Re: [iscsictl] connection to invalid target Message-ID: <20150703110307.GA3993@brick.home> Mail-Followup-To: RA H , freebsd-scsi@freebsd.org References: <20150630194558.GA1223@brick.home> <20150702083218.GA16246@brick.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2015 11:03:13 -0000 On 0702T1540, RA H wrote: > On Thu, Jul 2, 2015 at 4:32 AM, Edward Tomasz NapieraƂa > wrote: > > > So basically it's not a FreeBSD bug? > > > > Correct. > > > > The problem here is that the discovery is performed by iscsid; the way > > to implement it would be to make iscsictl add the discovery session, wait > > for iscsid to finish discovery but not connect to the targets, report > > targets, and then remove them. So basically pretty much what you are > > doing anyway. > > > > But that's not what I'm doing because I have no idea how to do discovery > only through any means. Roughly, my process is as follows: > > * Get list of connected targets (iscsictl -L) > * Do discovery+login (iscsictl -Ad ) > * Get list of connected targets (iscsictl -L) > * Filter newly connected targets > * Compare newly connected target names to user-input target name > and disconnect non-matching sessions > > If you could demonstrate how to implement the process you described > above I'd be incredibly greatful. Also, apologies for not keeping this > on the ML, I'm new at this... Perhaps I could make myself more clear on this: what I was describing above is a theoretical way this could be implemented, not an existing functionality. The bottom line is: the way it could be done is very similar to what you're doing "by hand", as you described above.