On 07/03/2018 01:40 AM, John Ferlan wrote:
On 06/29/2018 11:01 AM, Michal Privoznik wrote:
> After new iSCSI interface is successfully set up, we issue
s/new/a new/
s/issue/issue a/
> sendtargets command. However, after 56057900dc53df490d we don't
> update the host config which in turn makes login fail because
> iscsiadm is unable to find any matching record for the interface.
>
> Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
> ---
> src/storage/storage_backend_iscsi.c | 1 +
> src/util/viriscsi.c | 21 ++++++++++++++++++---
> src/util/viriscsi.h | 1 +
> tests/viriscsitest.c | 3 ++-
> 4 files changed, 22 insertions(+), 4 deletions(-)
>
Like the previous patch - is there a specific bug or something that led
you down this path? Can you show an example of the existing code that's
creating a bad command line and generating an error and then how this
fixes things. It's not like we have tests and for this stuff it's
really nice to have plenty of examples.
So here is the run without my patches:
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode session
iscsiadm: No active sessions.
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode node --portal
$PORTAL:3260,1 --targetname $TARGET --op new
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode node --portal
$PORTAL:3260,1 --target $TARGET --op update --name node.session.auth.authmethod --value
CHAP
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode node --portal
$PORTAL:3260,1 --target $TARGET --op update --name node.session.auth.username --value
$USER
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode node --portal
$PORTAL:3260,1 --target $TARGET --op update --name node.session.auth.password --value
$PASS
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode iface
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode iface --interface
libvirt-iface-03316143 --op new
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode iface --interface
libvirt-iface-03316143 --op update --name iface.initiatorname --value $INITIATOR
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode iface
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode discovery --type
sendtargets --portal $PORTAL:3260,1 --op nonpersistent
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode node --portal
$PORTAL:3260,1 --targetname $TARGET --login --interface libvirt-iface-03316143
error : virCommandWait:2600 : internal error: Child process (iscsiadm --mode node --portal
$PORTAL:3260,1 --targetname $TARGET --login --interface libvirt-iface-03316143) unexpected
exit status 21:
iscsiadm: No records found
iscsiadm: No records found
And with my patches:
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode session
iscsiadm: No active sessions.
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode node --portal
$PORTAL:3260,1 --targetname $TARGET --op new
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode node --portal
$PORTAL:3260,1 --target $TARGET --op update --name node.session.auth.authmethod --value
CHAP
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode node --portal
$PORTAL:3260,1 --target $TARGET --op update --name node.session.auth.username --value
$USER
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode node --portal
$PORTAL:3260,1 --target $TARGET --op update --name node.session.auth.password --value
$PASS
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode iface
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode iface --interface
libvirt-iface-28727243 --op new
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode iface --interface
libvirt-iface-28727243 --op update --name iface.initiatorname --value $INITIATOR
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode iface
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode discovery --type
sendtargets --portal $PORTAL:3260,1 --interface libvirt-iface-28727243
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode node --portal
$PORTAL:3260,1 --targetname $TARGET --login --interface libvirt-iface-28727243
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode session
debug : virCommandRunAsync:2476 : About to run iscsiadm --mode session -r 1 -R
Thanks,
Michal