44cda79105
etcdctl/ctlv3: fix watch with exec commands
...
Following command was failing because the parser incorrectly
picks up the second "watch" string in exec command, thus
passing wrong exec commands.
```
ETCDCTL_API=3 ./bin/etcdctl watch aaa -- echo watch event received
panic: runtime error: slice bounds out of range
goroutine 1 [running]:
github.com/coreos/etcd/etcdctl/ctlv3/command.parseWatchArgs(0xc42002e080, 0x8, 0x8, 0xc420206a20, 0x5, 0x6, 0x0, 0x0, 0x0, 0x0, ...)
/home/gyuho/go/src/github.com/coreos/etcd/etcdctl/ctlv3/command/watch_command.go:303 +0xbed
github.com/coreos/etcd/etcdctl/ctlv3/command.watchCommandFunc(0xc4202a7180, 0xc420206a20, 0x5, 0x6)
/home/gyuho/go/src/github.com/coreos/etcd/etcdctl/ctlv3/command/watch_command.go:73 +0x11d
github.com/coreos/etcd/vendor/github.com/spf13/cobra.(*Command).execute(0xc4202a7180, 0xc420206960, 0x6, 0x6, 0xc4202a7180, 0xc420206960)
/home/gyuho/go/src/github.com/coreos/etcd/vendor/github.com/spf13/cobra/command.go:766 +0x2c1
github.com/coreos/etcd/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1363de0, 0xc420128638, 0xc420185e01, 0xc420185ee8)
/home/gyuho/go/src/github.com/coreos/etcd/vendor/github.com/spf13/cobra/command.go:852 +0x30a
github.com/coreos/etcd/vendor/github.com/spf13/cobra.(*Command).Execute(0x1363de0, 0x0, 0x0)
/home/gyuho/go/src/github.com/coreos/etcd/vendor/github.com/spf13/cobra/command.go:800 +0x2b
github.com/coreos/etcd/etcdctl/ctlv3.Start()
/home/gyuho/go/src/github.com/coreos/etcd/etcdctl/ctlv3/ctl_nocov.go:25 +0x8e
main.main()
/home/gyuho/go/src/github.com/coreos/etcd/etcdctl/main.go:40 +0x17b
```
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-05-03 17:22:34 -07:00
200401248a
Merge pull request #9665 from gyuho/unconvert
...
test: integrate github.com/mdempsky/unconvert
2018-05-01 09:52:44 -07:00
b44e43278a
etcdctl/ctlv3: fix "unconvert" warnings
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-04-30 15:32:16 -07:00
86cee93d6b
etcdctl/ctlv3: remove "strings.Compare == 0"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-04-30 15:11:11 -07:00
55001977ed
etcdctl/ctlv3/command: don't print gRPC WARNING logs by default
...
Despite holding important information, these are too noisy.
See https://github.com/coreos/etcd/pull/9623
2018-04-25 15:26:54 -07:00
9ce295a812
etcdctl/ctlv3/command: enable gRPC WARNING logs by default
2018-04-24 16:19:02 -07:00
ae9ccd883d
etcdctl/ctlv3: fix snapshot command e2e tests
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-04-16 17:36:00 -07:00
6dbce6b9a4
clientv3,etcdctl: support structured logger
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-04-16 17:36:00 -07:00
90e5af76f3
etcdctl/ctlv3: use new snapshot package
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-04-12 10:49:48 -07:00
ff455e3567
Merge pull request #9540 from gyuho/hhh
...
ctlv3: support "write-out" for "endpoint health" command
2018-04-06 13:25:11 -07:00
d019d3141a
ctlv3: support "write-out" for "endpoint health" command
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-04-06 11:31:00 -07:00
18b1d1ff65
ctlv3: update logger for snapshot command
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-04-06 11:05:58 -07:00
021df6a827
etcdctl/ctlv3: set client-side logger
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-04-02 13:51:22 -07:00
aece63b10e
etcdctl: use "TrustedCAFile"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-03-20 15:31:32 -07:00
4e0c00244d
*: remove "pkg/logger", replace with "pkg/logutil"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-03-07 10:49:25 -08:00
912c402188
etcdctl/ctlv3: add "--cluster" flag to "defrag" command
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-03-05 10:46:37 -08:00
69f7e11506
*: move "error" to "etcdserver/v2error"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -08:00
8a518b01c4
*: revert "internal/mvcc" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -08:00
9b5d6edc4b
*: revert "internal/raftsnap"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -08:00
0e12e888e0
*: move "internal/store" to "etcdserver/v2store"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -08:00
0850ccbf45
*: revert "internal/version" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -08:00
bab0223f04
ctlv3: fix typo in check command
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 10:03:43 -08:00
fc30b9844a
etcdctl/check: enable auto compact and defrag for check datascale
...
Running check datascale can create large history of keyspaces and
internal fragmentation. Allow user to run auto compact and defrag
when run check datascale.
2018-02-23 18:12:54 -05:00
53d2a2edfe
etcdctl/check: create new check command for memory usage
...
Create a new command similar to check perf that can check the memory
consumption for putting different workloads on a given endpoint. If no endpoint
is provided, localhost will be used. Return user with a message that whether
there are enough memory for a given workload with pass or fail.
Fixed #9121
2018-02-17 12:01:31 -05:00
d1e85570e9
ctlv3/command: auto compact and defrag after "check perf"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-15 14:28:02 -08:00
a2ce52d8c2
etcdctl/ctlv3: use "logger.NewPackageLogger"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-05 13:50:54 -08:00
37546f74ab
*: move "version" to "internal/version"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-29 10:00:20 -08:00
80d15948bc
*: move "mvcc" to "internal/mvcc"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-26 11:14:41 -08:00
880835c02c
*: move "store" to "internal/store"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-26 11:06:22 -08:00
3fdaf4eaa7
Merge pull request #9206 from dvonthenen/feature/issue9163
...
Exposes alarm/health information in "etcdctl endpoint status"
2018-01-25 07:18:22 -08:00
fd20ba75dc
etcdctl: Fix govet errors
2018-01-25 04:50:09 -05:00
db822ed38f
*: add alarm/health information in endpoint status
...
Update to remove raftIndex and document the Alarms() interface
Fix formatting
Fix typo
2018-01-24 13:12:48 -08:00
dee39bf786
internal/raftsnap: move "raftsnap" to internal
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-24 10:36:04 -08:00
2b6fd3094f
*: rename "snap" to "raftsnap" package
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-24 10:26:07 -08:00
df689f4280
etcdctl/ctlv3: use "snapshot" package for "snapshot" command
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-22 16:46:15 -08:00
c3ba417737
etcdctl/ctlv3: replace "dbStatus" with "snapshot.Status"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-22 16:46:15 -08:00
25cdf4ed92
*: expose Raft Applied Index through to "etcdctl endpoint status"
...
Fixed based on feedback
Fixed spacing
Fix gofmt
2018-01-22 07:37:21 -08:00
5e0118d7ef
ctlv3: set ETCD_WATCH_* on watch exec
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-17 09:54:16 -08:00
2c347d7158
ctlv3: exit on exec watch error
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-16 09:04:46 -08:00
72a2a6671e
ctlv3: set ETCD_WATCH_KEY, ETCD_WATCH_VALUE on exec watch
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-16 09:03:10 -08:00
388b7fece6
ctlv3: handle pkg/flags warnings
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-14 11:15:45 -08:00
8183b83220
ctlv3: support ETCDCTL_WATCH_KEY, ETCDCTL_WATCH_RANGE_END
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-14 02:30:03 -08:00
b337674971
etcdctl: don't ask password twice for etcdctl endpoint health --cluster
...
Current etcdctl endpoint health --cluster asks password twice if auth
is enabled. This is because the command creates two client instances:
one for the purpose of checking endpoint health and another for
getting cluster members with MemberList(). The latter client doesn't
need to be authenticated because MemberList() is a public RPC. This
commit makes the client with no authed one.
Fix https://github.com/coreos/etcd/issues/9094
2018-01-12 15:39:42 +09:00
285a83d70a
ctlv3: add "snapshot restore --wal-dir"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-09 09:25:26 -08:00
22127895d8
Merge pull request #8919 from gyuho/exec-watch
...
etcdctl: support exec watch in v3
2017-12-20 10:53:30 -08:00
9978b4fd35
etcdctl/ctlv3: clarify "lease timetolive" output on expired lease
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2017-12-20 00:40:57 -08:00
904513fa5c
etcdctl/ctlv3: support "exec-watch" in watch command
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com >
2017-12-19 19:45:24 -08:00
deb514989c
etcdctl/ctlv3: disable grpc client logs when --debug is off
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com >
2017-11-11 20:52:33 -08:00
75110dd839
*: fix naked returns
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com >
2017-11-10 18:46:15 -08:00
0ce02abf59
etcdctl: fix snapshot status accidentally modified the db file
2017-11-09 01:07:48 +08:00