提交 72925169 编写于 作者: J John Ferlan

viriscsi: Need to sendtargets on Initiator IQN

https://bugzilla.redhat.com/show_bug.cgi?id=1172015

The refactoring done as part of commit id '59446096' caused a regression
for the multi initiator IQN commit '6aabcb5b' because the sendtargets was
not done on/for the initiator IQN prior to login (or trying to disable
autologin)

Prior to that commit, the paths were essentially

virStorageBackendISCSIStartPool
    virStorageBackendISCSILogin
        virStorageBackendISCSIConnection
            if initiatoriqn
                virStorageBackendCreateIfaceIQN
                Issue sendtargets
                Perform --login
            else
                Issue sendtargets
                Perform --login

After that commit:

virStorageBackendISCSIStartPool
    Issue sendtargets
    Call virStorageBackendISCSIConnection
        If initiatoriqn
            virStorageBackendCreateIfaceIQN
            Perform --login
        else
            Perform --login

So for non initiator IQN paths, nothing changed. For the initiator path,
the --login fails as does any attempts to change autologin via "--op update
--name node.startup --value manual".
上级 8832e2d4
...@@ -295,10 +295,17 @@ virISCSIConnection(const char *portal, ...@@ -295,10 +295,17 @@ virISCSIConnection(const char *portal,
VIR_DEBUG("ifacename: '%s'", ifacename); VIR_DEBUG("ifacename: '%s'", ifacename);
break; break;
case IQN_MISSING: case IQN_MISSING:
if (virStorageBackendCreateIfaceIQN(initiatoriqn, if (virStorageBackendCreateIfaceIQN(initiatoriqn, &ifacename) != 0)
&ifacename) != 0) {
goto cleanup; goto cleanup;
} /*
* iscsiadm doesn't let you send commands to the Interface IQN,
* unless you've first issued a 'sendtargets' command to the
* portal. Without the sendtargets all that is received is a
* "iscsiadm: No records found"
*/
if (virISCSIScanTargets(portal, initiatoriqn, NULL, NULL) < 0)
goto cleanup;
break; break;
case IQN_ERROR: case IQN_ERROR:
default: default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册