@@ -149,7 +149,7 @@ write_files:
149149 content: |
150150{{ kernelSettings | indent 4 }}
151151
152- - path: /etc/sysconfig/ selinux
152+ - path: /etc/selinux/config
153153 content: |
154154 # This file controls the state of SELinux on the system.
155155 # SELINUX= can take one of these three values:
@@ -176,20 +176,22 @@ write_files:
176176 sysctl --system
177177
178178{{- /* Make sure we always disable swap - Otherwise the kubelet won't start */}}
179- cp /etc/fstab /etc/fstab.orig
180- cat /etc/fstab.orig | awk '$3 ~ /^swap$/ && $1 !~ /^#/ {$0="# commented out by cloudinit\n#"$0} 1' > /etc/fstab.noswap
181- mv /etc/fstab.noswap /etc/fstab
179+ sed -i.orig '/.*swap.*/d' /etc/fstab
182180 swapoff -a
183181 {{ if ne .CloudProviderName "aws" }}
184182{{- /* The normal way of setting it via cloud-init is broken, see */}}
185183{{- /* https://bugs.launchpad.net/cloud-init/+bug/1662542 */}}
186184 hostnamectl set-hostname {{ .MachineSpec.Name }}
187185 {{ end }}
188186
189- dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
187+ yum install -y yum-utils
188+ yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
189+ {{- /* Due to DNF modules we have to do this on docker-ce repo
190+ More info at: https://bugzilla.redhat.com/show_bug.cgi?id=1756473 */}}
191+ yum-config-manager --save --setopt=docker-ce-stable.module_hotfixes=true
190192
191- DOCKER_VERSION='18.09.1 -3.el7'
192- dnf install -y docker-ce-${DOCKER_VERSION} \
193+ DOCKER_VERSION='18.09.9 -3.el7'
194+ yum install -y docker-ce-${DOCKER_VERSION} \
193195 docker-ce-cli-${DOCKER_VERSION} \
194196 ebtables \
195197 ethtool \
@@ -199,13 +201,12 @@ write_files:
199201 socat \
200202 wget \
201203 curl \
202- python3-dnf -plugin-versionlock \
204+ yum -plugin-versionlock \
203205 {{- if eq .CloudProviderName "vsphere" }}
204206 open-vm-tools \
205207 {{- end }}
206208 ipvsadm
207- dnf versionlock add docker-ce docker-ce-cli
208- dnf clean all
209+ yum versionlock add docker-ce-*
209210
210211{{ safeDownloadBinariesScript .KubeletVersion | indent 4 }}
211212 # set kubelet nodeip environment variable
0 commit comments