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 <eric.macdonald@windriver.com>
This commit is contained in:
Eric MacDonald 2019-09-30 14:34:38 -04:00
parent 295410ed3d
commit 79525f2edd
1 changed files with 1 additions and 0 deletions

View File

@ -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