Skip to content

Commit 900ddec

Browse files
committed
add operation timeout flag
1 parent 98e454b commit 900ddec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/csi-snapshotter/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ const (
5858
var (
5959
snapshotterName = flag.String("snapshotter", "", "This option is deprecated.")
6060
kubeconfig = flag.String("kubeconfig", "", "Absolute path to the kubeconfig file. Required only when running out of cluster.")
61-
connectionTimeout = flag.Duration("connection-timeout", 0, "The --connection-timeout flag is deprecated")
61+
connectionTimeout = flag.Duration("connection-timeout", 0, "The --connection-timeout flag is deprecated, use --timeout to set a timeout for volume operations")
6262
csiAddress = flag.String("csi-address", "/run/csi/socket", "Address of the CSI driver socket.")
6363
createSnapshotContentRetryCount = flag.Int("create-snapshotcontent-retrycount", 5, "Number of retries when we create a snapshot content object for a snapshot.")
6464
createSnapshotContentInterval = flag.Duration("create-snapshotcontent-interval", 10*time.Second, "Interval between retries when we create a snapshot content object for a snapshot.")
65+
operationTimeout = flag.Duration("timeout", 10*time.Second, "Timeout for volume operations")
6566
resyncPeriod = flag.Duration("resync-period", 60*time.Second, "Resync interval of the controller.")
6667
snapshotNamePrefix = flag.String("snapshot-name-prefix", "snapshot", "Prefix to apply to the name of a created snapshot")
6768
snapshotNameUUIDLength = flag.Int("snapshot-name-uuid-length", -1, "Length in characters for the generated uuid of a created snapshot. Defaults behavior is to NOT truncate.")
@@ -158,7 +159,6 @@ func main() {
158159
if err = csirpc.ProbeForever(csiConn, csiTimeout); err != nil {
159160
klog.Errorf("error waiting for CSI driver to be ready: %v", err)
160161
os.Exit(1)
161-
162162
}
163163

164164
// Find out if the driver supports create/delete snapshot.

0 commit comments

Comments
 (0)