I found the problem.

The problem is in the Entity Identifier. As it is now, it's just the
IP number of the initiator.
The Solaris initiator reports then Entity Identifier with its iqn
name. If I change usr/isns.c like this:

--- usr/isns.c.new      2009-01-04 12:11:27.000000000 +0100
+++ usr/isns.c  2009-01-04 11:17:43.000000000 +0100
@@ -162,10 +162,10 @@

         length += isns_tlv_set(&tlv, ISNS_ATTR_ISCSI_NAME, strlen
(name), name);
        length += isns_tlv_set(&tlv, ISNS_ATTR_ENTITY_IDENTIFIER,
-                              strlen(name), name);
+                              strlen(eid), eid);
        length += isns_tlv_set(&tlv, 0, 0, 0);
        length += isns_tlv_set(&tlv, ISNS_ATTR_ENTITY_IDENTIFIER,
-                              strlen(name), name);
+                              strlen(eid), eid);

        length += isns_tlv_set(&tlv, ISNS_ATTR_ENTITY_PROTOCOL,
                               sizeof(type), &type);

both the Linux isns server as well as the Solaris isns server
registers the initiator properly.

So what is this parameter (Entity Identifier) according to the rfc:

---

6.2.1. Entity Identifier (EID)


   The Entity Identifier (EID) is variable-length UTF-8 encoded NULL-
   terminated text-based description for a Network Entity.  This key
   attribute uniquely identifies each Network Entity registered in the
   iSNS server.  The attribute length varies from 4 to 256 bytes
   (including the NULL termination), and is a unique value within the
   iSNS server.

   If the iSNS client does not provide an EID during registration, the
   iSNS server SHALL generate one that is unique within the iSNS
   database.  If an EID is to be generated, then the EID attribute
value
   in the registration message SHALL be empty (0 length).  The
generated
   EID SHALL be returned in the registration response.

   In environments where the iSNS server is integrated with a DNS
   infrastructure, the Entity Identifier may be used to store the
Fully
   Qualified Domain Name (FQDN) of the iSCSI or iFCP device.  FQDNs of
   greater than 255 bytes MUST NOT be used.

   If FQDNs are not used, the iSNS server can be used to generate
EIDs.
   EIDs generated by the iSNS server MUST begin with the string
"isns:".
   iSNS clients MUST NOT generate and register EIDs beginning with the
   string "isns:".

   This field MUST be normalized according to the nameprep template
   [NAMEPREP] before it is stored in the iSNS database.

---

The code to create the eid in open-iscsi using the IP number does not
work in my case as
the IP number is not registered in the hosts file or DNS. I checked
this
putting the IP number in the hosts file. Indeed the eid is now
properly translated
to its DNS name (aka hosts file name). Unfortunately, the OpenSolaris
isns server
refused this with a "Source Unauthorized (8)". So I added the same IP
entry to the
/etc/hosts file of the OpenSolaris isns server. A ping to my initiator
showed that
that worked. However, an nslookup on the OpenSolaris did not,
OpenSolaris doesn't use
the hosts file in this case. And (assumingly) the isns also does not.
The registration
fails.

I propose to drop the eid generation code, and just use the iSCSI name
(iqn....) in its
place. That seems to work all the time.

Comments?

Albert
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to