Skip to content

Commit

Permalink
add operation timeout flag
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsykim committed Apr 8, 2019
1 parent 98e454b commit 900ddec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/csi-snapshotter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ const (
var (
snapshotterName = flag.String("snapshotter", "", "This option is deprecated.")
kubeconfig = flag.String("kubeconfig", "", "Absolute path to the kubeconfig file. Required only when running out of cluster.")
connectionTimeout = flag.Duration("connection-timeout", 0, "The --connection-timeout flag is deprecated")
connectionTimeout = flag.Duration("connection-timeout", 0, "The --connection-timeout flag is deprecated, use --timeout to set a timeout for volume operations")
csiAddress = flag.String("csi-address", "/run/csi/socket", "Address of the CSI driver socket.")
createSnapshotContentRetryCount = flag.Int("create-snapshotcontent-retrycount", 5, "Number of retries when we create a snapshot content object for a snapshot.")
createSnapshotContentInterval = flag.Duration("create-snapshotcontent-interval", 10*time.Second, "Interval between retries when we create a snapshot content object for a snapshot.")
operationTimeout = flag.Duration("timeout", 10*time.Second, "Timeout for volume operations")
resyncPeriod = flag.Duration("resync-period", 60*time.Second, "Resync interval of the controller.")
snapshotNamePrefix = flag.String("snapshot-name-prefix", "snapshot", "Prefix to apply to the name of a created snapshot")
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.")
Expand Down Expand Up @@ -158,7 +159,6 @@ func main() {
if err = csirpc.ProbeForever(csiConn, csiTimeout); err != nil {
klog.Errorf("error waiting for CSI driver to be ready: %v", err)
os.Exit(1)

}

// Find out if the driver supports create/delete snapshot.
Expand Down

0 comments on commit 900ddec

Please sign in to comment.