• Kubernetes Submit Queue's avatar
    Merge pull request #36686 from rkouj/check-gluster-fs-binaries · 9be1191a
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Implement CanMount() for gfsMounter for linux
    
    **What this PR does / why we need it**:
    To implement CanMount() check for glusterfs. If mount binaries are not present on the underlying node, the mount will not proceed and return an error message stating so.
    
    Related to issue : https://github.com/kubernetes/kubernetes/issues/36098
    
    
    Related to similar change for NFS : 
    https://github.com/kubernetes/kubernetes/pull/36280
    
    **Release note**:
    `Check binaries for GlusterFS on the underlying node before doing mount`
    
    
    
    
    
    Sample output from testing in GCE/GCI:
    
    rkouj@rkouj0:~/go/src/k8s.io/kubernetes$ kubectl describe pods
    Name:		glusterfs
    Namespace:	default
    Node:		e2e-test-rkouj-minion-group-kjq3/10.240.0.3
    Start Time:	Fri, 11 Nov 2016 17:22:04 -0800
    Labels:		<none>
    Status:		Pending
    IP:		
    Controllers:	<none>
    Containers:
      glusterfs:
        Container ID:	
        Image:		gcr.io/google_containers/busybox
        Image ID:		
        Port:		
        QoS Tier:
          cpu:	Burstable
          memory:	BestEffort
        Requests:
          cpu:		100m
        State:		Waiting
          Reason:		ContainerCreating
        Ready:		False
        Restart Count:	0
        Environment Variables:
    Conditions:
      Type		Status
      Initialized 	True 
      Ready 	False 
      PodScheduled 	True 
    Volumes:
      glusterfs:
        Type:		Glusterfs (a Glusterfs mount on the host that shares a pod's lifetime)
        EndpointsName:	glusterfs-cluster
        Path:		kube_vol
        ReadOnly:		true
      default-token-2zcao:
        Type:	Secret (a volume populated by a Secret)
        SecretName:	default-token-2zcao
    Events:
      FirstSeen	LastSeen	Count	From						SubobjectPath	Type		Reason		Message
      ---------	--------	-----	----						-------------	--------	------		-------
      8s		8s		1	{default-scheduler }						Normal		Scheduled	Successfully assigned glusterfs to e2e-test-rkouj-minion-group-kjq3
      7s		4s		4	{kubelet e2e-test-rkouj-minion-group-kjq3}			Warning		FailedMount	Unable to mount volume kubernetes.io/glusterfs/6bb04587-a876-11e6-a712-42010af00002-glusterfs (spec.Name: glusterfs) on pod glusterfs (UID: 6bb04587-a876-11e6-a712-42010af00002). Verify that your node machine has the required components before attempting to mount this volume type. Required binary /sbin/mount.glusterfs is missing
    9be1191a
Name
Last commit
Last update
..
admission Loading commit data...
api Loading commit data...
apimachinery Loading commit data...
apis Loading commit data...
apiserver Loading commit data...
auth Loading commit data...
capabilities Loading commit data...
client Loading commit data...
cloudprovider Loading commit data...
controller Loading commit data...
conversion Loading commit data...
credentialprovider Loading commit data...
dns Loading commit data...
fieldpath Loading commit data...
fields Loading commit data...
generated Loading commit data...
genericapiserver Loading commit data...
healthz Loading commit data...
httplog Loading commit data...
hyperkube Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
labels Loading commit data...
master Loading commit data...
metrics Loading commit data...
probe Loading commit data...
proxy Loading commit data...
quota Loading commit data...
registry Loading commit data...
routes Loading commit data...
runtime Loading commit data...
security Loading commit data...
securitycontext Loading commit data...
selection Loading commit data...
serviceaccount Loading commit data...
ssh Loading commit data...
storage Loading commit data...
types Loading commit data...
util Loading commit data...
version Loading commit data...
volume Loading commit data...
watch Loading commit data...
OWNERS Loading commit data...