Commit Graph

250 Commits (45cf31650c52fab3a9066554c47852d9f3201f34)

Author SHA1 Message Date
Anthony Romano bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Nick Owens d80a546ed4 pkg/transport: use ProxyFromEnvironment when constructing a transport
this allows use of HTTP_PROXY/HTTPS_PROXY for etcdctl.
2016-03-21 21:02:42 -07:00
Anthony Romano adebd91114 Merge pull request #4785 from heyitsanthony/gce-fallocate
wal: extend WAL file to segment size on fallocate
2016-03-21 13:08:53 -07:00
Anthony Romano a69c709839 pkg/transport: generate certs 2016-03-21 11:38:23 -07:00
Anthony Romano aafe717f2f fileutil: support file extending preallocate 2016-03-21 09:42:30 -07:00
Gyu-Ho Lee dae7e009b0 *: godoc clean up 2016-03-19 14:19:23 -07:00
Gyu-Ho Lee 5bba773199 pkg/testutil: drop go1.4 goroutine leak exception 2016-03-18 18:45:47 -07:00
Gyu-Ho Lee 0a82c06a2c pkg/types: drop go1.4 tests 2016-03-18 18:45:29 -07:00
Gyu-Ho Lee 33e22fa8d7 pkg/httputil: drop go1.4 tests 2016-03-18 18:45:12 -07:00
Anthony Romano 7397e14c0a fileutil, wal: refactor file locking
File lock interface was more verbose than it needed to be while
simultaneously making it difficult to support systems (e.g., Windows)
that only permit locked writes on a single fd holding the lock.
2016-03-16 15:02:15 -07:00
Hongchao Deng dcaf5ef586 move store recorder to 'mock/mockstore' 2016-03-15 15:41:07 -07:00
Xiang Li e59efe45a1 wal: support fadatasync on linux 2016-03-13 17:22:53 -07:00
Gyu-Ho Lee 22a8bbd3b1 pkg/fileutil: clean up interface, comments 2016-03-09 09:19:56 -08:00
Gyu-Ho Lee 4422db389a pkg/netutil: add linux netem functions
This is useful for simulating bad networks by introducing
latencies to wide area networks.

Reference:
http://www.linuxfoundation.org/collaborate/workgroups/networking/netem
2016-03-03 10:14:28 -08:00
Xiang Li f0dbd0b856 Merge pull request #4646 from xiang90/starvation
etcdserver: detect raft stravation
2016-02-29 19:58:17 -08:00
Anthony Romano 1d6ebdd35c pkg/timeutil: removal
Overkill of a package for three lines of code.
2016-02-29 17:07:24 -08:00
Xiang Li d6520303c6 etcdserver: detect raft starvation caused by contention 2016-02-29 17:06:57 -08:00
Anthony Romano c0b06a7a32 pkg/adt: interval tree 2016-02-29 15:20:30 -08:00
Anthony Romano c5b51946eb *: exported godoc fixups 2016-02-21 20:36:44 -08:00
Xiang Li 870e4c2681 *: fix schedule.Wait race 2016-02-11 15:21:33 -08:00
Xiang Li d314345e6d *: add a scheduler and use it to schedule compaction 2016-02-10 14:27:08 -08:00
Xiang Li e44e753e66 pkg/idutil: reduce conflict rate from 1% to 0.005%
Perviously, we only use 8bits from member identification
in id generation. The conflict rate is A(256,3)/256^3, which
is around 1%. Now we use 16bites to reduce the rate to 0.005%.

We can attach the full member id into id generation if needed...
2016-02-04 13:25:18 -08:00
Xiang Li d43bd48977 pkg/wait: make id checking stricter
Do not allow register with same id.
2016-02-04 09:59:49 -08:00
Anthony Romano 72b31d6fdc pkg/testutil: more aggressive goroutine stack trace coalescing
Strips out the pointer arguments in the header of the stack trace so
that more stack traces match each other.
2016-02-02 21:20:24 -08:00
Anthony Romano 20461ab11a *: fix many typos 2016-01-31 21:42:39 -08:00
Gyu-Ho Lee 71c2a9bb3c *: fix minor typos, comments 2016-01-30 18:15:56 -08:00
Xiang Li 12556af26b Merge pull request #4343 from shawnps/patch-6
testutil: fix typo in comment
2016-01-28 23:03:29 -08:00
Shawn Smith 0cbd5bfe7d testutil: fix typo in comment 2016-01-29 16:02:07 +09:00
Shawn Smith 4e649970df logutil: fix typo in comment 2016-01-29 16:01:19 +09:00
Xiang Li b1a45fe1c8 Merge pull request #4274 from xiang90/leasehttp
leasehttp: move lease/http.go to its own pkg
2016-01-25 10:25:25 +08:00
Xiang Li 72ffa74476 pkg/transport: update timeout transport to reuse conn when timeout is not set 2016-01-25 06:55:54 +08:00
Gyu-Ho Lee 96d2ee20e3 *: detect leaky goroutines, fix leaks
gexpect.Interact leaks. This adds ReadLine method to wait for the leaky
goroutine to accept an EOF.

Fixes https://github.com/coreos/etcd/issues/4258.

Reference: https://github.com/coreos/etcd/pull/4261#issuecomment-174198945.
2016-01-23 13:52:41 -08:00
Gyu-Ho Lee 0d646a25ee pkg/testutil: fix unreachable go tool vet complain 2016-01-22 15:16:35 -08:00
Gyu-Ho Lee 497bbd3010 *: FatalStack to stacktrace tests after timeout
Related to https://github.com/coreos/etcd/issues/4065.
2016-01-14 10:20:14 -08:00
Gyu-Ho Lee b6077f9d57 *: fix minor typos 2016-01-14 01:28:29 -08:00
Anthony Romano 54c905f87f testutil: fix data race in RecorderBuffered
Was accessing a shared data structure instead of the private copy.

Fixes #4198
2016-01-12 21:08:51 -08:00
Anthony Romano 811fbc5672 etcdmain: support keep alive listeners on limit listener connections
Fixes #4171
2016-01-08 10:11:31 -08:00
Gyu-Ho Lee f76166a041 *: fix minor typos 2016-01-08 00:21:19 -08:00
Xiang Li 1f97f2dc36 etcdmain: tls listener MUST be at the outer layer of all listeners
go HTTP library uses type assertion to determine if a connection
is a TLS connection. If we wrapper TLS Listener with any customized
Listener that can create customized Conn, HTTPs will be broken.

This commit fixes the issue.
2016-01-07 10:26:49 -08:00
Anthony Romano f2df87f3e4 pkg/transport: support listeners on unix sockets
Given unix://<socketname>, NewListener will listen on unix socket <socketname>.
This is useful when binding to tcp ports is undesirable (e.g., testing).
2016-01-06 12:09:05 -08:00
Anthony Romano 384cc76299 pkg/testutil: make Recorder an interface
Provides two implementations of Recorder-- one that is non-blocking
like the original version and one that provides a blocking channel
to avoid busy waiting or racing in tests when no other synchronization
is available.
2016-01-05 09:39:18 -08:00
Anthony Romano e1bf726bc1 *: split out etcdserver's test mockup objects to live in interfaces' packages 2016-01-05 09:39:13 -08:00
Gyu-Ho Lee 64032541c3 pkg/logutil: round off start time, add merge_logger_test.go 2015-12-29 20:00:46 -08:00
Xiang Li 150e646b05 etcdserver: always check if the data dir is writable before starting etcd 2015-12-29 11:29:01 -08:00
Gyu-Ho Lee 8d368c4dba pkg/fileutil: fix error var shadow
Go tip complains about error variable shadowing at
https://travis-ci.org/coreos/etcd/jobs/98636879#L291-L292.
2015-12-23 23:56:26 -08:00
Xiang Li 22b3b3e07a Merge pull request #4038 from AkihiroSuda/etcd-4007
pkg/fileutil: skip TestIsDirWriteable when running as root
2015-12-23 22:23:57 -08:00
Akihiro Suda 058f1449d6 pkg/fileutil: skip TestIsDirWriteable when running as root 2015-12-24 14:52:40 +09:00
Jonathan Boulle 50efd01e34 pkg: fix tiny docstring typo in ioutil 2015-12-22 16:37:22 +01:00
Xiang Li 4bcd7587e2 etcdmain: fix incomplete proxy config file
etcd might generate incomplete proxy config file after a power failure.
It is because we use ioutil.WriteFile. And iotuile.WriteFile does
not call Sync before closing the file.
2015-12-21 16:15:00 -08:00
Xiang Li 96731f4525 Merge pull request #3991 from xiang90/fix_lock
pkg/fileutil: make TestLockAndUnlock less flaky on CI
2015-12-14 11:58:14 -08:00