diskimage-builder/elements
James Slagle 8d910d10f8 Wait for tgtd socket to be available
tgtd returns execution control and backgrounds itself almost immediately
and before it has made it's listening socket available. This can cause a
race condition as the tgtd socket is not available when tgtadm is run,
resulting in an error:

failed to send request hdr to tgt daemon

Add a function to check if the socket is available before moving on to
calling tgtadm, and a wait_for helper function we can use.  We'll
check for the socket every 0.5 seconds, for up to 5 seconds.

I'm seeing this issue on almost every deploy using a ramdisk built from
Fedora 20. I'm not sure if something has changed in tgtd, but this
behavior is documented since Fedora 18 at least. In the systemd script
for tgtd, there is actually "sleep 5" to work around the problem.

See Also: https://bugzilla.redhat.com/show_bug.cgi?id=848942

Change-Id: Iffa9fc63393309ca653d592dff17316ecbea3e09
2014-01-14 12:53:03 -05:00
..
apt-sources Add element to modify /etc/apt/sources.list in dib 2013-12-18 06:01:36 -08:00
base Fixed command dib-init-system not found error 2014-01-03 17:42:21 +08:00
cache-url /bin/bash all the things. 2013-11-17 16:59:31 -06:00
cloud-init-nocloud Make cloud-init-nocloud work cross-platform. 2013-07-11 08:21:51 -07:00
deploy /bin/bash all the things. 2013-11-17 16:59:31 -06:00
deploy-ironic Add deploy ramdisk element for Ironic 2013-12-04 17:57:44 +02:00
deploy-kexec /bin/bash all the things. 2013-11-17 16:59:31 -06:00
dhcp-all-interfaces Retry link check up to 10 times. 2014-01-13 13:58:42 -05:00
dib-run-parts Enhance dib-run-parts usage message 2013-11-27 17:42:37 +08:00
disable-selinux/post-install.d Modify /etc/selinux/config if it exists 2013-12-03 15:35:49 +08:00
dkms /bin/bash all the things. 2013-11-17 16:59:31 -06:00
dpkg Mark install-packages +x. 2014-01-07 07:54:47 -05:00
dracut-network /bin/bash all the things. 2013-11-17 16:59:31 -06:00
fedora Install traceroute on Fedora. 2014-01-13 15:12:39 -05:00
hwburnin Make sorting of ramdisk init elements explicit. 2013-11-15 17:18:34 +00:00
hwdiscovery Make pxe_mac accurate in two common cases. 2013-11-17 21:43:59 -06:00
local-config local-config: Configure proxy for zypper repos 2013-12-10 15:54:59 +01:00
mellanox Split network bringup out of base ramdisk init. 2013-11-17 20:37:26 +00:00
modprobe-blacklist Add new modprobe-blacklist element. 2014-01-13 15:43:29 -05:00
opensuse Mark install-packages +x. 2014-01-07 07:54:47 -05:00
pip-cache Add a pip-cache element. 2013-08-26 15:17:41 -04:00
pypi Remove github references 2013-09-18 08:17:10 -05:00
ramdisk Wait for tgtd socket to be available 2014-01-14 12:53:03 -05:00
rhel Mark install-packages +x. 2014-01-07 07:54:47 -05:00
rpm-distro /bin/bash all the things. 2013-11-17 16:59:31 -06:00
selinux-permissive /bin/bash all the things. 2013-11-17 16:59:31 -06:00
serial-console /bin/bash all the things. 2013-11-17 16:59:31 -06:00
source-repositories Add package support to source-repositories 2014-01-13 08:23:53 -05:00
ubuntu Switch Ubuntu element to installing saucy. 2013-11-27 10:10:39 +00:00
vm Merge force-text-mode-console into the bootloader script 2013-12-16 13:58:42 +01:00
yum Fix $TARGET_ROOT usage in yum element 2013-12-10 17:56:42 +01:00
zypper Add zypper element 2013-12-11 17:09:24 +01:00