summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Toscano <ltoscano@redhat.com>2018-11-30 23:20:01 +0100
committerLuigi Toscano <ltoscano@redhat.com>2018-12-03 19:10:34 +0100
commit44b8115743a687bd690a244a4ee16a94409fb35f (patch)
tree1493bd170e1d6e7c118c7f45352e772503f41543
parentc46fb03166fedd837138720049dfab78c9628e12 (diff)
firstboot: make rc-local start after cloud-initstable/queens
The change is required because the cloud-init user (centos, ubuntu, cloud-user, ...) is used in the firstboot code. All distributions where vanilla can be deployed are based on systemd. Story: 2004479 Task: 28194 Change-Id: I9d8a626b84d5d3c2a91348895cded5fd32ded52a (cherry picked from commit 578cb4824bfa87ecc7ae196656c49012585738c7)
Notes
Notes (review): Code-Review+2: Telles Mota Vidal Nóbrega <tenobreg@redhat.com> Workflow+1: Telles Mota Vidal Nóbrega <tenobreg@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 04 Dec 2018 11:05:36 +0000 Reviewed-on: https://review.openstack.org/621721 Project: openstack/sahara-image-elements Branch: refs/heads/stable/queens
-rwxr-xr-xelements/hadoop/install.d/40-setup-hadoop11
1 files changed, 11 insertions, 0 deletions
diff --git a/elements/hadoop/install.d/40-setup-hadoop b/elements/hadoop/install.d/40-setup-hadoop
index e74046b..da72c31 100755
--- a/elements/hadoop/install.d/40-setup-hadoop
+++ b/elements/hadoop/install.d/40-setup-hadoop
@@ -115,6 +115,17 @@ else
115 RC_SCRIPT_DIR="/etc/rc.d" 115 RC_SCRIPT_DIR="/etc/rc.d"
116fi 116fi
117 117
118# Make sure that rc-local.service starts after cloud-init.service,
119# so that the cloud-init user (centos, ubuntu, cloud-user, ...)
120# is available. See also:
121# https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1468103
122# All version of distributions affected by this change use systemd.
123mkdir -p /etc/systemd/system/rc-local.service.d/
124cat >/etc/systemd/system/rc-local.service.d/override.conf <<EOF
125[Unit]
126After=cloud-init.service
127EOF
128
118install -D -g root -o root -m 0755 $(dirname $0)/firstboot $RC_SCRIPT_DIR/rc.local 129install -D -g root -o root -m 0755 $(dirname $0)/firstboot $RC_SCRIPT_DIR/rc.local
119# make sure it is run, be it on SysV, upstart, or systemd 130# make sure it is run, be it on SysV, upstart, or systemd
120chmod +x $RC_SCRIPT_DIR/rc.local 131chmod +x $RC_SCRIPT_DIR/rc.local