rke: CentOS 7: Path /var/lib/kubelet is mounted on / but it is not a shared mount.

RKE version: rke version v0.0.8-dev

Docker version: (docker version,docker info preferred) Docker version 1.12.6, build 85d7426/1.12.6

Operating system and kernel: (cat /etc/os-release, uname -r preferred) CentOS Linux 7 (Core) uname -r: 3.10.0-693.11.1.el7.x86_64

Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO) kvm guest on my RHELv7 laptop. KVM VM network set to Virtual network 'default': NAT

cluster.yml file:

# If you intened to deploy Kubernetes in an air-gapped envrionment,
# please consult the documentation on how to configure custom RKE images.
nodes:
- address: 192.168.122.148
  role:
  - controlplane
  - worker
  - etcd
  user: bgehman 
  docker_socket: /var/run/docker.sock
services:
  etcd:
    image: quay.io/coreos/etcd:latest
    extra_args: {}
  kube-api:
    image: rancher/k8s:v1.8.3-rancher2
    extra_args: {}
    service_cluster_ip_range: 10.233.0.0/18
  kube-controller:
    image: rancher/k8s:v1.8.3-rancher2
    extra_args: {}
    cluster_cidr: 10.233.64.0/18
    service_cluster_ip_range: 10.233.0.0/18
  scheduler:
    image: rancher/k8s:v1.8.3-rancher2
    extra_args: {}
  kubelet:
    image: rancher/k8s:v1.8.3-rancher2
    extra_args: {}
    cluster_domain: cluster.local
    infra_container_image: gcr.io/google_containers/pause-amd64:3.0
    cluster_dns_server: 10.233.0.3
  kubeproxy:
    image: rancher/k8s:v1.8.3-rancher2
    extra_args: {}
network:
  plugin: flannel
  options: {}
auth:
  strategy: x509
  options: {}
system_images: {}
ssh_key_path: ~/.ssh/rke_rsa

Steps to Reproduce: Using a minimal CentOSv7 install on a KVM VM on my laptop, installed docker from CentOS repos. Hit the problem mentioned in https://github.com/rancher/rke/issues/93 – which I worked around by creating a non-root user account in the VM, and setting that account up so it is in the docker group. Verified that the non-root account works with docker. Attempting to bring up the “everything in one VM” environment with rke fails with:

...
...
INFO[0194] [worker] Successfully pulled [kubelet] image on host [192.168.122.148] 
FATA[0197] [workerPlane] Failed to bring up Worker Plane: Failed to start [kubelet] container on host [192.168.122.148]: Error response from daemon: linux mounts: Path /var/lib/kubelet is mounted on / but it is not a shared mount.

Results: Full run output:

$ ./rke_linux-amd64 up
INFO[0000] Building Kubernetes cluster                  
INFO[0000] [ssh] Setup tunnel for host [192.168.122.148] 
INFO[0000] [ssh] Setup tunnel for host [192.168.122.148] 
INFO[0000] [ssh] Setup tunnel for host [192.168.122.148] 
INFO[0000] [certificates] Generating kubernetes certificates 
INFO[0000] [certificates] Generating CA kubernetes certificates 
INFO[0001] [certificates] Generating Kubernetes API server certificates 
INFO[0001] [certificates] Generating Kube Controller certificates 
INFO[0001] [certificates] Generating Kube Scheduler certificates 
INFO[0002] [certificates] Generating Kube Proxy certificates 
INFO[0002] [certificates] Generating Node certificate   
INFO[0002] [certificates] Generating admin certificates and kubeconfig 
INFO[0002] [reconcile] Reconciling cluster state        
INFO[0002] [reconcile] This is newly generated cluster  
INFO[0002] [certificates] Deploying kubernetes certificates to Cluster nodes 
INFO[0020] Successfully Deployed local admin kubeconfig at [./.kube_config_cluster.yml] 
INFO[0020] [certificates] Successfully deployed kubernetes certificates to Cluster nodes 
INFO[0020] [etcd] Building up Etcd Plane..              
INFO[0020] [etcd] Pulling Image on host [192.168.122.148] 
INFO[0028] [etcd] Successfully pulled [etcd] image on host [192.168.122.148] 
INFO[0031] [etcd] Successfully started [etcd] container on host [192.168.122.148] 
INFO[0031] [etcd] Successfully started Etcd Plane..     
INFO[0031] [controlplane] Building up Controller Plane.. 
INFO[0031] [remove/nginx-proxy] Checking if container is running on host [192.168.122.148] 
INFO[0031] [remove/nginx-proxy] Container doesn't exist on host [192.168.122.148] 
INFO[0031] [controlplane] Pulling Image on host [192.168.122.148] 
INFO[0185] [controlplane] Successfully pulled [kube-api] image on host [192.168.122.148] 
INFO[0188] [controlplane] Successfully started [kube-api] container on host [192.168.122.148] 
INFO[0188] [controlplane] Pulling Image on host [192.168.122.148] 
INFO[0188] [controlplane] Successfully pulled [kube-controller] image on host [192.168.122.148] 
INFO[0191] [controlplane] Successfully started [kube-controller] container on host [192.168.122.148] 
INFO[0191] [controlplane] Pulling Image on host [192.168.122.148] 
INFO[0192] [controlplane] Successfully pulled [scheduler] image on host [192.168.122.148] 
INFO[0194] [controlplane] Successfully started [scheduler] container on host [192.168.122.148] 
INFO[0194] [controlplane] Successfully started Controller Plane.. 
INFO[0194] [worker] Building up Worker Plane..          
INFO[0194] [worker] Pulling Image on host [192.168.122.148] 
INFO[0194] [worker] Successfully pulled [kubelet] image on host [192.168.122.148] 
FATA[0197] [workerPlane] Failed to bring up Worker Plane: Failed to start [kubelet] container on host [192.168.122.148]: Error response from daemon: linux mounts: Path /var/lib/kubelet is mounted on / but it is not a shared mount. 

I’m currently searching for a work-around. BTW, rke seems quite nice, I’m a fan already. 👍

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 17 (4 by maintainers)

Most upvoted comments

+1 on Rancher 2.0.0-beta3, Docker 1.13.1

@bgehman @superseb yes i think it may be related to the Mountflags in docker service, i believe it should be Mountflags=0 in the service configuration, we still looking into it, thanks for reporting the issue