Xiang Li
7ae94f2bf0
osutil: pid 1 should exit directly instead of trying to kill itself
2015-02-19 20:27:50 -08:00
Xiang Li
e44dc0f3fe
osutil: fix win build
2015-02-13 16:33:39 -08:00
Fabian Reinartz
8bf795dc3c
etcdmain/osutil: shutdown gracefully, interrupt handling
...
The functionality in pkg/osutil ensures that all interrupt handlers finish
and the process kills itself with the proper signal.
Test for interrupt handling added.
The server shutsdown gracefully by stopping on interrupt (Issue #2277.)
2015-02-13 10:28:53 +01:00
Yicheng Qin
57dd8c18cc
etcdmain: infer bind addr from addr in v1 flagset
2015-02-10 09:42:10 -08:00
Yicheng Qin
871e92ef73
pkg/osutil: add Unsetenv
...
go1.4 doesn't support static link well, so we stay in go1.3 for a while.
Implement Unsetenv in go1.3 way.
2015-02-04 10:29:20 -08:00
Xiang Li
fce80136e3
main: detects coreos
2015-01-30 12:10:05 -08:00
Yicheng Qin
ebf9daff74
Merge pull request #2190 from yichengq/308
...
migrate: support start desired version
2015-01-30 11:47:22 -08:00
Yicheng Qin
ec5a6e8beb
migrate: support start desired version
2015-01-30 00:35:53 -08:00
Xiang Li
4960324876
pkg/transport: fix tlskeepalive
2015-01-29 09:42:48 -08:00
Yicheng Qin
8c932ff719
pkg/metrics: protect global vars in reset func
2015-01-26 16:23:35 -08:00
Yicheng Qin
f0c9a54edb
Merge pull request #2156 from yichengq/309
...
pkg/metrics: self-manage global expvar map
2015-01-26 16:20:31 -08:00
Yicheng Qin
08b34a3f5b
pkg/metrics: self-manage global expvar map
...
This helps the embedded tests.
2015-01-26 16:20:09 -08:00
Shota Fukumori (sora_h)
f8ce5996b0
Treat URLs have same IP address as same
...
- To solve validation error problem using URLs in hostname #2123
2015-01-27 04:36:41 +09:00
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
Brian Waldon
2120af8cfc
pkg: ioutils -> ioutil
2015-01-22 17:14:01 -08:00
Yicheng Qin
99821579bf
metrics: add /rafthttp/stream metrics
2015-01-21 13:24:21 -08:00
Yicheng Qin
190fd446f9
pkg/types: add URLs tests
2015-01-15 10:24:23 -08:00
Yicheng Qin
886a6a6194
pkg/types: add unsafeSet.ContainsAll test
2015-01-15 10:21:53 -08:00
Yicheng Qin
9b4e72dd3a
pkg/types: add Uint64Slice test
2015-01-15 10:21:53 -08:00
Ben Darnell
4510993b67
pkg/transport: tests always listen on 127.0.0.1
...
This avoids firewall prompts when running tests on OSX.
2015-01-14 13:14:57 -05:00
Xiang Li
89d95539cf
Merge pull request #2083 from yichengq/293
...
*: move etcdserver/idutil -> pkg/idutil
2015-01-13 13:04:50 -08:00
Yicheng Qin
07a69430c1
*: move etcdserver/idutil -> pkg/idutil
2015-01-13 11:54:51 -08:00
Xiang Li
c212a511fe
Merge pull request #2078 from yichengq/290
...
pkg/crc: add test
2015-01-13 11:10:51 -08:00
Yicheng Qin
c68f5c2059
pkg/crc: add test
2015-01-13 11:07:18 -08:00
Yicheng Qin
51005d32c7
Merge pull request #2079 from yichengq/291
...
pkg/cors: add tests
2015-01-13 11:05:02 -08:00
Yicheng Qin
c8994cff37
pkg/cors: add tests
2015-01-12 18:42:40 -08:00
Yicheng Qin
0015372939
pkg/cors: remove http flush
...
The code is introduced in 7dce4c8fbb
, and
the comments cannot explain the usefulness of the code at all.
2015-01-12 18:03:30 -08:00
Yicheng Qin
7e67fd13f6
pkg/pbutil: add marshal-related tests
2015-01-12 15:26:55 -08:00
Yicheng Qin
dfb66ab8ce
pkg/transport: add NewKeepAliveListener test
2015-01-10 13:09:57 -08:00
Yicheng Qin
f1368a00fb
pkg/transport: add NewListener test
2015-01-10 13:09:13 -08:00
Yicheng Qin
3577ed69a2
pkg/transport: add NewTimeoutTransport test
2015-01-10 13:03:15 -08:00
Yicheng Qin
e688471c28
pkg/transport: add NewTimeoutListener test
2015-01-09 15:57:04 -08:00
Xiang Li
1d1a4754a7
pkg/transport: enable keep alive
2015-01-06 22:02:30 -08:00
Xiang Li
7f1c630a0b
*: use keepalive listener to detect dead clients
2015-01-06 12:09:34 -08:00
Xiang Li
27d47977d9
etcdserver: move recorder to testutil
2015-01-02 11:21:23 -08:00
Xiang Li
c3d2f5eea0
pbutil: add getbool to pbutil
2014-12-30 14:51:26 -08:00
Xiang Li
cea29fe158
etcdserver: move getExpr to timeutil
2014-12-29 11:15:02 -08:00
Xiang Li
08e9c25ea5
*: move srv into pkg discovery
2014-12-24 21:37:20 -08:00
Kelsey Hightower
705ec45083
etcdmain: resolve DNS hostnames for client and peer URLs
...
etcd resolves DNS hostnames to IP addresses for client and peer URLs
before creating any listening sockets.
The following messages are logged during startup:
etcd: Resolving infra0.coreos.com:2380 to 10.0.1.10:2380
Fixes #1991
2014-12-24 13:12:32 -05:00
Jonathan Boulle
1ec98cb795
pkg/fileutil: sort filenames during ReadDir
2014-12-18 16:36:11 -08:00
Barak Michener
a0d72fb00c
Fix building the lock on windows
2014-12-18 18:57:11 -05:00
Xiang Li
ea94d19147
*: lock the in using files; do not purge locked the wal files
2014-12-14 19:27:22 -08:00
Xiang Li
3cc4cdd363
pkg/transport: change write size from 1MB -> 5MB
...
As we move to container-based infrastructure testing env
on travis, the tcp write buffer is more than 1MB. Change
the test according to the change on the testing env.
2014-12-13 11:32:29 -08:00
Xiang Li
a1f648e5db
etcdmain: format usage
2014-12-04 17:21:23 -08:00
Xiang Li
88e2fab572
Merge pull request #1859 from xiang90/pause_test
...
*: add pauseMember test
2014-12-04 15:11:59 -08:00
Veres Lajos
3de2ab2c04
*: typofixes
...
https://github.com/vlajos/misspell_fixer
2014-12-04 22:51:19 +00:00
Xiang Li
151f043414
*: add pauseMember test
2014-12-04 14:22:43 -08:00
Xiang Li
d3db010190
*: support purging old wal/snap files
2014-12-01 11:50:17 -08:00
Yicheng Qin
61ce494386
rafthttp: limit the buffer for every read correctly
2014-11-24 17:39:39 -08:00
Yicheng Qin
3e55834c38
*: set read/write timeout for raft transport and listener
2014-11-24 13:46:44 -08:00
Yicheng Qin
ad58122e3c
pkg/transport: fix dialer typo
2014-11-24 13:35:46 -08:00
Xiang Li
c72221a691
pkg/transport: add copyright header
2014-11-24 00:39:55 -08:00
Xiang Li
35e6df6d0a
integration: longer request timeout for slow travis
2014-11-23 22:53:05 -08:00
Xiang Li
da1ff2d2bb
pkg/transport: add timeout dailer and timeout listener
2014-11-23 21:18:34 -08:00
Barak Michener
59a0c64e9f
fix import loop, add set to types, and fix comments
2014-11-20 15:38:08 -05:00
Xiang Li
6a1fe00615
Merge pull request #1704 from xiang90/print_config
...
*: print out configuration when necessary
2014-11-13 14:35:50 -08:00
Xiang Li
92096dfdc3
*: print out configuration when necessary
2014-11-13 10:46:42 -08:00
Xiang Li
0d18a0f381
pkg/wait: move wait to pkg/wait
2014-11-13 09:11:53 -08:00
Xiang Li
b6f0c789b8
transport: create a tls listener only if the tlsInfo is not empty and the scheme is HTTPS
2014-11-11 11:51:57 -08:00
Brian Waldon
5f6e536be8
Merge pull request #1639 from bcwaldon/etcdctl-tls
...
Wire up TLS flags for etcdctl
2014-11-07 13:19:36 -08:00
Jonathan Boulle
5604b4c57c
flag: split out SetFlagsFromEnvBad test; declare return error
2014-11-06 16:40:13 -08:00
Jonathan Boulle
321d65c4ac
pkg: fix SetFlagsFromEnv behaviour
...
This function was fundamentally buggy, as a panic could be trivially
triggered by setting the wrong environment variable (e.g.
ETCD_BIND_ADDR=foo). Instead, let's propagate the error and present it
to the user in a cleaner way.
2014-11-06 14:39:30 -08:00
Brian Waldon
902f06c5c4
pkg/transport: generate TLS client config w/ only CAFile
2014-11-06 12:13:36 -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
5de9d38cc6
pkg: move to more generic StringsFlag
2014-11-04 16:52:56 -08:00
Xiang Li
5cb13fd071
*: support discovery fallback
2014-11-04 14:30:22 -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
Jonathan Boulle
9546df9a6c
etcdserver: make peer URLs log message more readable
2014-10-29 14:18:51 -07:00
Jonathan Boulle
a96f5ab146
main: catch a few unhandled errors
...
If any of this initialization fails, something very bad has happened,
and we should not continue as-is (this has previously manifested in
strange bugs)
2014-10-28 11:18:22 -07:00
Brian Waldon
480e92d340
strutil: move IDAsHex/IDFromHex to new pkg
2014-10-27 18:39:09 -07:00
Kelsey Hightower
b1731f0843
etcd: ensure data dir is writable
...
etcd checks that the data dir is writable by writing and removing an
empty file to the data dir during startup and exits non-zero if that
fails.
fixes #876
2014-10-27 16:52:05 -07:00
Jonathan Boulle
6e6d1897d8
pkg: move everything into subpackages
2014-10-27 09:57:28 -07:00
Brian Waldon
444e6e952b
pkg: add README.md
2014-10-26 16:28:48 -07:00
Jonathan Boulle
b3d5333cb3
*: fix various formatting issues
2014-10-20 17:55:18 -07:00
Jonathan Boulle
7a4d42166b
*: add license header to all source files
2014-10-17 15:41:22 -07:00
Jonathan Boulle
e334148a91
pkg: set minimum TLS version to 1.0 (disable SSL3)
...
SSLv3 is no longer considered secure, and is not supported by golang
clients. Set the minimum version of all TLSConfigs that etcd uses to
ensure that only TLS >=1.0 can be used.
2014-10-15 14:00:16 -07:00
Xiang Li
f98fbbfc14
*: proto refactoring
2014-10-14 21:07:23 +08:00
Xiang Li
8bbbaa88b2
*: raft related int64 -> uint64
2014-10-09 14:29:21 +08:00
Yicheng Qin
3ca3c9ad4c
Merge pull request #1245 from unihorn/155
...
main/raft: write addNode ConfChange entries in log when start raft
2014-10-06 17:00:28 -07:00
Yicheng Qin
c15c3eab4c
etcdserver: move int64Slice into pkg/types/
2014-10-06 15:12:02 -07:00
Jonathan Boulle
ec7bcbb50d
main: fail on peers/peers-file flags
2014-10-06 14:25:11 -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
619c7f9fdb
Merge pull request #1220 from bcwaldon/bkcompat
...
Backwards-compatibility with v0.4.6 addr-related flags
2014-10-01 12:53:50 -07:00
Yicheng Qin
b3c7711da8
Merge pull request #1219 from unihorn/148
...
flags/urls: reject url without port
2014-10-01 11:51:32 -07:00
Brian Waldon
11582b0f5f
pkg: add URLsFromFlags
2014-10-01 11:49:01 -07:00
Brian Waldon
add3906f6c
pkg/flags: add NewURLs helper
2014-10-01 11:49:01 -07:00
Brian Waldon
c9cac5fee5
flags: replace Addrs with IPAddressPort
2014-10-01 11:49:00 -07:00
Yicheng Qin
1356037fc6
flags/urls: reject url without port
...
For now, if etcd receives a url without port, it will listen on a random
port, which is useless.
2014-10-01 11:44:17 -07:00
Yicheng Qin
8944364884
flags/urls: assign urls instead of append
2014-10-01 11:23: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
78a9bba276
pkg/types/flags: introduce flags package
...
I want to use the Addrs type in another experimental proxy that I am
implementing. Pull it out into a separate package.
2014-09-28 14:56:30 -07:00
Xiang Li
720aa6aeae
pkg: move cors.go to /pkg/cors.go
2014-09-25 11:46:08 -07:00
Xiang Li
e20e286064
Merge pull request #1178 from coreos/crc
...
pkg: move /crc to /pkg/crc
2014-09-25 10:55:24 -07:00
Xiang Li
20ac0ee80d
Merge pull request #1177 from coreos/tran
...
pkg: move /transport to pkg/transport
2014-09-25 10:55:11 -07:00
Xiang Li
2f6086de22
pkg: move /crc to /pkg/crc
2014-09-25 10:50:33 -07:00
Xiang Li
a0f5625728
pkg: move /transport to pkg/transport
2014-09-25 10:47:14 -07:00
Xiang Li
45f71af33e
pkg: move testutil to pkg
2014-09-25 10:40:40 -07:00
Brian Waldon
e30c1eeefd
pkg: move SetFlagsFromEnv to pkg package
2014-09-24 16:29:47 -07:00
Brian Waldon
314c13a8f0
pkg: move DeprecatedFlag to new package
2014-09-24 16:09:37 -07:00
Blake Mizerany
a2b9f9310c
remove pkg/strings
2014-09-03 09:20:06 -07:00
Blake Mizerany
7b2474681b
remove pkg/http
2014-09-03 09:20:06 -07:00
Blake Mizerany
0ecbe891b5
remove pkg/btrfs
2014-09-03 09:20:05 -07:00
Brandon Philips
b3c5ed60bd
chore(pkg/btrfs): remove accidental swp file.
2014-05-22 09:50:40 -07:00
Yicheng Qin
7bf1936df3
fix(btrfs): build btrfs based on platform
2014-04-18 11:20:38 -07:00
Yicheng Qin
56ef6fbcae
make necessary changes
2014-04-11 17:00:14 -07:00
Yicheng Qin
bda8849c3b
chore(btrfs): rename fs to btrfs
...
This is because the actions is specific for btrfs.
2014-04-09 15:06:17 -07:00
Yicheng Qin
375aeb57af
fix(fs): make check on NOCOW
2014-04-09 14:44:54 -07:00
Yicheng Qin
6d77e4dfd6
fix(fs): rewrite test to avoid side effect
2014-04-09 13:11:23 -07:00
Yicheng Qin
d871324e93
chore(pkg/fs): rewrite comment
2014-04-09 10:15:28 -07:00
Yicheng Qin
b06d2796f8
feat: set NOCOW for log directory when in btrfs
2014-04-09 10:00:21 -07:00
evan-gu
9cfd8c5f0b
fix(store): make NodeExtern.Value a *string
...
Before this change if the value of a Node was "" it would get dropped from the json
encoding and the Node.Value field would be missing. Fix this problem by making
NodeExtern.Value a *string so that an empty string will be encoded but a nil value
will drop the field.
2014-02-18 00:50:44 -05:00
Brandon Philips
f56965b1c0
refactor(config): make config its own package
...
Refactor config into its own package. Trying to tease the config from
the server so that all of the control surfaces are exposed in the Server
for easier testing.
2014-02-05 09:27:39 -08:00
Brandon Philips
69922340f6
refactor(server): move utilities into pkg
...
like camlistore lets move these utilities into a `pkg` prefix.
2014-02-05 09:27:39 -08:00