https://bugzilla.redhat.com/show_bug.cgi?id=1331552 This is based on : http://www.redhat.com/archives/libvir-list/2016-May/msg00002.html which I had to first "hand massage" to get to apply and then had to make a couple of adjustments in order to compile. Since the review, Fritz responded directly to me and I've exchanged some thoughts back to him as I dug deeper into the issue. Patches 1 & 2 are related to the problem insomuch as the iscsi code will first try to "see" if a client connection already exists and if so, it won't try to recreate one. If one doesn't exist, then it will try to create one. So in a way it actually expects an error for a couple of paths. That error would be splatted out (in my case in the window I was running libvirtd in debug mode). So the patches make it so one can get an exitstatus and error buffer if they so choose when running the virCommandRunRegex Patches 3-6 are essentially a step by step rework of Fritz's patch with one change. In Fritz's patch the model was to remove the big hammer approach taken to set the "node.startup" to "manual" for every target found for the portal (e.g. the <ipaddr:port>). My approach alters that by only setting "node.startup" to "manual" for any target which libvirt manages via an iSCSI storage pool. I think that keeps the spirit of the original change (commit id '3c12b654') in tact while also making sure to not set "manual" mode on targets libvirt doesn't manage. Fritz Elfert (1): util: Add "--op nonpersistent" to iSCSI sendtargets John Ferlan (5): util: Add exitstatus parameter to virCommandRunRegex iscsi: Add exit status checking for virISCSIGetSession iscsi: Export virISCSITargetAutologin iscsi: Inhibit autologin for only libvirt managed targets iscsi: Remove initiatoriqn from virISCSIScanTargets src/libvirt_private.syms | 1 + src/storage/storage_backend_fs.c | 2 +- src/storage/storage_backend_iscsi.c | 19 +++++++++----- src/storage/storage_backend_logical.c | 10 ++++--- src/util/vircommand.c | 9 ++++--- src/util/vircommand.h | 3 ++- src/util/viriscsi.c | 49 ++++++++++++++++++++--------------- src/util/viriscsi.h | 8 +++++- tests/viriscsitest.c | 7 ++--- 9 files changed, 68 insertions(+), 40 deletions(-) -- 2.5.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list