From 79525f2edd56df142de22f6f2ed7fd9ff8577840 Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Mon, 30 Sep 2019 14:34:38 -0400 Subject: [PATCH] Add filesystem dependency to kubernetes worker init class There is a race condition that can lead to kubeadm join being called before the '/var/lib/kubelet' mount point is created. An early run of the join executes ok leaving expected config and otherwise content in the local /var/lib/kubelet directory. Then when the filesystem manifests creates the /var/lib/kubelet mountpoint the kubernetes config content created earlier gets hidden by the mount thereby causing a non-recoverable kubelet process failure due to missing config.yaml This update adds a filesystem class dependency in the kubernetes::worker:init class to ensure the /var/lib/kubelet mountpoint is created before the kubeadm join is run. Test Plan: PASS: Verify Normal System Install Change-Id: Ibc110589260c23f86beb5a6eaf1008b3d4f387b3 Closes-Bug: 1843344 Signed-off-by: Eric MacDonald --- puppet-manifests/src/modules/platform/manifests/kubernetes.pp | 1 + 1 file changed, 1 insertion(+) diff --git a/puppet-manifests/src/modules/platform/manifests/kubernetes.pp b/puppet-manifests/src/modules/platform/manifests/kubernetes.pp index 0328c7d1..26eb8815 100644 --- a/puppet-manifests/src/modules/platform/manifests/kubernetes.pp +++ b/puppet-manifests/src/modules/platform/manifests/kubernetes.pp @@ -374,6 +374,7 @@ class platform::kubernetes::worker::init inherits ::platform::kubernetes::worker::params { Class['::platform::docker::config'] -> Class[$name] + Class['::platform::filesystem::kubelet'] -> Class[$name] if str2bool($::is_initial_config) { include ::platform::params