kubeadm: reset don't unmount /var/lib/kubelet if it is mounted
Previous PR that fixes this https://github.com/kubernetes/kubernetes/pull/71663 Signed-off-by: Thomas Tanaka <thomas.tanaka@gmail.com>
This commit is contained in:
		@@ -32,6 +32,12 @@ func unmountKubeletDirectory(absoluteKubeletRunDirectory string) error {
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if !strings.HasSuffix(absoluteKubeletRunDirectory, "/") {
 | 
			
		||||
		// trailing "/" is needed to ensure that possibly mounted /var/lib/kubelet is skipped
 | 
			
		||||
		absoluteKubeletRunDirectory += "/"
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	mounts := strings.Split(string(raw), "\n")
 | 
			
		||||
	for _, mount := range mounts {
 | 
			
		||||
		m := strings.Split(mount, " ")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user