2
0
mirror of https://github.com/etcd-io/etcd.git synced 2024-09-27 06:25:44 +00:00

47 Commits

Author SHA1 Message Date
Jonathan Boulle
3f358b6d5d etcdserver: ensure initial-advertise-peer-urls match initial-cluster
This adds a check to setupCluster to ensure that the list of URLs
specified in `initial-advertise-peer-urls` matches those configured in
`initial-cluster` for this node. Also updates the documentation to
clarify this and address some changes in wording.
2014-11-12 12:54:35 -08:00
Xiang Li
5967794009 *: support updating advertise-peer-url
Users might want to update the peerurl of the etcd member in several cases.
For example, if the IP address of the physical machine etcd running on is
changed, user need to update the adversite-pee-rurl accordingly.
This commit makes etcd support updating the advertise-peer-url of its members.
2014-11-11 12:07:03 -08:00
Yicheng Qin
014ef0f52d etcdserver: fix data race in cluster
The data race happens when etcd updates member attributes and fetches
member info in http handler at the same time.
2014-11-07 16:13:07 -08:00
Jonathan Boulle
5055863e09 etcdserver: add docstrings for confchanges 2014-11-07 10:19:55 -08:00
Yicheng Qin
211c5e3e29 etcdserver: fix data race in Cluster struct 2014-11-06 14:04:14 -08:00
Yicheng Qin
1e05cd75c7 etcdserver: refactor sender
1. restrict the number of inflight connections to remote member
2. support stop
2014-11-06 14:04:14 -08:00
Xiang Li
bd2b18b6de etcdserver: validate peerurl when adding members 2014-11-05 23:12:48 -08:00
Xiang Li
6fdbb086f4 Merge pull request from xiangli-cmu/valid_configuration
Valid configuration
2014-11-05 18:13:04 -08:00
Xiang Li
99b1af40c6 etcdserver: move config validation to cluster 2014-11-05 17:55:07 -08:00
Xiang Li
98406af448 cluster: separate out membersFromStore from newClusterFromStore 2014-11-05 15:56:43 -08:00
Yicheng Qin
6c9169b4f4 etcdserver: improve panic message in Cluster 2014-11-05 15:39:28 -08:00
Yicheng Qin
791b2fd503 *: handle panic and fatal more consistently
1. etcd fatals if there is critical error in the system and operator should
do something for it
2. etcd panics if there happens something unexpected, and it should be
reported to us to debug.
2014-11-05 13:53:24 -08:00
Yicheng Qin
e02ef6b141 Merge pull request from unihorn/198
etcdserver: better logging for assign ids from upstream
2014-10-31 11:13:43 -07:00
Yicheng Qin
2c5f062b7f etcdserver: better logging for assign ids from upstream 2014-10-31 11:06:31 -07:00
Jonathan Boulle
55c92ad456 *: create ID type
This creates a simple ID type (wrapped around uint64) to provide for
standard serialization/deserialization to a string (i.e. base 16
encoded). This replaces strutil so now that package is removed.
2014-10-31 10:34:07 -07:00
Xiang Li
3dfb6723b2 *: rename initial-cluster-name to initial-cluster-token 2014-10-30 13:43:38 -07:00
Brian Waldon
80172c3d4a etcdserver: s/parseMemberID/mustParseMemberIDFromKey/ 2014-10-27 17:25:00 -07:00
Yicheng Qin
08593bcdf6 etcdserver: support newly-join member bootstrap 2014-10-24 12:38:44 -07:00
Jonathan Boulle
d7301a5cf4 main: fix proxy initialization and setupCluster 2014-10-23 16:09:29 -07:00
Jonathan Boulle
af42f4a56b etcdserver: sort Members() in Cluster 2014-10-23 15:57:27 -07:00
Yicheng Qin
4d80f01201 etcdserver: Cluster.IsIDremoved -> Cluster.IsIDRemoved 2014-10-23 14:29:58 -07:00
Yicheng Qin
d47de988e4 etcdserver: panic when >1 members have the given name in MemberByName 2014-10-23 14:24:07 -07:00
Yicheng Qin
8eee8c260e etcdserver: rebase on master and code clean 2014-10-23 13:58:55 -07:00
Yicheng Qin
e21de51768 etcdserver: remove NewClusterFromMemberInfos 2014-10-23 13:27:55 -07:00
Yicheng Qin
f8b8bdeb17 etcdserver: use path.Join for member key in cluster 2014-10-23 13:27:54 -07:00
Yicheng Qin
3d243baacd etcdserver: generate id when new cluster 2014-10-23 13:27:54 -07:00
Yicheng Qin
67412e07f8 etcdserver: MemberFromName -> MemberByName 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
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
829cec8ccf Merge stylistic comments 2014-10-22 14:26:05 -04:00
Barak Michener
c5d1fcd70a fix wrong name 2014-10-22 13:58:43 -04:00
Barak Michener
502a3c2460 Refactor Cluster to hold and add members. 2014-10-22 13:52:42 -04:00
Barak Michener
1347e3952f docs and cluster ID change based on name 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
Xiang Li
a44849deec Merge pull request from coreos/clusterid
*: generate clusterid
2014-10-20 19:07:03 -07:00
Xiang Li
ea6bcacfe4 *: generate clusterid 2014-10-20 15:00:54 -07:00
Jonathan Boulle
7a4d42166b *: add license header to all source files 2014-10-17 15:41:22 -07:00
Xiang Li
8bbbaa88b2 *: raft related int64 -> uint64 2014-10-09 14:29:21 +08:00
Yicheng Qin
45ebfb4217 raft: refine initial entries logic in StartNode 2014-10-06 16:06:01 -07: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
04bd48fef3 etcdserver: stop worrying about scheme
Stop worrying about the scheme. This puts a TODO on adding validation to
the schemes if TLS is specified. But we can worry about that later.
2014-09-30 17:05:20 -07:00
Brandon Philips
c2f96631d3 etcdserver: stop using addScheme
This standardizes the flags to use a list of URLs everywhere. The next
step is to enforce the scheme based on TLS settings and support compat
flags.
2014-09-30 16:40:32 -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
Yicheng Qin
5784693a39 etcdserver: Cluster.Endpoints() -> Cluster.PeerURLs() 2014-09-28 14:39:47 -07:00
Yicheng Qin
15798a73d9 etcdserver: return client urls for /v2/machines 2014-09-26 16:50:15 -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