diff --git a/elements/hadoop/install.d/40-setup-hadoop b/elements/hadoop/install.d/40-setup-hadoop index e74046ba..da72c316 100755 --- a/elements/hadoop/install.d/40-setup-hadoop +++ b/elements/hadoop/install.d/40-setup-hadoop @@ -115,6 +115,17 @@ else RC_SCRIPT_DIR="/etc/rc.d" fi +# Make sure that rc-local.service starts after cloud-init.service, +# so that the cloud-init user (centos, ubuntu, cloud-user, ...) +# is available. See also: +# https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1468103 +# All version of distributions affected by this change use systemd. +mkdir -p /etc/systemd/system/rc-local.service.d/ +cat >/etc/systemd/system/rc-local.service.d/override.conf <