Professional Documents
Culture Documents
etcd-io / etcd
Branch: master etcd / etcdctl / Create new file Find file History
..
ctlv3 etcdctl: support query count only of specified prefix 20 days ago
main_test.go etcdctl: modify etcdctl v2 and v3 for code coverage 3 years ago
README.md
etcdctl
etcdctl is a command line client for etcd.
The v3 API is used by default on master branch. For the v2 API, make sure to set environment variable ETCDCTL_API=2 . See also
READMEv2.
https://github.com/etcd-io/etcd/tree/master/etcdctl 1/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
If using released versions earlier than v3.4, set ETCDCTL_API=3 to use v3 API.
Global flags (e.g., dial-timeout , --cacert , --cert , --key ) can be set with environment variables:
ETCDCTL_DIAL_TIMEOUT=3s
ETCDCTL_CACERT=/tmp/ca.pem
ETCDCTL_CERT=/tmp/cert.pem
ETCDCTL_KEY=/tmp/key.pem
Prefix flag strings with ETCDCTL_ , convert all letters to upper-case, and replace dash( - ) with underscore( _ ). Note that the
environment variables with the prefix ETCDCTL_ can only be used with the etcdctl global flags. Also, the environment variable
ETCDCTL_API is a special case variable for etcdctl internal use only.
Key-value commands
RPC: Put
Options
Output
https://github.com/etcd-io/etcd/tree/master/etcdctl 2/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
OK
Examples
Remarks
If <value> isn't given as command line argument, this command tries to read the value from standard input.
https://github.com/etcd-io/etcd/tree/master/etcdctl 3/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
When <value> begins with '-', <value> is interpreted as a flag. Insert '--' for workaround:
Providing <value> in a new line after using carriage return is not supported and etcdctl may hang in that case. For example,
following case is not supported:
A <value> can have multiple lines or spaces but it must be provided with a double-quote as demonstrated below:
RPC: Range
Options
https://github.com/etcd-io/etcd/tree/master/etcdctl 4/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
from-key -- Get keys that are greater than or equal to the given key using byte compare
Output
<key>\n<value>\n<next_key>\n<next_value>...
Examples
https://github.com/etcd-io/etcd/tree/master/etcdctl 5/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
# bar
Get keys with names greater than or equal to foo1 and less than foo3 :
https://github.com/etcd-io/etcd/tree/master/etcdctl 6/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Remarks
If any key or value contains non-printable characters or control characters, simple formatted output can be ambiguous due to
new lines. To resolve this issue, set --hex to hex encode all strings.
RPC: DeleteRange
Options
from-key -- delete keys that are greater than or equal to the given key using byte compare
Output
Prints the number of keys that were removed in decimal if DEL succeeded.
Examples
https://github.com/etcd-io/etcd/tree/master/etcdctl 7/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
TXN [options]
TXN reads multiple etcd requests from standard input and applies them as a single atomic transaction. A transaction consists of
list of conditions, a list of requests to apply if all the conditions are true, and a list of requests to apply if any condition is false.
https://github.com/etcd-io/etcd/tree/master/etcdctl 8/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
RPC: Txn
Options
Input Format
Output
SUCCESS if etcd processed the transaction success list, FAILURE if etcd processed the transaction failure list. Prints the output for
each command in the executed request list, each separated by a blank line.
Examples
https://github.com/etcd-io/etcd/tree/master/etcdctl 9/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
./etcdctl txn -i
# compares:
mod("key1") > "0"
# FAILURE
# OK
# OK
'
# FAILURE
# OK
# OK
https://github.com/etcd-io/etcd/tree/master/etcdctl 10/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Remarks
When using multi-line values within a TXN command, newlines must be represented as \n . Literal newlines will cause parsing
failures. This differs from other commands (such as PUT) where the shell will convert literal newlines for us. For example:
'
# FAILURE
# OK
# OK
RPC: Compact
Options
physical -- 'true' to wait for compaction to physically remove all old revisions
https://github.com/etcd-io/etcd/tree/master/etcdctl 11/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
Example
WATCH [options] [key or prefix] [range_end] [--] [exec-command arg1 arg2 ...]
Watch watches events stream on keys or prefixes, [key or prefix, range_end) if range_end is given. The watch command runs until
it encounters an error or is terminated by the user. If range_end is given, it must be lexicographically greater than key or "\x00".
RPC: Watch
Options
prev-kv -- get the previous key-value pair before the event happens.
rev -- the revision to start watching. Specifying a revision is useful for observing past events.
Input format
https://github.com/etcd-io/etcd/tree/master/etcdctl 12/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
<event>[\n<old_key>\n<old_value>]\n<key>\n<value>\n<event>\n<next_key>\n<next_value>\n...
Examples
Non-interactive
https://github.com/etcd-io/etcd/tree/master/etcdctl 13/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
# PUT
# foo
# bar
# ETCD_WATCH_REVISION=11
# ETCD_WATCH_KEY="foo"
# ETCD_WATCH_EVENT_TYPE="PUT"
# ETCD_WATCH_VALUE="bar"
Watch with environmental variables and execute echo watch event received :
export ETCDCTL_WATCH_KEY=foo
./etcdctl watch -- echo watch event received
# PUT
# foo
# bar
# watch event received
export ETCDCTL_WATCH_KEY=foo
export ETCDCTL_WATCH_RANGE_END=foox
./etcdctl watch -- echo watch event received
# PUT
# fob
# bar
# watch event received
Interactive
./etcdctl watch -i
watch foo
watch foo
https://github.com/etcd-io/etcd/tree/master/etcdctl 14/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
# PUT
# foo
# bar
# PUT
# foo
# bar
./etcdctl watch -i
watch foo -- echo watch event received
# PUT
# foo
# bar
# watch event received
Watch with environmental variables and execute echo watch event received :
export ETCDCTL_WATCH_KEY=foo
./etcdctl watch -i
watch -- echo watch event received
# PUT
# foo
# bar
# watch event received
export ETCDCTL_WATCH_KEY=foo
export ETCDCTL_WATCH_RANGE_END=foox
./etcdctl watch -i
watch -- echo watch event received
# PUT
# fob
https://github.com/etcd-io/etcd/tree/master/etcdctl 15/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
# bar
# watch event received
LEASE <subcommand>
LEASE provides commands for key lease management.
RPC: LeaseGrant
Output
Example
RPC: LeaseRevoke
Output
https://github.com/etcd-io/etcd/tree/master/etcdctl 16/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Example
RPC: LeaseTimeToLive
Options
Output
Example
https://github.com/etcd-io/etcd/tree/master/etcdctl 17/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
LEASE LIST
LEASE LIST lists all active leases.
RPC: LeaseLeases
Output
Example
https://github.com/etcd-io/etcd/tree/master/etcdctl 18/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
RPC: LeaseKeepAlive
Output
Prints a message for every keep alive sent or prints a message indicating the lease is gone.
Example
MEMBER <subcommand>
MEMBER provides commands for managing etcd cluster membership.
RPC: MemberAdd
Options
https://github.com/etcd-io/etcd/tree/master/etcdctl 19/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
peer-urls -- comma separated list of URLs to associate with the new member.
Output
Prints the member ID of the new member and the cluster ID.
Example
ETCD_NAME="newMember"
ETCD_INITIAL_CLUSTER="newMember=https://127.0.0.1:12345,default=http://10.0.0.30:2380"
ETCD_INITIAL_CLUSTER_STATE="existing"
RPC: MemberUpdate
Options
peer-urls -- comma separated list of URLs to associate with the updated member.
Output
Prints the member ID of the updated member and the cluster ID.
Example
https://github.com/etcd-io/etcd/tree/master/etcdctl 20/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
RPC: MemberRemove
Output
Prints the member ID of the removed member and the cluster ID.
Example
MEMBER LIST
MEMBER LIST prints the member details for all members associated with an etcd cluster.
RPC: MemberList
Output
Prints a humanized table of the member IDs, statuses, names, peer addresses, and client addresses.
Examples
https://github.com/etcd-io/etcd/tree/master/etcdctl 21/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
ENDPOINT <subcommand>
ENDPOINT provides commands for querying individual endpoints.
Options
cluster -- fetch and use all endpoints from the etcd cluster member list
ENDPOINT HEALTH
ENDPOINT HEALTH checks the health of the list of endpoints with respect to cluster. An endpoint is unhealthy when it cannot
participate in consensus with the rest of the cluster.
https://github.com/etcd-io/etcd/tree/master/etcdctl 22/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
If an endpoint can participate in consensus, prints a message indicating the endpoint is healthy. If an endpoint fails to participate
in consensus, prints a message indicating the endpoint is unhealthy.
Example
Check all endpoints for the cluster associated with the default endpoint:
ENDPOINT STATUS
ENDPOINT STATUS queries the status of each endpoint in the given endpoint list.
Output
Simple format
Prints a humanized table of each endpoint URL, ID, version, database size, leadership status, raft term, and raft status.
JSON format
Prints a line of JSON encoding each endpoint URL, ID, version, database size, leadership status, raft term, and raft status.
https://github.com/etcd-io/etcd/tree/master/etcdctl 23/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Examples
Get the status for all endpoints in the cluster associated with the default endpoint:
ENDPOINT HASHKV
ENDPOINT HASHKV fetches the hash of the key-value store of an endpoint.
Output
Simple format
https://github.com/etcd-io/etcd/tree/master/etcdctl 24/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
JSON format
Prints a line of JSON encoding each endpoint URL and KV history hash.
Examples
Get the status for all endpoints in the cluster associated with the default endpoint:
ALARM <subcommand>
https://github.com/etcd-io/etcd/tree/master/etcdctl 25/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
ALARM DISARM
alarm disarm Disarms all alarms
RPC: Alarm
Output
Examples
ALARM LIST
alarm list lists all alarms.
RPC: Alarm
Output
https://github.com/etcd-io/etcd/tree/master/etcdctl 26/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Examples
DEFRAG [options]
DEFRAG defragments the backend database file for a set of given endpoints while etcd is running, or directly defragments an
etcd data directory while etcd is not running. When an etcd member reclaims storage space from deleted and compacted keys,
the space is kept in a free list and the database file remains the same size. By defragmenting the database, the etcd member
releases this free space back to the file system.
Note that defragmentation to a live member blocks the system from reading and writing data while rebuilding its states.
Note that defragmentation request does not get replicated over cluster. That is, the request is only applied to the local node.
Specify all members in --endpoints flag or --cluster flag to automatically find all cluster members.
Options
Output
For each endpoints, prints a message indicating whether the endpoint was successfully defragmented.
Example
https://github.com/etcd-io/etcd/tree/master/etcdctl 27/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Run defragment operations for all endpoints in the cluster associated with the default endpoint:
Remarks
DEFRAG returns a zero exit code only if it succeeded defragmenting all given endpoints.
SNAPSHOT <subcommand>
SNAPSHOT provides commands to restore a snapshot of a running etcd server into a fresh cluster.
https://github.com/etcd-io/etcd/tree/master/etcdctl 28/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
Example
Options
The snapshot restore options closely resemble to those used in the etcd command for defining a cluster.
wal-dir -- Path to the WAL directory. Uses data directory if none given.
initial-cluster -- The initial cluster configuration for the restored etcd cluster.
name -- Human-readable name for the etcd cluster member being restored.
skip-hash-check -- Ignore snapshot integrity hash value (required if copied from data directory)
https://github.com/etcd-io/etcd/tree/master/etcdctl 29/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
Example
Save a snapshot, restore into a new 3 node cluster, and start the cluster:
# restore members
bin/etcdctl snapshot restore snapshot.db --initial-cluster-token etcd-cluster-1 --initial-advertise-peer-urls
http://127.0.0.1:12380 --name sshot1 --initial-cluster
'sshot1=http://127.0.0.1:12380,sshot2=http://127.0.0.1:22380,sshot3=http://127.0.0.1:32380'
bin/etcdctl snapshot restore snapshot.db --initial-cluster-token etcd-cluster-1 --initial-advertise-peer-urls
http://127.0.0.1:22380 --name sshot2 --initial-cluster
'sshot1=http://127.0.0.1:12380,sshot2=http://127.0.0.1:22380,sshot3=http://127.0.0.1:32380'
bin/etcdctl snapshot restore snapshot.db --initial-cluster-token etcd-cluster-1 --initial-advertise-peer-urls
http://127.0.0.1:32380 --name sshot3 --initial-cluster
'sshot1=http://127.0.0.1:12380,sshot2=http://127.0.0.1:22380,sshot3=http://127.0.0.1:32380'
# launch members
bin/etcd --name sshot1 --listen-client-urls http://127.0.0.1:2379 --advertise-client-urls http://127.0.0.1:2379 --
listen-peer-urls http://127.0.0.1:12380 &
bin/etcd --name sshot2 --listen-client-urls http://127.0.0.1:22379 --advertise-client-urls http://127.0.0.1:22379 --
listen-peer-urls http://127.0.0.1:22380 &
bin/etcd --name sshot3 --listen-client-urls http://127.0.0.1:32379 --advertise-client-urls http://127.0.0.1:32379 --
listen-peer-urls http://127.0.0.1:32380 &
Output
https://github.com/etcd-io/etcd/tree/master/etcdctl 30/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Simple format
Prints a humanized table of the database hash, revision, total keys, and size.
JSON format
Prints a line of JSON encoding the database hash, revision, total keys, and size.
Examples
MOVE-LEADER <hexadecimal-transferee-id>
MOVE-LEADER transfers leadership from the leader to another member in the cluster.
Example
https://github.com/etcd-io/etcd/tree/master/etcdctl 31/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
# to choose transferee
transferee_id=$(./etcdctl \
--endpoints localhost:2379,localhost:22379,localhost:32379 \
endpoint status | grep -m 1 "false" | awk -F', ' '{print $2}')
echo ${transferee_id}
# c89feb932daef420
Concurrency commands
Options
Output
Once the lock is acquired but no command is given, the result for the GET on the unique lock holder key is displayed.
If a command is given, it will be executed with environment variables ETCD_LOCK_KEY and ETCD_LOCK_REV set to the lock's holder
key and revision.
https://github.com/etcd-io/etcd/tree/master/etcdctl 32/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Example
Remarks
LOCK returns a zero exit code only if it is terminated by a signal and releases the lock.
If LOCK is abnormally terminated or fails to contact the cluster to release the lock, the lock will remain held until the lease expires.
Progress may be delayed by up to the default lease length of 60 seconds.
Options
https://github.com/etcd-io/etcd/tree/master/etcdctl 33/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
If a candidate, ELECT displays the GET on the leader key once the node is elected election.
If observing, ELECT streams the result for a GET on the leader key for the current election and all future elections.
Example
Remarks
ELECT returns a zero exit code only if it is terminated by a signal and can revoke its candidacy or leadership, if any.
If a candidate is abnormally terminated, election rogress may be delayed by up to the default lease length of 60 seconds.
Authentication commands
RPC: AuthEnable/AuthDisable
Output
https://github.com/etcd-io/etcd/tree/master/etcdctl 34/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Authentication Enabled .
Examples
ROLE <subcommand>
ROLE is used to specify different roles which can be assigned to etcd user(s).
RPC: RoleAdd
Output
https://github.com/etcd-io/etcd/tree/master/etcdctl 35/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Examples
RPC: RoleGet
Output
Examples
RPC: RoleDelete
https://github.com/etcd-io/etcd/tree/master/etcdctl 36/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
Examples
RPC: RoleList
Output
Examples
RPC: RoleGrantPermission
https://github.com/etcd-io/etcd/tree/master/etcdctl 37/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Options
from-key -- grant a permission of keys that are greater than or equal to the given key using byte compare
Output
Examples
Grant read and write permission on the key foo to role myrole :
Grant read permission on the wildcard key pattern foo/* to role myrole :
RPC: RoleRevokePermission
Options
from-key -- revoke a permission of keys that are greater than or equal to the given key using byte compare
https://github.com/etcd-io/etcd/tree/master/etcdctl 38/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
Permission of key <key> is revoked from role <role name> for single key. Permission of range [<key>, <endkey>) is revoked
from role <role name> for a key range. Exit code is zero.
Examples
USER <subcommand>
USER provides commands for managing users of etcd.
RPC: UserAdd
Options
Output
Examples
https://github.com/etcd-io/etcd/tree/master/etcdctl 39/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
RPC: UserGet
Options
Output
Examples
RPC: UserDelete
https://github.com/etcd-io/etcd/tree/master/etcdctl 40/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
Examples
USER LIST
user list lists detailed user information.
RPC: UserList
Output
Examples
RPC: UserChangePassword
https://github.com/etcd-io/etcd/tree/master/etcdctl 41/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Options
Output
Password updated .
Examples
RPC: UserGrantRole
Output
Examples
RPC: UserRevokeRole
Output
Examples
Utility commands
Options
dest-prefix -- The destination prefix to mirror a prefix to a different prefix in the destination cluster
Output
The approximate total number of keys transferred to the destination cluster, updated every 30 seconds.
Examples
MIGRATE [options]
Migrates keys in a v2 store to a v3 mvcc store. Users should run migration command for all members in the cluster.
Options
Output
No output on success.
Default transformer
If user does not provide a transformer program, migrate command will use the default transformer. The default transformer
transforms storev2 formatted keys into mvcc formatted keys according to the following Go program:
https://github.com/etcd-io/etcd/tree/master/etcdctl 44/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
User-provided transformer
Users can provide a customized 1:n transformer function that transforms a key from the v2 store to any number of keys in the
mvcc store. The migration program writes JSON formatted v2 store keys to the transformer program's stdin, reads protobuf
formatted mvcc keys back from the transformer program's stdout, and finishes migration by saving the transformed keys into the
mvcc store.
The provided transformer should read until EOF and flush the stdout before exiting to ensure data integrity.
Example
VERSION
Prints the version of etcdctl.
https://github.com/etcd-io/etcd/tree/master/etcdctl 45/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
Examples
./etcdctl version
# etcdctl version: 3.1.0-alpha.0+git
# API version: 3.1
CHECK <subcommand>
CHECK provides commands for checking properties of the etcd cluster.
RPC: CheckPerf
Options
load -- the performance check's workload model. Accepted workloads: s(small), m(medium), l(large), xl(xLarge)
auto-compact -- if true, compact storage with last revision after test is finished.
https://github.com/etcd-io/etcd/tree/master/etcdctl 46/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
Output
Prints the result of performance check on different criteria like throughput. Also prints an overall status of the check as pass or
fail.
Examples
Shows examples of both, pass and fail, status. The failure is due to the fact that a large workload was tried on a single node etcd
cluster running on a laptop environment created for development and testing purpose.
RPC: CheckDatascale
Options
https://github.com/etcd-io/etcd/tree/master/etcdctl 47/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
load -- the datascale check's workload model. Accepted workloads: s(small), m(medium), l(large), xl(xLarge)
auto-compact -- if true, compact storage with last revision after test is finished.
Output
Prints the system memory usage for a given workload. Also prints status of compact and defragment if related options are
passed.
Examples
Exit codes
For all commands, a successful execution return a zero exit code. All failures will return non-zero exit codes.
Output formats
https://github.com/etcd-io/etcd/tree/master/etcdctl 48/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
All commands accept an output format by setting -w or --write-out . All commands default to the "simple" output format,
which is meant to be human-readable. The simple format is listed in each command's Output description since it is customized
for each command. If a command has a corresponding RPC, it will respect all output formats.
If a command fails, returning a non-zero exit code, an error string will be written to standard error regardless of output format.
Simple
A format meant to be easy to parse and human-readable. Specific to each command.
JSON
The JSON encoding of the command's RPC response. Since etcd's RPCs use byte strings, the JSON output will encode keys and
values in base64.
Some commands without an RPC also support JSON; see the command's Output description.
Protobuf
The protobuf encoding of the command's RPC response. If an RPC is streaming, the stream messages will be concetenated. If an
RPC is not given for a command, the protobuf output is not defined.
Fields
An output format similar to JSON but meant to parse with coreutils. For an integer field named Field , it writes a line in the
format "Field" : %d where %d is go's integer formatting. For byte array fields, it writes "Field" : %q where %q is go's quoted
string formatting (e.g., []byte{'a', '\n'} is written as "a\n" ).
Compatibility Support
https://github.com/etcd-io/etcd/tree/master/etcdctl 49/50
21/04/2020 etcd/etcdctl at master · etcd-io/etcd · GitHub
etcdctl is still in its early stage. We try out best to ensure fully compatible releases, however we might break compatibility to fix
bugs or improve commands. If we intend to release a version of etcdctl with backward incompatibilities, we will provide notice
prior to release and have instructions on how to upgrade.
Input Compatibility
Input includes the command name, its flags, and its arguments. We ensure backward compatibility of the input of normal
commands in non-interactive mode.
Output Compatibility
Output includes output from etcdctl and its exit code. etcdctl provides simple output format by default. We ensure compatibility
for the simple output format of normal commands in non-interactive mode. Currently, we do not ensure backward compatibility
for JSON format and the format in non-interactive mode. Currently, we do not ensure backward compatibility of utility
commands.
https://github.com/etcd-io/etcd/tree/master/etcdctl 50/50