Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

[[--wip--]] scripts: preload DSS modules for LVM #239

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions dcos_launch/scripts/install_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ if [[ ${kernel_major_version} -lt 3 ]] ||
fi

echo "Validating kernel modules..."
if ! lsmod | grep -q overlay; then
echo "Enabling OverlayFS kernel module..."
kernelmods=(overlay dm_raid raid1)
for k in "${kernelmods[@]}"
if ! lsmod | grep -q $k; then
echo "Enabling '$k' kernel module..."
# Enable now
sudo modprobe overlay
sudo modprobe $k
# Load on reboot via systemd
sudo tee /etc/modules-load.d/overlay.conf <<-'EOF'
overlay
EOF
echo "$k" | sudo tee --append /etc/modules-load.d/dcos-launch.conf
fi

echo "Detecting Docker..."
Expand Down Expand Up @@ -176,4 +176,17 @@ if ! sudo getent group nogroup >/dev/null; then
sudo groupadd nogroup
fi

# hacky workaround for missing journald logs
# via https://bugs.centos.org/view.php?id=11014
mkdir -p /etc/systemd/system/systemd-journald.service.d
sudo tee /etc/systemd/system/systemd-journald.service.d/journal_after_varlog.conf < <(
cat <<EOF
[Unit]
Wants=local-fs.target
After=local-fs.target
EOF
)
sudo systemctl daemon-reload
sudo systemctl restart systemd-journald

echo "Prerequisites installed."