Re: TODO list- userspace2.
On 10/11/2011 10:59 AM, rahul gupta wrote: Hi Mike/all, I am working on a part of user space 1 of TODO list, which precisely says- No comments still. I guess logging is not fun :) the functions that were run (FUNCTION) the iSCSI packets that were sent/receieved (PDUS) print out extended iscsi login error information (LOGIN_ERRS) i) I have written log_debug to retrieve all functions names and print PDUS sent/recieved. but in case of FUNCTION for retrieving description I got two ways- (Please suggest which one is better approach) (all pls note that description always has to be in format just above function definition starts- /** * function name - function description ) 1st approach- For getting description I will call a function, func_descrip(descrip, __FILE__ , __FUNCTION__, __LINE__); by this function I will fopen the file and then search for the desired function name whos one line back i will find /*, so that I will be sure this is the description of the desired function :) . 2nd approach is- I can create a global structure which will carry the function and its description, I mean something like:- struct func_name_descip{ char func_name[20]; char func_descrip[256]; }; and while executing discovery a function which will parse all .c files under usr directory and fill up this structure, while calling log_debug for FUNCTION, I will retrieve all values from the global object of this structure. disadvantage of 1st approach is- its very time consuming task for iscsiadm every time log_debug() is encountered then whole file is parsed for retrieving description which has been already parsed for other functions. Whereas disadv of 2nd one is - creating a global variable, also triggering it during discovery might slow up discovery too (but we can trigger it only when user specifies -d FUNCTION). I think second one is better. Please let me know anyone has a better idea, also share your views on these two. I also do not like #1 so much. How about just having us developers call some function we want logged? I do not think this should be so bad and it is simple. ii) Regarding LOGIN_ERRS, after reading __check_iscsi_status_class(), I thought maybe it should come in debug with iscsid, I mean iscsid -f -d LOGIN_ERR and NOT iscsiadm -m node -T iqn.iet.target -p 102.2.2.2 -d LOGIN_ERR In TODO, do you also mean't to say same as above I have written. well I can try to do it for any/both :) , let me know which one is desired/better. Ah yeah, you are right. I was actually thinking both. iscsid might pass back a more informative return value to iscsidm which would then print it out to the user. Today, we just have login failed and login failed due to CHAP error. -- 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?hl=en.
Re: TODO list- userspace2.
Hi Mike/all, I am working on a part of user space 1 of TODO list, which precisely says- the functions that were run (FUNCTION) the iSCSI packets that were sent/receieved (PDUS) print out extended iscsi login error information (LOGIN_ERRS) i) I have written log_debug to retrieve all functions names and print PDUS sent/recieved. but in case of FUNCTION for retrieving description I got two ways- (Please suggest which one is better approach) (all pls note that description always has to be in format just above function definition starts- /** * function name - function description ) 1st approach- For getting description I will call a function, func_descrip(descrip, __FILE__ , __FUNCTION__, __LINE__); by this function I will fopen the file and then search for the desired function name whos one line back i will find /*, so that I will be sure this is the description of the desired function :) . 2nd approach is- I can create a global structure which will carry the function and its description, I mean something like:- struct func_name_descip{ char func_name[20]; char func_descrip[256]; }; and while executing discovery a function which will parse all .c files under usr directory and fill up this structure, while calling log_debug for FUNCTION, I will retrieve all values from the global object of this structure. disadvantage of 1st approach is- its very time consuming task for iscsiadm every time log_debug() is encountered then whole file is parsed for retrieving description which has been already parsed for other functions. Whereas disadv of 2nd one is - creating a global variable, also triggering it during discovery might slow up discovery too (but we can trigger it only when user specifies -d FUNCTION). I think second one is better. Please let me know anyone has a better idea, also share your views on these two. ii) Regarding LOGIN_ERRS, after reading __check_iscsi_status_class(), I thought maybe it should come in debug with iscsid, I mean iscsid -f -d LOGIN_ERR and NOT iscsiadm -m node -T iqn.iet.target -p 102.2.2.2 -d LOGIN_ERR In TODO, do you also mean't to say same as above I have written. well I can try to do it for any/both :) , let me know which one is desired/better. Thanks, Rahul. On Mon, Aug 8, 2011 at 9:49 PM, Mike Christie micha...@cs.wisc.edu wrote: On 08/03/2011 12:24 PM, rahul gupta wrote: For integers, like timeout:- while fetching from sysfs_get_str(), I am setting timeouts to -1 for indicating error and also in qla card's case where chap is not supported in /sys, and then while printing, checking same value by taking its complement. I found in iscsid.conf file setting timeout value to -1 to huge -ve value is valid (as after setting that can restart iscsid successfully) but not really sure does user uses it. I assume user never uses -1 for timeout in iscsid.conf file, so I have used it in following code for error purpose:- Signed-off-by: Rahul Gupta rahulrgupt...@gmail.com iSCSI user space TODO item-2 : Displaying timeout and CHAP. Date: Wed Aug 3 22:35:30 2011 IST. Thank you for your work on this. Merged in commit 42a5950919038cac331c7fa69304478bd62bec15. It should show up on kernel.org in a couple hours. -- 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?hl=en.
Re: TODO list- userspace2.
On 08/03/2011 12:24 PM, rahul gupta wrote: For integers, like timeout:- while fetching from sysfs_get_str(), I am setting timeouts to -1 for indicating error and also in qla card's case where chap is not supported in /sys, and then while printing, checking same value by taking its complement. I found in iscsid.conf file setting timeout value to -1 to huge -ve value is valid (as after setting that can restart iscsid successfully) but not really sure does user uses it. I assume user never uses -1 for timeout in iscsid.conf file, so I have used it in following code for error purpose:- Signed-off-by: Rahul Gupta rahulrgupt...@gmail.com iSCSI user space TODO item-2 : Displaying timeout and CHAP. Date: Wed Aug 3 22:35:30 2011 IST. Thank you for your work on this. Merged in commit 42a5950919038cac331c7fa69304478bd62bec15. It should show up on kernel.org in a couple hours. -- 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?hl=en.
Re: TODO list- userspace2.
On Thu, Jul 28, 2011 at 7:03 PM, Mike Christie micha...@cs.wisc.edu wrote: On 07/26/2011 01:43 PM, rahul gupta wrote: Hi Mike, Hey, I have taken care of points you mentioned in last mail. Following is git diff with my comments (for patch without comments please refer attachment):- Note1: I am not sure how much CHAP length user can use is needed so I kept it to huge limit like iqn, if you want to decrease it, please let me know what limit should be kept. There is a define AUTH_STR_MAX_LEN for this. Note2: Forcing session_info_print_tree() to always pass 0 for do_show, because of two reasons:- 1. As this part of code comes into picture when iscsiadm -m host -P3 command is used, and this command throws error if you use -S option. 2. Since I have to assume some value, so I took 0 (ie to not to show password) as to view password/session info we already have iscsiadm -m session -P3 -S :) Note3: I have created two new flags SESSION_INFO_ISCSI_TIM and SESSION_INFO_ISCSI_AUTH, as they might be needed in future, otherwise if you want I can merge code these two flag's code into the existing one flag- SESSION_INFO_ISCSI_PARAMS. Seems fine. diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c index e82fe80..7e8f03f 100644 --- a/usr/iscsi_sysfs.c +++ b/usr/iscsi_sysfs.c @@ -675,8 +675,72 @@ int iscsi_sysfs_get_sessioninfo_by_id(struct session_info *info, char *session) return ISCSI_ERR_SYSFS_LOOKUP; } + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, username, + (info-chap).username, + sizeof((info-chap).username)); + if (ret) { + log_error(could not read session targetname: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + if ((info-chap).username[0] == '\0') + strcpy((info-chap).username, NULL); + if (ret) { + log_error(could not read session username: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, password, + (info-chap).password, + sizeof((info-chap).password)); + if ((info-chap).password[0] == '\0') + strcpy((info-chap).password, NULL); + if (ret) { + log_error(could not read session password: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, username_in, + (info-chap).username_in, + sizeof((info-chap).username_in)); + if ((info-chap).username_in[0] == '\0') + strcpy((info-chap).username_in, NULL); + if (ret) { + log_error(could not read session username_in: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, password_in, + (info-chap).password_in, + sizeof((info-chap).password_in)); + if ((info-chap).password_in[0] == '\0') + strcpy((info-chap).password_in, NULL); + if (ret) { + log_error(could not read session password_in: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, recovery_tmo, + ((info-tmo).recovery_tmo)); + if (ret) { + log_error(could not read session recovery_tmo: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, lu_reset_tmo, + ((info-tmo).lu_reset_tmo)); + if (ret) { + log_error(could not read session lu_reset_tmo: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, abort_tmo, + ((info-tmo).abort_tmo)); + if (ret) { + log_error(could not read session abort_tmo: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, tpgt, - info-tpgt); + info-tpgt); if (ret) { log_error(could not read session tpgt: %d, ret); return ISCSI_ERR_SYSFS_LOOKUP; @@ -741,7 +805,7 @@ int iscsi_sysfs_get_sessioninfo_by_id(struct session_info *info, char *session) } Some drivers are not able to export all this info so it is currently optional. The CHAP info should really be required, but qla4xxx for example is not exporting this info. Also not all drivers support all the different timeout options if they do not support the TMF. So I think if we get an error from sysfs_get_*
Re: TODO list- userspace2.
On 07/26/2011 01:43 PM, rahul gupta wrote: Hi Mike, Hey, I have taken care of points you mentioned in last mail. Following is git diff with my comments (for patch without comments please refer attachment):- Note1: I am not sure how much CHAP length user can use is needed so I kept it to huge limit like iqn, if you want to decrease it, please let me know what limit should be kept. There is a define AUTH_STR_MAX_LEN for this. Note2: Forcing session_info_print_tree() to always pass 0 for do_show, because of two reasons:- 1. As this part of code comes into picture when iscsiadm -m host -P3 command is used, and this command throws error if you use -S option. 2. Since I have to assume some value, so I took 0 (ie to not to show password) as to view password/session info we already have iscsiadm -m session -P3 -S :) Note3: I have created two new flags SESSION_INFO_ISCSI_TIM and SESSION_INFO_ISCSI_AUTH, as they might be needed in future, otherwise if you want I can merge code these two flag's code into the existing one flag- SESSION_INFO_ISCSI_PARAMS. Seems fine. diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c index e82fe80..7e8f03f 100644 --- a/usr/iscsi_sysfs.c +++ b/usr/iscsi_sysfs.c @@ -675,8 +675,72 @@ int iscsi_sysfs_get_sessioninfo_by_id(struct session_info *info, char *session) return ISCSI_ERR_SYSFS_LOOKUP; } + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, username, + (info-chap).username, + sizeof((info-chap).username)); + if (ret) { + log_error(could not read session targetname: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + if ((info-chap).username[0] == '\0') + strcpy((info-chap).username, NULL); + if (ret) { + log_error(could not read session username: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, password, + (info-chap).password, + sizeof((info-chap).password)); + if ((info-chap).password[0] == '\0') + strcpy((info-chap).password, NULL); + if (ret) { + log_error(could not read session password: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, username_in, + (info-chap).username_in, + sizeof((info-chap).username_in)); + if ((info-chap).username_in[0] == '\0') + strcpy((info-chap).username_in, NULL); + if (ret) { + log_error(could not read session username_in: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, password_in, + (info-chap).password_in, + sizeof((info-chap).password_in)); + if ((info-chap).password_in[0] == '\0') + strcpy((info-chap).password_in, NULL); + if (ret) { + log_error(could not read session password_in: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, recovery_tmo, + ((info-tmo).recovery_tmo)); + if (ret) { + log_error(could not read session recovery_tmo: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, lu_reset_tmo, + ((info-tmo).lu_reset_tmo)); + if (ret) { + log_error(could not read session lu_reset_tmo: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, abort_tmo, + ((info-tmo).abort_tmo)); + if (ret) { + log_error(could not read session abort_tmo: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, tpgt, - info-tpgt); + info-tpgt); if (ret) { log_error(could not read session tpgt: %d, ret); return ISCSI_ERR_SYSFS_LOOKUP; @@ -741,7 +805,7 @@ int iscsi_sysfs_get_sessioninfo_by_id(struct session_info *info, char *session) } Some drivers are not able to export all this info so it is currently optional. The CHAP info should really be required, but qla4xxx for example is not exporting this info. Also not all drivers support all the different timeout options if they do not support the TMF. So I think if we get an error from sysfs_get_* we can just drop the error and continue on as best we can. For printing then I think you can just print something indicating it was not set like NULL (I think that is what do currently do).
Re: TODO list- userspace2.
Hi Mike, I have taken care of points you mentioned in last mail. Following is git diff with my comments (for patch without comments please refer attachment):- Note1: I am not sure how much CHAP length user can use is needed so I kept it to huge limit like iqn, if you want to decrease it, please let me know what limit should be kept. Note2: Forcing session_info_print_tree() to always pass 0 for do_show, because of two reasons:- 1. As this part of code comes into picture when iscsiadm -m host -P3 command is used, and this command throws error if you use -S option. 2. Since I have to assume some value, so I took 0 (ie to not to show password) as to view password/session info we already have iscsiadm -m session -P3 -S :) Note3: I have created two new flags SESSION_INFO_ISCSI_TIM and SESSION_INFO_ISCSI_AUTH, as they might be needed in future, otherwise if you want I can merge code these two flag's code into the existing one flag- SESSION_INFO_ISCSI_PARAMS. Signed-off-by: Rahul Gupta rahulrgupt...@gmail.com Date: Wed July 27 0:10:30 2011 IST. iSCSI user space TODO item-2 : Displaying timeout and CHAP. diff --git a/include/iscsi_proto.h b/include/iscsi_proto.h index 1c69feb..5230b8c 100644 --- a/include/iscsi_proto.h +++ b/include/iscsi_proto.h @@ -619,6 +619,7 @@ struct iscsi_reject { #define KEY_MAXLEN 64 #define VALUE_MAXLEN 255 #define TARGET_NAME_MAXLEN VALUE_MAXLEN +#define CHAP_LEN VALUE_MAXLEN #define ISCSI_DEF_MAX_RECV_SEG_LEN 8192 #define ISCSI_MIN_MAX_RECV_SEG_LEN 512 diff --git a/usr/host.c b/usr/host.c index ec983b0..d171455 100644 --- a/usr/host.c +++ b/usr/host.c @@ -151,7 +151,7 @@ static int host_info_print_tree(void *data, struct host_info *hinfo) printf(\tSessions:\n); printf(\t*\n); - session_info_print_tree(sessions, \t, session_info_flags);+ session_info_print_tree(sessions, \t, session_info_flags, 0); session_info_free_list(sessions); return 0; } diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c index e82fe80..7e8f03f 100644 --- a/usr/iscsi_sysfs.c +++ b/usr/iscsi_sysfs.c @@ -675,8 +675,72 @@ int iscsi_sysfs_get_sessioninfo_by_id(struct session_info *info, char *session) return ISCSI_ERR_SYSFS_LOOKUP; } + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, username, + (info-chap).username, + sizeof((info-chap).username)); + if (ret) { + log_error(could not read session targetname: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + if ((info-chap).username[0] == '\0') + strcpy((info-chap).username, NULL); + if (ret) { + log_error(could not read session username: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, password, + (info-chap).password, + sizeof((info-chap).password)); + if ((info-chap).password[0] == '\0') + strcpy((info-chap).password, NULL); + if (ret) { + log_error(could not read session password: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, username_in, + (info-chap).username_in, + sizeof((info-chap).username_in)); + if ((info-chap).username_in[0] == '\0') + strcpy((info-chap).username_in, NULL); + if (ret) { + log_error(could not read session username_in: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, password_in, + (info-chap).password_in, + sizeof((info-chap).password_in)); + if ((info-chap).password_in[0] == '\0') + strcpy((info-chap).password_in, NULL); + if (ret) { + log_error(could not read session password_in: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, recovery_tmo, + ((info-tmo).recovery_tmo)); + if (ret) { + log_error(could not read session recovery_tmo: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, lu_reset_tmo, + ((info-tmo).lu_reset_tmo)); + if (ret) { + log_error(could not read session lu_reset_tmo: %d, ret); + return ISCSI_ERR_SYSFS_LOOKUP; + } + + ret = sysfs_get_int(session, ISCSI_SESSION_SUBSYS, abort_tmo, + ((info-tmo).abort_tmo)); + if (ret) { + log_error(could not read session abort_tmo: %d, ret);
Re: TODO list- userspace2.
On 07/19/2011 12:32 PM, rahul gupta wrote: Hi Mike, As we discussed last week, I have taken up TODO- userspace list item #2. I have analysed and coded on some part of it on this weekend :- For timeout and CHAP I have taken following parameters values from /sys and printed it. [root@a usr]# ls /sys/class/iscsi_session/session17/ | grep tmo abort_tmo lu_reset_tmo recovery_tmo The o/p looks like:- [root@a usr]# ./iscsiadm -m session -P3 Target: iqn.2004-05.xyz.bumblee Current Portal: 103.3.3.60:3260,1 Persistent Portal: 103.3.3.60:3260,1 ** Interface: ** Iface Name: default Iface Transport: tcp Iface Initiatorname: iqn.1994-05.com.redhat:2899883c314b Iface IPaddress: 103.3.3.105 Iface HWaddress: default Iface Netdev: default SID: 17 iSCSI Connection State: LOGGED IN iSCSI Session State: LOGGED_IN Internal iscsid Session State: NO CHANGE * Timeout: Maybe it should be Timeouts (with a 's') since there is more than 1. * Recovery Timeout: 120 Lun reset Timeout: 30 should probably be all caps LUN. Looks ok though. Abort Timeout: 15 ** CHAP: ** username: initiator_id password: initiator_sec1 username_in: target_id1 password_in: target_secret1 Negotiated iSCSI params: HeaderDigest: None DataDigest: None MaxRecvDataSegmentLength: 262144 MaxXmitDataSegmentLength: 8192 FirstBurstLength: 65536 MaxBurstLength: 262144 ImmediateData: Yes InitialR2T: No MaxOutstandingR2T: 1 Attached SCSI devices: Host Number: 23 State: running scsi23 Channel 00 Id 0 Lun: 0 Attached scsi disk sdb State: running If output looks ok then I will improve and forward the final patch, also let me know if I have missed out something in timeout/CHAP. For displaying CHAP :- Shall I display password also in text form or print '*' instead. (as on running iscsiadm -m node -T target name -p ip, it displays only. For node mode you have to pass it the --show/-S param to show chap passwords. You can probably force the same thing in session mode. I mean :- [root@localhost ~]# iscsiadm -m node -T target name -p ip # BEGIN RECORD 2.0-872 node.name = iqn.2004-05.com.xyz.bumblee2 node.tpgt = 1 node.startup = automatic node.leading_login = No iface.hwaddress = empty iface.ipaddress = empty . . node.session.auth.authmethod = CHAP node.session.auth.username = initiator_id1 node.session.auth.password = node.session.auth.username_in = target_id1 node.session.auth.password_in = node.session.timeo.replacement_timeout = 120 . . ) These values needs to be printed in print level3 only or in 0/1/2. Maybe just level 2, because we are printing the values used for the iscsi session. -- 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?hl=en.
TODO list- userspace2.
Hi Mike, As we discussed last week, I have taken up TODO- userspace list item #2. I have analysed and coded on some part of it on this weekend :- For timeout and CHAP I have taken following parameters values from /sys and printed it. [root@a usr]# ls /sys/class/iscsi_session/session17/ | grep tmo abort_tmo lu_reset_tmo recovery_tmo The o/p looks like:- [root@a usr]# ./iscsiadm -m session -P3 Target: iqn.2004-05.xyz.bumblee Current Portal: 103.3.3.60:3260,1 Persistent Portal: 103.3.3.60:3260,1 ** Interface: ** Iface Name: default Iface Transport: tcp Iface Initiatorname: iqn.1994-05.com.redhat:2899883c314b Iface IPaddress: 103.3.3.105 Iface HWaddress: default Iface Netdev: default SID: 17 iSCSI Connection State: LOGGED IN iSCSI Session State: LOGGED_IN Internal iscsid Session State: NO CHANGE * Timeout: * Recovery Timeout: 120 Lun reset Timeout: 30 Abort Timeout: 15 ** CHAP: ** username: initiator_id password: initiator_sec1 username_in: target_id1 password_in: target_secret1 Negotiated iSCSI params: HeaderDigest: None DataDigest: None MaxRecvDataSegmentLength: 262144 MaxXmitDataSegmentLength: 8192 FirstBurstLength: 65536 MaxBurstLength: 262144 ImmediateData: Yes InitialR2T: No MaxOutstandingR2T: 1 Attached SCSI devices: Host Number: 23 State: running scsi23 Channel 00 Id 0 Lun: 0 Attached scsi disk sdb State: running If output looks ok then I will improve and forward the final patch, also let me know if I have missed out something in timeout/CHAP. For displaying CHAP :- Shall I display password also in text form or print '*' instead. (as on running iscsiadm -m node -T target name -p ip, it displays only. I mean :- [root@localhost ~]# iscsiadm -m node -T target name -p ip # BEGIN RECORD 2.0-872 node.name = iqn.2004-05.com.xyz.bumblee2 node.tpgt = 1 node.startup = automatic node.leading_login = No iface.hwaddress = empty iface.ipaddress = empty . . node.session.auth.authmethod = CHAP node.session.auth.username = initiator_id1 node.session.auth.password = node.session.auth.username_in = target_id1 node.session.auth.password_in = node.session.timeo.replacement_timeout = 120 . . ) These values needs to be printed in print level3 only or in 0/1/2. Also, plz let me know if I have missed out any iscsi value that has to be printed in above list. Regards, Rahul Gupta. -- 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?hl=en.