707 Commits

Author SHA1 Message Date
Bhargav Ravuri
2feec4fe68 comments: fix comments as per goword in go test files
Comments fixed as per goword in go test files that shell
function go_srcs_in_module lists as per changes on #14827

Helps in #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 23:05:42 +05:30
Sasha Melentyev
c3b6cbdb73 all: goimports -w .
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-17 19:07:04 +03:00
Sasha Melentyev
2c9c209eb6 all: Changing Printf and friends to Print if there is no formatting
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 22:11:23 +03:00
Benjamin Wang
74085136b3 etcdctl: connect to the same endpoint as the target to be maintained
The client may connect to a different endpint as the target to be
maintained. When auth is enabled, the target endpoint might haven't
finished applying the authentiation request, so it might reject the
corresponding maintenance request due to permission denied.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-03 04:55:27 +08:00
Benjamin Wang
7f10dccbaf Bump go 1.19: update all the dependencies and go.sum files
1. run ./scripts/fix.sh;
2. cd tools/mod; gofmt -w . & go mod tidy;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
Benjamin Wang
cd0b1d0c66 Bump go 1.19: upgrade go version to 1.19 in all go.mod files
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
Sahdev Zala
ad4a465383
Merge pull request #14492 from cmurphy/bump-golang-x-net
*: Update golang.org/x/net to latest
2022-09-19 22:11:43 -04:00
Colleen Murphy
7ea2a3d7cb *: Update golang.org/x/net to latest
Update golang.org/x/net to address CVE-2022-27664.

Signed-off-by: Colleen Murphy <colleen.murphy@suse.com>
2022-09-19 16:01:45 -07:00
demoManito
72cf0cc04a etcd: modify declaring empty slices
declare an empty slice to var s []int replace  s :=[]int{}, https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices

Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 14:41:14 +08:00
Thomas Jungblut
3fc16608f7 etcdctl: fix move-leader for multiple endpoints
Due to a duplicate call of clientConfigFromCmd, the move-leader command
would fail with "conflicting environment variable is shadowed by corresponding command-line flag".
Also in scenarios where no command-line flag was supplied.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-09-09 10:38:13 +02:00
Benjamin Wang
3196c2cb5f Cleanup the go.mod for etcdctl
etcdctl doesn't depend on the following packages at all,
1. go.etcd.io/etcd/client/v2
2. go.etcd.io/etcd/etcdutl/v3
3. go.etcd.io/etcd/raft/v3
4. go.etcd.io/etcd/server/v3

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-25 13:30:55 +08:00
Benjamin Wang
ff6b85da83
Merge pull request #14340 from xakdwch/main
etcdctl: add --max-txn-ops flag to make-mirror command
2022-08-17 05:36:16 +08:00
xakdwch
7cc3f5f97e etcdctl: add --max-txn-ops flag to make-mirror command
--max-txn-ops flag allows users to define the maximum number of operations permitted in
a transaction during syncing updates.if unlimited syncing may fail when number of txn ops
exceeds the maximum number of server side.

Signed-off-by: xakdwch <xakdwch5@gmail.com>
2022-08-15 13:38:32 +08:00
Benjamin Wang
5cae1a1c48 Print clusterID, memberID and leaseID in hexdecimal
ClusterID, memberID and leaseID are just identifies, so it doesn't
make sense to print them in decimal. Instead, we should always print
them in hexdecimal.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-16 07:21:13 +08:00
Benjamin Wang
231bee6fe2 fix a typo in etcdctl readme for the elect command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-05 16:03:45 +08:00
SimFG
66f15f8efb ectdctl: Handle the repeat error message when the unknown command error occurs
Avoid repeated printing of error messages.

Signed-off-by: SimFG <1142838399@qq.com>
2022-07-04 11:02:08 +08:00
Mikel Olasagasti Uranga
89637a4223 Tools/benchmark: migrate cheggaaa/pb.v1 to cheggaaa/pb/v3
etcdctl/ctlv3: migrate cheggaaa/pb.v1 to cheggaaa/pb/v3

This commit also changes the format of the progress bar, from using a
custom progress bar to the default provided by the library.

Old behaviour:

./benchmarkv1  put
 0 / 10000 B                                                   !   0.00%
 3987 / 10000 Boooooooooooooom                                 !  39.87%
 10000 / 10000 Boooooooooooooooooooooooooooooooooooooooooooo! 100.00% 1s

New behaviour:

./benchmark put
 6536 / 10000 [----------------------->________________] 65.36% 7053 p/s
10000 / 10000 [---------------------------------------] 100.00% 7581 p/s

Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
2022-06-20 15:47:23 +02:00
Benjamin Wang
43434afd48
Merge pull request #14111 from patrocinio/check_perf_doc
Doc: provide more clarify to the usage of check perf command
2022-06-18 05:07:26 +08:00
Eduardo Patrocinio
e1e3ed11e3 Doc: provide more clarify to the usage of check perf command
This PR describes the fact that different workloads in the `check perf` command
are different, and the results might vary.

Signed-off-by: Eduardo Patrocinio <epatro@gmail.com>
2022-06-17 13:13:58 -03:00
Piotr Tabor
88cd0fe695 Refresh minor dependencies.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 10:23:03 +02:00
Piotr Tabor
e7a84b69c8 Update zap to 1.21.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 10:05:25 +02:00
Piotr Tabor
17c1dcd614 Update grpc to 1.47 and go-cmp to 0.5.8.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 08:57:22 +02:00
Kun Zhang
657a197bfa add range flag for delete in etcdctl 2022-05-17 11:17:42 +08:00
ahrtr
beeb44d4ee hide the revision field when it isn't populated 2022-05-13 19:40:57 +08:00
Vimal Kumar
55f0c96fa0 tests: Migrate Txn tests to common functional test framework 2022-05-11 10:33:47 +05:30
Marek Siarkowicz
d6368a20cf etcdctl: Remove V2 API commands 2022-04-24 12:08:42 +02:00
ahrtr
0dae4b3b1e rollback the opentelemetry bumpping to recover the pipeline failures 2022-04-14 16:13:28 +08:00
Will Beason
eab1e0c5d5 go.mod: upgrade opentelemetry deps
Downstream users of etcd experience build issues when using dependencies
which require more recent (incompatible) versions of opentelemetry. This
commit upgrades the dependencies so that downstream users stop
experiencing these issues.
2022-04-13 07:14:10 -07:00
Marek Siarkowicz
1bb59adb1e *: update golang.org/x/crypto 2022-04-08 16:27:52 +02:00
Manuel Rüger
f0f77fc14e go.mod: Bump prometheus/client_golang to v1.12.1
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-04-06 19:03:24 +02:00
Marek Siarkowicz
63346bfead server: Use default logging configuration instead of zap production one
This fixes problem where logs json changes format of timestamp.
2022-04-01 10:23:42 +02:00
Kay Yan
afecd3139c fix the api dependency in pkg, and update cobra to 1.4.0
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2022-03-25 17:18:56 +08:00
ahrtr
49e9a14580 migrate unit test to cover the logic of converting ConfigSpec to Config 2022-03-24 07:24:22 +08:00
ahrtr
f978da4f4f move the newClientCfg into clientv3 package so as to be reused by both etcdctl and v3discovery 2022-03-24 06:18:25 +08:00
Sahdev Zala
3254125e6c
Merge pull request #13809 from kkkkun/cleanup-deprecated-commands
Removing deprecated commands in etcdctl & etcdutl
2022-03-23 11:21:01 -04:00
Kun Zhang
1649c9dfc2 Removing deprecated commands in etcdctl & etcdutl 2022-03-23 11:05:52 +08:00
ahrtr
3780435831 added unit test for newClientCfg 2022-03-22 19:07:40 +08:00
ahrtr
d0688e0158 update the example output of 'etcdctl endpoint status -w table' 2022-03-18 07:04:44 +08:00
ahrtr
edce939f6e add one more field storageVersion into StatusResponse
When performing the downgrade operation, users can confirm whether each member
is ready to be downgraded using the field 'storageVersion'. If it's equal to the
'target version' in the downgrade command, then it's ready to be downgraded;
otherwise, the etcd member is still in progress of processing the db file.
2022-03-18 07:04:44 +08:00
Sahdev Zala
fa4859f86a
Merge pull request #13793 from kkkkun/delete-defrag-offline-ctlv3
delete offline defrag in etcdctl
2022-03-15 12:23:54 -04:00
kkkkun
8c0e4fe559 delete offline defrag in etcdctl 2022-03-14 11:07:57 +08:00
ahrtr
1a3822f2c3 Rename ClientConfig to ConfigSpec
The ClientConfig is a fully declarive configuration, so it makes more
sense to rename it to ConfigSpec. It can also mitigate the confusion
between Config and ClientConfig.
2022-03-13 05:41:49 +08:00
ahrtr
3dcbbf62d9 Move clientconfig into clientv3 so that it can be reused by both etcdctl and v3 discovery 2022-03-12 06:38:41 +08:00
ahrtr
1ae5aa52de fix some typos related to downgrade 2022-03-09 16:07:18 +08:00
Marek Siarkowicz
fb55910500 version: bump up to 3.6.0-alpha.0 2022-02-28 13:20:27 +01:00
Marek Siarkowicz
6af760131e
Merge pull request #13687 from serathius/etcdctl
Add downgrade commands
2022-02-22 17:12:23 +01:00
Marek Siarkowicz
42faf9fe06 etcdctl: Use minor versions for downgrade 2022-02-22 16:30:08 +01:00
Marek Siarkowicz
c1c2f1233d etcdctl: Documment downgrade commands 2022-02-22 16:29:35 +01:00
ahrtr
5d3847577f always print the raft_term in decimal even flag --hex is provided 2022-02-22 09:00:24 +08:00
Marek Siarkowicz
16d7005137 etcdctl: Add dot at the end of sentences 2022-02-21 17:58:20 +01:00