24 Commits

Author SHA1 Message Date
Jonathan Boulle
d7f9228133 Merge pull request #1381 from jonboulle/members
/v2/admin/members API should use JSON containers in response
2014-10-24 13:20:10 -07:00
Yicheng Qin
08593bcdf6 etcdserver: support newly-join member bootstrap 2014-10-24 12:38:44 -07:00
Jonathan Boulle
543e12074a etcdserver/member: change JSON fields to lowerCamelCase 2014-10-24 12:03:17 -07:00
Yicheng Qin
d2c4e981ed etcdserver: Member.Pick -> Member.PickPeerURL 2014-10-23 13:27:54 -07:00
Yicheng Qin
89572b5fd7 etcdserver: refactor cluster and clusterStore
Integrate clusterStore into cluster, and let cluster become the source of
cluster info.
2014-10-23 13:27:54 -07:00
Xiang Li
63fa2a626a etcdserver: admin PUT returns the json representation of the newly created member 2014-10-22 17:19:28 -07:00
Xiang Li
d00152765a etcdserver: etcdserver generates the ID when adding new member.
When adding new member, the etcdserver generates the ID based on the current time
and the given peerurls. We include time to add the uniqueness, since the node with
same peerurls should be able to (add, then remove) several times.
2014-10-22 13:15:56 -07:00
Barak Michener
13656eb4e7 Merge pull request #1340 from barakmich/better_ids2
etcdserver: Calculate IDs based on PeerURLs and --initial-cluster-name
2014-10-22 14:49:49 -04:00
Yicheng Qin
89b032cd69 etcdserver: Member.storeKey -> memberStoreKey 2014-10-22 11:09:36 -07:00
Yicheng Qin
7498234e40 etcdserver: record removed member to check incoming message 2014-10-22 11:09:35 -07:00
Barak Michener
cb5a638c44 style comments 2014-10-22 13:52:42 -04:00
Barak Michener
502a3c2460 Refactor Cluster to hold and add members. 2014-10-22 13:52:42 -04:00
Barak Michener
ad0b7b7dbb Add cluster name to etcd flags 2014-10-22 13:52:42 -04:00
Barak Michener
456d1ebcae etcdserver: Calculate IDs for nodes solely on PeerURLs
Removes the notion of name being anything more than advisory or
command-line grouping, and adds checks for bootstrapping the command
line. IDs are consistent if the URLs are consistent.
2014-10-22 13:49:54 -04:00
Yicheng Qin
e2b6a4fc4c etcdserver: const XXXDir -> StoreXXXPrefix
and code clean
2014-10-21 16:10:49 -07:00
Yicheng Qin
2ff3cac653 etcdserver/etcdhttp: store location adjustment
Detailed adjustment:
/_etcd/machines/* -> /0/members/*
/* -> /1/*

And it keeps key path returned to user the same as before.
2014-10-21 16:10:19 -07:00
Jonathan Boulle
7a4d42166b *: add license header to all source files 2014-10-17 15:41:22 -07:00
Jonathan Boulle
c28907ba95 etcdserver: fix race and improve stats interfaces 2014-10-16 23:05:48 -07:00
Xiang Li
1177b07535 etcdserver: change machines endpoint to members 2014-10-14 11:02:17 +08:00
Yicheng Qin
77271b0663 etcdserver: split Member into RaftAttributes and Attributes
The split helps to save them in different key paths, because they have
distinct life cycle on update.
2014-10-09 20:28:00 -07:00
Xiang Li
8bbbaa88b2 *: raft related int64 -> uint64 2014-10-09 14:29:21 +08:00
Brandon Philips
83137f9eba pkg/types: introduce a URLs type
Cleanup the usage of URLs into its own type so we don't have to use a
FlagValue everywhere we have a list of URLs.
2014-10-01 14:41:01 -07:00
Brandon Philips
aa5b6cdc9e etcdserver: have newMember take an optional time field
This will be used by members joining an existing cluster or joining
using discovery.
2014-09-30 14:57:04 -07:00
Brandon Philips
5e3fd6ee3f etcdserver: introduce the cluster and member
This introduces two new concepts: the cluster and the member.

Members are logical etcd instances that have a name, raft ID, and a list
of peer and client addresses.

A cluster is made up of a list of members.
2014-09-25 18:04:10 -07:00