From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3kwr-0006DD-IN for qemu-devel@nongnu.org; Tue, 01 Dec 2015 08:26:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3kwm-0002Mw-I7 for qemu-devel@nongnu.org; Tue, 01 Dec 2015 08:26:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3kwm-0002Ms-AU for qemu-devel@nongnu.org; Tue, 01 Dec 2015 08:26:20 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 10BD28E23E for ; Tue, 1 Dec 2015 13:26:20 +0000 (UTC) From: Pino Toscano Date: Tue, 01 Dec 2015 14:26:06 +0100 Message-ID: <2538292.Alk3jII4Z9@pendragon.usersys.redhat.com> In-Reply-To: <871tb6tt6n.fsf@blackfin.pond.sub.org> References: <2757099.oMy77gOrqp@pendragon.usersys.redhat.com> <871tb6tt6n.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1865870.1QiQeyB3Ns"; micalg="pgp-sha256"; protocol="application/pgp-signature" Subject: Re: [Qemu-devel] iSCSI options for IQN with colons List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org --nextPart1865870.1QiQeyB3Ns Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" On Tuesday 01 December 2015 10:27:28 Markus Armbruster wrote: > Beware, I know next to nothing about iSCSI. >=20 > Pino Toscano writes: >=20 > > Hi, > > > > while testing the integration of QEMU with iSCSI, I was setting up = an > > environment with both target and initiator IQNs with colons. Then I= > > tried to connect to two different targets using two different initi= ator > > IQN, like the following: > > > > $ qemu ... \ > > -iscsi id=3Diqn.2015-11.com.bla:suffix1,initiator-name=3Diqn.= 2015-11.com.bla:suffix1-initiator \ > > -iscsi id=3Diqn.2015-11.com.bla:suffix2,initiator-name=3Diqn.= 2015-11.com.bla:suffix2-initiator \ > > -drive file=3Discsi://server/iqn.2015-11.com.bla%3Asuffix1/0,= format=3Draw,id=3Dhd1,if=3Dnone \ > > -drive file=3Discsi://server/iqn.2015-11.com.bla%3Asuffix2/0,= format=3Draw,id=3Dhd2,if=3Dnone \ > > ... > > > > which didn't work at first: > > > > qemu-system-x86_64: -iscsi id=3Diqn.2015-11.com.bla:suffix1,initi= ator-name=3Diqn.2015-11.com.bla:suffix1-initiator: Parameter 'id' expec= ts an identifier > > > > which, according to id_wellformed in id.c, is true. Allowing colons= in > > id=3D... like in the following patch > > > > diff --git a/util/id.c b/util/id.c > > index bcc64d8..25fca9d 100644 > > --- a/util/id.c > > +++ b/util/id.c > > @@ -20,7 +20,7 @@ bool id_wellformed(const char *id) > > return false; > > } > > for (i =3D 1; id[i]; i++) { > > - if (!qemu_isalnum(id[i]) && !strchr("-._", id[i])) { > > + if (!qemu_isalnum(id[i]) && !strchr("-._:", id[i])) { > > return false; > > } > > } > > > > allowed me to work run QEMU with the attached disks. > > > > The question basically boils down to whether it is right to reject > > colons in id: > > - if so, then there should be a way to allow them only in id of -is= csi > > (since colons can be part of IQNs) > > - if not, whether allowing them could cause regressions in option > > parsing >=20 > Have you tried >=20 > -iscsi id=3Discsi.1,initiator-name=3Diqn.2015-11.com.bla:suffix1-= initiator \ > -iscsi id=3Discsi.2,initiator-name=3Diqn.2015-11.com.bla:suffix2-= initiator \ > -drive file=3Discsi://server/iqn.2015-11.com.bla%3Asuffix1/0,form= at=3Draw,id=3Dhd1,if=3Dnone \ > -drive file=3Discsi://server/iqn.2015-11.com.bla%3Asuffix2/0,form= at=3Draw,id=3Dhd2,if=3Dnone \ This won't work, as the various parse_* in iscsi.c (e.g. parse_initiator_name for the above cases) use the target IQN as identifier for the parameters. =2D-=20 Pino Toscano --nextPart1865870.1QiQeyB3Ns Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWXZ/5AAoJEMPRTC2YZDfNdw0P/RKyi7QrPjKb0CdHEorbOcSH 1QqJhDSU7duCqqHNVIUfGDOQIA0xau7b5M2J/gv20853P1mq2LcyM9ACEry3i5ZD xNIdyPmqNNzoUpSAc70M1cIqRMVE3+GybS0a5R2Yqofwr8anC93IvDSOrI9R9RYL h8gliRpOZDXYAmG/pXMDV9MEIHcNGZHkJIx+ageEakzeCKPpCkyI3O0whXsnmBIv zrA1ZBxAy5NWxrmJq53QAgDzJDbqndy9MDUMHjz1CuOn0ZJCVhBNNE2xq5++di1j cqwBfs9lYQe61QMacGIL/sLrcbqZ0/dmaXsIjPB1Xp+JMNcVsA5u0qNIHx4BdGY5 Gduvzx8Ecjcgnmjt6HjEOvIxWC1mYIN/eb/c+KOvu+KJ5zPyBuEF2jB7wE6x156P c/rLZ2Xz6xIEeweRpr2CHbQ9Dbx2FwovefMMksu6HXBpjdsaem7TO93OkkqFXz1L VRxPq8RspoKy3+m4qrBtFLXX1lrnTR0ATfgPE+pv0wxnABNla0anxu4c1MXnPC+p ZivqYakugnu38mZU62uSnVYy1Aw2wqP+76OnxXOWy05L2KwzR0ihus/vpok8j4Py 1dW2HgIOqujF3IY6mAV+cu05YPvdjKrzNcFZU+7tHEylJy0DfTNFI9quuKcnrG45 HG2AwD7U/Y54wKWAXrOX =xJe1 -----END PGP SIGNATURE----- --nextPart1865870.1QiQeyB3Ns--