7 Commits

Author SHA1 Message Date
Kan
dcdb06d812 Replace deprecated LOG.warn with LOG.warning
Change-Id: I0ca31eac70afaccda73e7819c582af0b226b8442
Closes-Bug: #1508442
2016-01-05 05:37:09 +00:00
Dmitry Tantsur
4cd64e28aa Delete the Linux-IO target before setting up local boot
Otherwise it fails with "device already mounted".

Change-Id: If959ba5a10e97f84be2f7498bed7589d13fa30c2
Closes-Bug: #1526304
2015-12-15 15:20:03 +01:00
Dmitry Tantsur
c474a5ac6c Support Linux-IO in addition to tgtd
The iSCSI extension now tries to use Linux-IO first (via rtslib)
and falls back to tgtd if Linux-IO can't be used (e.g. in the CoreOS-based
image which uses containers).

Change-Id: I9cc7a30d9c93c445a66d183146e9260c2b096d33
Closes-Bug: #1504562
2015-11-30 18:38:03 +01:00
dparalen
fb920f41ed determine tgtd ready status through tgtadm
The intention of the iscsi extension _wait_for_iscsi_daemon function
is to wait till the tgtd process boots completely before running any
iscsi commands through the tgtadm command line utility.  The tgtd
process utilises a unix socket for communication with the user and the
_wait_for_iscsi_daemon function asserts the tgtd process status based
on the socket presence.  The socket name/path to use is not specified
by iscsi extension configuration but rather falls-back to a
(system-wide) default value[1].  Since tgtd version 1.0.60, this path
changed from /var/run/tgtd.ipc_abstract_namespace to
/var/run/tgtd/socket[2] and now causes a false-negative while waiting
for the tgtd process to boot[3].

This patch follows implementation suggestion from the bug report[3] to
avoid relying on the socket presence but rather to check the tgtd
status by trying to communicate through the tgtadm tool.

[1] https://github.com/openstack/ironic-python-agent/blob/
5bbb9ded082f2cfde5e8877e9f33294eb93a5fb7/
ironic_python_agent/extensions/iscsi.py#L47 [2]
https://github.com/fujita/tgt/commit/
d1aa4dcfd691c9409dbad5db49ce6754ce9c1b5a
[3] https://bugs.launchpad.net/ironic-python-agent/+bug/1505923

Closes-Bug: #1505923
Change-Id: If3284e0b441fe6c2da507640c08a4bbefd9dad2b
2015-10-20 04:52:59 +02:00
Dan Prince
5bbb9ded08 Fix log formatting error in iscsi.py
This fixes a ValueError exception that would occur if
log debug was enabled in IPA.

Change-Id: Id95f291dd77d69e7d4dd4f945c6c151db7a0646b
Closes-bug: #1503354
2015-10-06 22:47:54 +00:00
Ghe Rivero
10a3a800e7 Use oslo_log lib
Module 'log' from oslo-incubator was removed after release of oslo_log
library.

Change-Id: Ia00e26071fc0cab4fd3f3334ca94860bc7b1c75c
2015-03-24 08:43:35 +01:00
Lucas Alvares Gomes
d3aa7c93aa Add iscsi extension
This extension allows IPA to be used with the PXE/iSCSI methodology of
deployment in Ironic.

Change-Id: I32ec9fa74182c0d03c7ef1b698b1d0c0e3007773
2015-02-26 12:13:00 +00:00