After the changeset "Use timeout when waiting for responses from iscsid" 
discoverydb commands from iscsiadm are apparently running with a 0 timeout and 
failing when the response from iscsid isn't already in the socket buffer when 
poll is called.

This change seems to fix it.  All this can probably be cleaned up more, I was 
just trying to trace down where the missing assignment was and ran across 
multiple sites where it was later be zeroed again.

- Chris

---

diff --git a/usr/idbm.c b/usr/idbm.c
index 3b8a5a2..eb46e94 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -914,6 +914,7 @@ idbm_discovery_setup_defaults(discovery_rec_t *rec, 
discovery_type_e type)
 
        rec->startup = ISCSI_STARTUP_MANUAL;
        rec->type = type;
+       rec->iscsid_req_tmo = -1;
        switch (type) {
        case DISCOVERY_TYPE_SENDTARGETS:
                rec->u.sendtargets.discoveryd_poll_inval = 30;
@@ -1914,6 +1915,7 @@ idbm_discovery_read(discovery_rec_t *out_rec, int 
drec_type,
                return ISCSI_ERR_INVAL;
 
        memset(out_rec, 0, sizeof(discovery_rec_t));
+       out_rec->iscsid_req_tmo = -1;
 
        info = idbm_recinfo_alloc(MAX_KEYS);
        if (!info)
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index 4b2bd34..5818596 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -2860,6 +2860,7 @@ static int exec_disc2_op(int disc_type, char *ip, int 
port,
        int rc = 0;
 
        memset(&drec, 0, sizeof(struct discovery_rec));
+       drec.iscsid_req_tmo = -1;
        if (disc_type != -1)
                drec.type = disc_type;
 

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to