Skip to content

Commit

Permalink
removal of lostfound if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ddymko committed Mar 26, 2020
1 parent 8ad43ba commit 774479d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/releases/v0.0.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ spec:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: vultr-csi-plugin
image: ddymko/vultr-csi:v0.7.1
image: vultr/vultr-csi:v0.0.1
args :
- "--endpoint=$(CSI_ENDPOINT)"
- "--token=$(VULTR_API_KEY)"
Expand Down Expand Up @@ -383,7 +383,7 @@ spec:
- name: registration-dir
mountPath: /registration/
- name: csi-vultr-plugin
image: ddymko/vultr-csi:v0.7.1
image: vultr/vultr-csi:v0.0.1
args :
- "--endpoint=$(CSI_ENDPOINT)"
- "--token=$(VULTR_API_KEY)"
Expand Down
8 changes: 8 additions & 0 deletions driver/mounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ func (m *mounter) Mount(source, target, fs string, opts ...string) error {
err, mountCommand, strings.Join(mountArguments, " "), string(out))
}

if _, err := os.Stat(target + "/lost+found"); err == nil {
os.Remove(target + "/lost+found")
} else if os.IsNotExist(err) {
m.log.WithFields(logrus.Fields{
"error": err,
}).Info("mount command - removal of lost+found error")
}

return nil
}

Expand Down

0 comments on commit 774479d

Please sign in to comment.