Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

After flexprepvol failed to execute, torus keeps trying to attach the volume #399

Open
nak3 opened this issue Nov 19, 2016 · 0 comments
Open

Comments

@nak3
Copy link
Contributor

nak3 commented Nov 19, 2016

version

issue

  • After flexprepvol failed to execute, flex volume keeps trying to attach the volume.

step to reproduce (just an example step)

1. Create volume with wrong fsType.

kubectl create -f nginx.yaml
  • For example, fsType has wrong value foo.
apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
  - name: nginx
    image: nginx
    volumeMounts:
    - name: test
      mountPath: /data
    ports:
    - containerPort: 80
  volumes:
  - name: test
    flexVolume:
      driver: "coreos.com/torus"
      fsType: "foo"
      options:
        volume: "testvol"
        etcd: "10.254.0.2:2379"
2. Check log
  • Pod status is ContainerCreating.
# kubectl get pod
NAME          READY     STATUS              RESTARTS   AGE
nginx        0/1       ContainerCreating   0          2m
  • journal log output mkfs: failed to execute mkfs.foo: No such file or directory.
# journalctl --no-pager |grep foo
Nov 19 08:10:54 torus1 torus[9227]: mkfs: failed to execute mkfs.foo: No such file or directory

Actual result

  • Even though torus failed to execute flexprepvol, it keeps tring to attach the volume.
# kubectl get event -w
...
2016-11-19 08:10:54 +0000 UTC   2016-11-19 08:10:54 +0000 UTC   1         nginx    Pod                   Warning   FailedSync    {kubelet fed-node}     Error syncing pod, skipping: mount command failed, status: Failure, reason: failed
2016-11-19 08:11:08 +0000 UTC   2016-11-19 08:14:37 +0000 UTC   16        nginx    Pod                   Warning   FailedMount   {kubelet fed-node}     Unable to mount volumes for pod "nginx2_default(b0ea44f1-ae2f-11e6-9746-5254007c7544)": attach command failed, status: Failure, reason: Couldn't attach
2016-11-19 08:11:08 +0000 UTC   2016-11-19 08:14:37 +0000 UTC   16        nginx    Pod                   Warning   FailedSync    {kubelet fed-node}     Error syncing pod, skipping: attach command failed, status: Failure, reason: Couldn't attach

Expect result

  • torus doesn't try to attach volume, when it failed pre device format process.
@nak3 nak3 changed the title torusblk.flex doesn't say why it failed to attach volume After flexprepvol failed to execute, torus keeps trying to attach the volume Nov 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant