----- Original Message -----
> From: "Roi Dayan" <r...@mellanox.com>
> To: vdsm-devel@lists.fedorahosted.org
> Sent: Thursday, November 10, 2011 10:22:31 AM
> Subject: patch for vdsm to fix discovery and allow iser discovery
> 
> We use an rpm version: vdsm-4.9-106.el6.x86_64
> 
> First change makes target login to try transport iSER and if fails to
> try transport iSCSI.
> Second change is adding '-o new' to the discovery command so already
> discovered targets settings won't be overridden
> with default settings.
> 

So on a non-RDMA iSCSI host what will happen will it fail and then fall back to 
tcp?

If so I know that will work but since most iSCSI customers will be using TCP do 
we really want the majority of connections to fail?

A long term option would be specifying the connection option in the call to 
VDSM, but that obviously needs support in the RHEV backend as well.

Maybe as a short term solution we should have the list of valid transports 
specified in vdsm.conf, that way we could add iser to the configuration if it's 
required.

> Thanks,
> Roi
> 
> 
> --- iscsi.py    2011-11-01 12:35:06.707272165 +0200
> +++ iscsi.py    2011-11-09 11:52:01.935067375 +0200
> @@ -25,7 +25,7 @@
>  import storage_exception as se
>  import devicemapper
> 
> -SENDTARGETS_DISCOVERY = [constants.EXT_ISCSIADM, "-m",
> "discoverydb", "-t", "sendtargets"]
> +SENDTARGETS_DISCOVERY = [constants.EXT_ISCSIADM, "-m",
> "discoverydb", "-t", "sendtargets", "-o", "new"]
>  ISCSIADM_NODE = [constants.EXT_ISCSIADM, "-m", "node"]
>  ISCSIADM_IFACE = [constants.EXT_ISCSIADM, "-m", "iface"]
>  ISCSI_DEFAULT_PORT = "3260"
> @@ -376,6 +376,28 @@
> 
>      return rc, out
> 
> +def setNodeTransport(portal, iqn, transport='tcp'):
> +    """Configure a node transport
> +transport :tcp, iser
> +    """
> +    if transport not in ['tcp', 'iser']:
> +        transport = 'tcp'
> +
> +    log.info('Set transport %s to target %s on portal %s' %
> (transport, iqn, portal))
> +
> +    cmds = [
> +        [constants.EXT_ISCSIADM] + '-m node -o update -n
> node.conn[0].iscsi.HeaderDigest -v None'.split(),
> +        [constants.EXT_ISCSIADM] + ('-m node -o update -n
> iface.transport_name -v '+transport).split()
> +    ]
> +
> +    cmds[0] += ['-p', portal, '-T', iqn]
> +    cmds[1] += ['-p', portal, '-T', iqn]
> +
> +    for cmd in cmds:
> +        rc = misc.execCmd(cmd)[0]
> +        if rc != 0:
> +            raise se.iSCSILoginError(portal)
> +
>  def remiSCSIPortal(ip, port):
>      """
>      Removes iSCSI portal from discovery list
> @@ -467,9 +489,16 @@
>                  raise se.SetiSCSIPasswdError(portal)
> 
>          # Finally instruct the iscsi initiator to login to the
>          target
> +       # try iser first and then tcp
> +       setNodeTransport(portal, iqn, 'iser')
>          cmd = cmdt + ["-l", "-p", portal]
>          rc = misc.execCmd(cmd)[0]
>          if rc != 0:
> +                # now try iSCSI
> +                setNodeTransport(portal, iqn, 'tcp')
> +                cmd = cmdt + ["-l", "-p", portal]
> +                rc = misc.execCmd(cmd)[0]
> +        if rc != 0:
>              raise se.iSCSILoginError(portal)
>      except se.StorageException:
>          exc_class, exc, tb = sys.exc_info()
> 
> 
> _______________________________________________
> vdsm-devel mailing list
> vdsm-devel@lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/vdsm-devel
> 
_______________________________________________
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/vdsm-devel

Reply via email to