Currently we hardcode the iSCSI port to its default. With this
patch, we added new portal_port argument into iscsi.start_iscsi_target
api, cover both lio and tgt two iscsi target operations.
And for IPA client and driver code change, will commit more patch to
cover.
Change-Id: I6da20487ccba6cbac04d36b8643afdd1e3920b12
Partial-Bug: #1523829
If the local disk has already a partition table, it must be clean up
before the disk is exposed through iscsi. Otherwise this disk partition
can create a conflict during the grub installation.
How reproducible:
1. Inject an image on the root disk, like for example ipxe.usb or ipxe.iso
2. Try to deploy a system on the node using Ironic
3. The node is properly deployed but the grub installation has failed
with the following error:
attempting to install grub to a disk with multiple partition labels
A simple sgdisk -Z /dev/vdX is not enough because grub-install will
inspect the disk and will still detect a remaining partition.
This commit makes use of the ironic-lib to do the clean up of the disk.
The additional review Id59fa5a06b9115c0f9afc09aae95daaac97e2fac increase
the amount of data to wipe.
References:
https://bugzilla.redhat.com/show_bug.cgi?id=1310883
Partial-Bug: 1550604
Change-Id: Ie68cb6296c782e904d40f6e9de0faa52ab2af2bf
When neither tgt nor linux-io are available, we only get error
message like 'No such file or directory', this situation should
be detected and return a better error instead.
Change-Id: I334717a1a8a728aa6da6024ff9fc6d817399a41f
Closes-Bug: #1540958
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
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
This fixes a ValueError exception that would occur if
log debug was enabled in IPA.
Change-Id: Id95f291dd77d69e7d4dd4f945c6c151db7a0646b
Closes-bug: #1503354