From 9002c1951f9eb797c25501469de31c05a80c6785 Mon Sep 17 00:00:00 2001 From: "Sahdev P. Zala" Date: Sun, 13 Oct 2019 16:38:28 -0400 Subject: [PATCH] doc: add lease time The current lease time is short and as such can lead to a timeout error as explained in the related issue which can be confusing. Fixes #9726 --- Documentation/dev-guide/interacting_v3.md | 20 ++++++++++---------- etcdctl/README.md | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Documentation/dev-guide/interacting_v3.md b/Documentation/dev-guide/interacting_v3.md index ed14aab0c..8dc5a1f0c 100644 --- a/Documentation/dev-guide/interacting_v3.md +++ b/Documentation/dev-guide/interacting_v3.md @@ -408,9 +408,9 @@ Applications can grant leases for keys from an etcd cluster. When a key is attac Here is the command to grant a lease: ```bash -# grant a lease with 10 second TTL -$ etcdctl lease grant 10 -lease 32695410dcc0ca06 granted with TTL(10s) +# grant a lease with 60 second TTL +$ etcdctl lease grant 60 +lease 32695410dcc0ca06 granted with TTL(60s) # attach key foo to lease 32695410dcc0ca06 $ etcdctl put --lease=32695410dcc0ca06 foo bar @@ -424,8 +424,8 @@ Applications revoke leases by lease ID. Revoking a lease deletes all of its atta Suppose we finished the following sequence of operations: ```bash -$ etcdctl lease grant 10 -lease 32695410dcc0ca06 granted with TTL(10s) +$ etcdctl lease grant 60 +lease 32695410dcc0ca06 granted with TTL(60s) $ etcdctl put --lease=32695410dcc0ca06 foo bar OK ``` @@ -447,17 +447,17 @@ Applications can keep a lease alive by refreshing its TTL so it does not expire. Suppose we finished the following sequence of operations: ```bash -$ etcdctl lease grant 10 -lease 32695410dcc0ca06 granted with TTL(10s) +$ etcdctl lease grant 60 +lease 32695410dcc0ca06 granted with TTL(60s) ``` Here is the command to keep the same lease alive: ```bash $ etcdctl lease keep-alive 32695410dcc0ca06 -lease 32695410dcc0ca06 keepalived with TTL(10) -lease 32695410dcc0ca06 keepalived with TTL(10) -lease 32695410dcc0ca06 keepalived with TTL(10) +lease 32695410dcc0ca06 keepalived with TTL(60) +lease 32695410dcc0ca06 keepalived with TTL(60) +lease 32695410dcc0ca06 keepalived with TTL(60) ... ``` diff --git a/etcdctl/README.md b/etcdctl/README.md index 13f528498..5ec84dfd4 100644 --- a/etcdctl/README.md +++ b/etcdctl/README.md @@ -533,8 +533,8 @@ Prints a message with the granted lease ID. #### Example ```bash -./etcdctl lease grant 10 -# lease 32695410dcc0ca06 granted with TTL(10s) +./etcdctl lease grant 60 +# lease 32695410dcc0ca06 granted with TTL(60s) ``` ### LEASE REVOKE \ @@ -609,8 +609,8 @@ Prints a message with a list of active leases. #### Example ```bash -./etcdctl lease grant 10 -# lease 32695410dcc0ca06 granted with TTL(10s) +./etcdctl lease grant 60 +# lease 32695410dcc0ca06 granted with TTL(60s) ./etcdctl lease list 32695410dcc0ca06