On my fully updated Fedora 18 ovirt test environment, one of my nodes
refused to attach to the iSCSI domain where it was working before.
My vdsm.log had these errors:
storageRefresh::WARNING::2013-06-06
14:57:50,887::fileUtils::185::fileUtils::(createdir) Dir
/rhev/data-center/hsm-tasks already exists
Thread-18::DEBUG::2013-06-06
14:57:50,904::misc::84::Storage.Misc.excCmd::(<lambda>) FAILED: <err>
= 'iscsiadm: Could not stat /var/lib/iscsi/nodes//,3260,-1/default to
delete node: No such file or directory\n\niscsiadm: Error while adding
record: encountered iSCSI database failure\n'; <rc> = 6
Thread-18::DEBUG::2013-06-06
14:57:50,905::misc::84::Storage.Misc.excCmd::(<lambda>) '/usr/bin/sudo
-n /sbin/iscsiadm -m iface' (cwd None)
Thread-18::DEBUG::2013-06-06
14:57:50,933::misc::84::Storage.Misc.excCmd::(<lambda>) SUCCESS: <err>
= ''; <rc> = 0
Thread-18::ERROR::2013-06-06
14:57:50,933::hsm::2215::Storage.HSM::(connectStorageServer) Could not
connect to storageServer
Traceback (most recent call last):
File "/usr/share/vdsm/storage/hsm.py", line 2211, in connectStorageServer
conObj.connect()
File "/usr/share/vdsm/storage/storageServer.py", line 341, in connect
iscsi.addIscsiNode(self._iface, self._target, self._cred)
File "/usr/share/vdsm/storage/iscsi.py", line 132, in addIscsiNode
iscsiadm.node_new(iface.name, portalStr, targetName)
File "/usr/share/vdsm/storage/iscsiadm.py", line 237, in node_new
raise IscsiNodeError(rc, out, err)
IscsiNodeError: (6, [], ['iscsiadm: Could not stat
/var/lib/iscsi/nodes//,3260,-1/default to delete node: No such file or
directory', '', 'iscsiadm: Error while adding record: encountered
iSCSI database failure'])
Rebooting didn't fix it.
The problem was the config file in the iSCSI was empty:
# find /var/lib/iscsi/
/var/lib/iscsi/
/var/lib/iscsi/nodes
/var/lib/iscsi/nodes/iqn.1999-07.com.gurulabs:ovirt
/var/lib/iscsi/nodes/iqn.1999-07.com.gurulabs:ovirt/10.100.0.14,3260 <-- empty
/var/lib/iscsi/ifaces
/var/lib/iscsi/slp
/var/lib/iscsi/static
/var/lib/iscsi/isns
/var/lib/iscsi/send_targets
This command fixed the problem
rm -rf /var/lib/iscsi/nodes/* && reboot