Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hostpath: Unable to mount volumes for pod: timeout expired waiting for volumes to attach or mount #78898

Open
mysunshine92 opened this issue Jun 11, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@mysunshine92
Copy link
Contributor

commented Jun 11, 2019

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

What happened:
i have create a static pod which has hostpath volume, but the pod is not able to mount to those volumes. The error message thrown by the k8s is:

Unable to mount volumes for pod "iag-194.167.0.1_kube-system(5055cd2bc4b19cdcf21a841cf6e0576b)": timeout expired waiting for volumes to attach or mount for pod "kube-system"/"iag-194.167.0.1". list of unmounted volumes=[nginxconf srvkube nginxkeepalivesh keepalivedconfig iagnginxlog iagkeepalivedlog]. list of unattached volumes=[nginxconf srvkube nginxkeepalivesh keepalivedconfig iagnginxlog iagkeepalivedlog]; skipping pod
What you expected to happen:
The disk to be mounted into the pod successfully

How to reproduce it (as minimally and precisely as possible):
This is my config file.
apiVersion: v1
kind: Pod
metadata:
name: iag
namespace: kube-system
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
spec:
hostNetwork: true
containers:

  • name: iag
    image: ikeepalived:v12
    env:
    • name: VIP
      value: "2019:0:3:200::ce"
    • name: DEBUG
      value: "false"
      resources:
      cpu: 500m
      memory: 500Mi
      ports:
    • containerPort: 8088
      securityContext:
      privileged: true
      volumeMounts:
    • mountPath: /home/zxin10/nginx/conf/nginx.conf
      name: nginxconf
      readOnly: false
    • mountPath: /home/zxin10/nginx/cert
      name: srvkube
      readOnly: true
    • mountPath: /home/zxin10/nginx/logs/
      name: iagnginxlog
      readOnly: false
    • mountPath: /var/log/
      name: iagkeepalivedlog
      readOnly: false
    • mountPath: /home/zxin10/nginx/shell/nginx_keepalive.sh
      name: nginxkeepalivesh
      readOnly: true
    • mountPath: /usr/local/keepalived/etc/keepalived/keepalived.conf
      name: keepalivedconfig
      readOnly: false
      volumes:
  • hostPath:
    path: /etc/kubernetes/loadbalancer/nginx/nginx.conf
    type: File
    name: nginxconf
    readOnly: false
  • hostPath:
    path: /etc/kubernetes/certs
    type: Directory
    name: srvkube
    readOnly: true
  • hostPath:
    path: /etc/kubernetes/loadbalancer/nginx/nginx_keepalive.sh
    type: File
    name: nginxkeepalivesh
    readOnly: true
  • hostPath:
    path: /etc/kubernetes/loadbalancer/keepalived/keepalived.conf
    type: File
    name: keepalivedconfig
    readOnly: false
  • hostPath:
    path: /paasdata/op-log/k8s/iag
    type: DirectoryOrCreate
    name: iagnginxlog
    readOnly: false
  • hostPath:
    path: /paasdata/op-log/k8s/iag
    type: DirectoryOrCreate
    name: iagkeepalivedlog
    readOnly: false

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
    kubectl 1.10.0
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:
@Pingan2017

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

/sig storage

@k8s-ci-robot k8s-ci-robot added sig/storage and removed needs-sig labels Jun 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.