Mike Christie wrote: > Michael wrote: >> Also, it works perfectly fine if I go into /etc/iscsi/nodes/<target >> name>/10.3.2.1,3260 and edit the node.startup line myself. Am I just >> typing the command wrong without realizing it? Again, I'm doing: >> > > What version of the tools are you using and did you upgrade or switch > tool versions? > > And did you make this node by hand/manually by doing > iscsiadm -m node -T target -p ip:port --op new > ? > > > The wierd part is that we see this in the log out put you snipped: > > iscsiadm: found 10.3.2.7,3260,-1 > > Here the tpgt is -1 which means it did not get set. Normally targets are > going to send us this so if we did sendtargets we should have that info. > > If you do the old style build by hand with no tpgt like this to create > the record: > > iscsiadm -m node -T target -p ip:port --op new > > then the db uses the old format (so > /etc/iscsi/nodes/<targetname>/10.3.2.1,3260 would be a file) > > To use the new format you have to pass in the tpgt > > iscsiadm -m node -T target -p ip:port,tpgt --op new > > (here there is no /etc/iscsi/nodes/<targetname>/10.3.2.1,3260 file and > we have /etc/iscsi/nodes/<targetname>/10.3.2.1,3260,tpgt as a dir). >
Attached is a patch to support the old behavior with new tools. I thought I added this before, but it looks like for some reason I did not handle all the cases. The patch applies to git head or the 869.2. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/open-iscsi -~----------~----~----~----~------~----~------~--~---
diff --git a/usr/idbm.c b/usr/idbm.c index f915e8f..0cb3c44 100644 --- a/usr/idbm.c +++ b/usr/idbm.c @@ -1498,7 +1498,15 @@ static int idbm_rec_write(node_rec_t *rec) if (!S_ISDIR(statb.st_mode)) { /* - * Old style portal as a file. Let's update it. + * older iscsiadm versions had you create the config then set + * set the tgpt. In new versions you must pass all the info in + * from the start + */ + if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN) + /* drop down to old style portal as config */ + goto open_conf; + /* + * Old style portal as a file, but with tpgt. Let's update it. */ if (unlink(portal)) { log_error("Could not convert %s. err %d\n", portal,