Commit Graph

35 Commits (8b4eed29e5b0f808ea792e169ff5632bd95b962b)

Author SHA1 Message Date
Jonathan Boulle f1ed69e883 *: switch to line comments for copyright
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Xiang Li 6dc3af5da4 etcdserver: cluster clean up 2014-12-25 20:36:48 -08:00
Xiang Li 7a5bf53222 etcdserver: move member sort interface to member.go 2014-12-25 20:18:55 -08:00
Barak Michener 192f200d9e Fix up migration tool, add snapshot migration
Fixes all updates since bcwaldon sketched the original, with cleanup and
into an acutal working state. The commit log follows:

fix pb reference and remove unused file post rebase

unbreak the migrate folder

correctly detect node IDs

fix snapshotting

Fix previous broken snapshot

Add raft log entries to the translation; fix test for all timezones. (Still in progress, but passing)

Fix etcd:join and etcd:remove

print more data when dumping the log

Cleanup based on yichengq's comments

more comments

Fix the commited index based on the snapshot, if one exists

detect nodeIDs from snapshot

add initial tool documentation and match the semantics in the build script and main

formalize migration doc

rename function and clarify docs

fix nil pointer

fix the record conversion test

add migration to test suite and fix govet
2014-11-14 16:46:08 -05:00
Brian Waldon 5ea1f2d96f etcd4: migration from v0.4 -> v0.5 2014-11-14 15:57:26 -05: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
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
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
Brian Waldon 480e92d340 strutil: move IDAsHex/IDFromHex to new pkg 2014-10-27 18:39:09 -07:00
Brian Waldon 2472953939 etcdhttp: hex-encode member ID 2014-10-27 17:25:22 -07:00
Brian Waldon 80172c3d4a etcdserver: s/parseMemberID/mustParseMemberIDFromKey/ 2014-10-27 17:25:00 -07:00
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