My motivation was that the minimum required to get tcp via -I is creating an iface file that only has " iface.transport_name = tcp", which seems unnecessary. I'll change the patch to have the changes as requested.
> -----Original Message----- > From: Mike Christie [mailto:[email protected]] > Sent: Friday, July 25, 2014 10:48 AM > To: [email protected] > Cc: Anish Bhatt > Subject: Re: [PATCH trivial] iscsiadm : support using -I tcp or -I iscsi_tcp > > On 07/25/2014 12:26 PM, Mike Christie wrote: > > On 07/24/2014 10:24 PM, Anish Bhatt wrote: > >> This came up as a scripting issue, iscsiadm currently does not > >> support specifying tcp as a "default" iface when nothing else is available. > >> Behaves exactly as if no -I option was used. > >> > >> Signed-off-by: Anish Bhatt <[email protected]> > >> --- > >> usr/iscsiadm.c | 4 ++++ > >> 1 file changed, 4 insertions(+) > >> > >> diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c index 389f4b8..07cf470 > >> 100644 > >> --- a/usr/iscsiadm.c > >> +++ b/usr/iscsiadm.c > >> @@ -3351,6 +3351,10 @@ main(int argc, char **argv) > >> ping_interval = atoi(optarg); > >> break; > >> case 'I': > >> + if (!strcmp(optarg, "tcp") || > >> + !strcmp(optarg, "iscsi_tcp")) > >> + break; > >> + > >> iface = iface_alloc(optarg, &rc); > >> if (rc == ISCSI_ERR_INVAL) { > >> printf("Invalid iface name %s. Must be from " > >> > > > > Why would you be passing in or tcp/iscsi_tcp if you did not create a > > iface with that name? > > > > If you also do the above, it then works differently from if you pass > > in "-I iser". > > I do not think we can do this patch. If the user wanted to use ifaces then > they > should set it up properly. If in the future they were going to set some iface > setting, then I am not sure how this will work. > > What I should have done was name the "default" iface ("-I default" > support) to tcp like with iser. I actually did the iser support later so that > is why > the naming is different. The default iface though was not really supposed to > be used by users. It is just a dummy iface for compat. > > If you can come up with a patch to rename the default iface to tcp, and can > do it in a way where existing setups are not broken I would be happy to take > that patch. -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
