Bug 190489 - [iscsi] Native ISCSI - UNIT_ATTENTION with KVM
Summary: [iscsi] Native ISCSI - UNIT_ATTENTION with KVM
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Edward Tomasz Napierala
URL:
Keywords:
: 190472 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-02 06:21 UTC by harunaga
Modified: 2014-10-14 19:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description harunaga 2014-06-02 06:21:06 UTC
Problem with Native ISCIS for use with KVM hypervisor.
Reports KVM at startup:

vm: -drive file=iscsi://192.168.0.200/iqn.2012-06.storage:target0/10,if=none,id=drive-virtio0,aio=native,cache=none: iSCSI: Failed to connect to LUN : SENSE KEY:UNIT_ATTENTION(6) ASCQ:(null)(0x2901)

Can run with the second or third attempt. After a successful run is no problem.
This problem is very serious obstacle, as a result of migration does not work or autostart virtual machines (VM) after a reboot of the hypervisor.

Environment:
FreeBSD storage.oc.chics.ru 10.0-RELEASE-p3 FreeBSD 10.0-RELEASE-p3 #0: Tue May 13 18:31:10 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

How-To-Repeat:
Add new LUN in /etc/ctl.conf, make 'service ctld reload'. Start KVM:

kvm -drive 'file=iscsi://<IP>/<TARGET>/<LUN>'

get error:
Failed to connect to LUN : SENSE KEY:UNIT_ATTENTION(6) ASCQ:(null)(0x2901)
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-06-02 07:31:11 UTC
Over to maintainer(s).
Comment 2 Edward Tomasz Napierala freebsd_committer freebsd_triage 2014-06-18 21:02:14 UTC
I believe this is due to a bug in libiscsi, which is used by KVM.  Maintainer was notified some time ago; are you running a latest version available?
Comment 3 Edward Tomasz Napierala freebsd_committer freebsd_triage 2014-06-18 21:09:21 UTC
*** Bug 190472 has been marked as a duplicate of this bug. ***
Comment 4 harunaga 2014-06-26 05:05:56 UTC
I'm using https://github.com/proxmox/libiscsi (1.9.0) version and have no problems with istgt (freebsd) or comstar (solaris).
Comment 5 Edward Tomasz Napierala freebsd_committer freebsd_triage 2014-10-06 15:02:02 UTC
A workaround for this libiscsi bug was committed to 11-CURRENT as r272040, and MFCed as r272203.  Which is to say, it should be fixed in 10.1.  Could you try 10.1-RC1 and see if the problem persists?
Comment 6 harunaga 2014-10-14 17:12:28 UTC
I updated the hypervisor and libiscsi to version 1.12.0 and problems solved (tested on 10.0-RELEASE and 10.1-RC2).
Comment 7 Edward Tomasz Napierala freebsd_committer freebsd_triage 2014-10-14 19:14:46 UTC
Thanks!
Comment 8 harunaga 2014-10-14 19:45:11 UTC
P.S. 10.0-RELEASE there was a problem. In version 10.1-RC2, the problem solved.