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
Xiang Li
be3e87b238
pkg/fileutil: make TestLockAndUnlock less flaky on CI
...
CI is slow sometime. To make the test less flaky, we increases the
timeout. This does not affect the correctness, but the test might
take longer to finish or to fail.
2015-12-14 11:38:07 -08:00
Gyu-Ho Lee
4e06510280
pkg/fileutil: fix shadowed variables
2015-12-12 09:38:26 -08:00
Xiang Li
95c29838e3
rafthttp: move ReadCloser to ioutil
2015-12-11 09:37:41 -08:00
Xiang Li
e93c07ba91
pkg/fileutil: make purge test more reliable
2015-12-09 10:34:38 -08:00
Xiang Li
77069ca16b
pkg/fileutil: make purgeTest more robust
...
1. Add a few comments to the test.
2. Provide a more robust way to check the purging
result. Tolerate slow io operations.
2015-12-02 15:12:42 -08:00
Gyu-Ho Lee
81229dbea9
*: add missing package descriptions
...
This adds and updates package descriptions in etcd projects.
And also deletes some duplicate LICENSE statements.
2015-11-17 20:54:10 -08:00
Yicheng Qin
7ff8ec81ee
Merge pull request #3771 from yichengq/cors-auth
...
pkg/cors: add authorization into Access-Control-Allow-Headers
2015-11-10 08:05:53 -08:00
Yicheng Qin
33fe6f41fb
Merge pull request #3808 from yichengq/fix-wait-test
...
pkg/wait: extend wait timeout in TestWaitTime
2015-11-04 11:39:24 -08:00
Yicheng Qin
3b8349c06e
pkg/wait: extend wait timeout in TestWaitTime
...
Fix this error happening on travis:
```
--- FAIL: TestWaitTime-2 (0.01s)
wait_time_test.go:46: cannot receive from ch as expected
```
2015-11-04 11:18:17 -08:00
Yicheng Qin
6040d57106
rafthttp: use MergeLogger to merge message-drop log
...
rafthttp logs repeated messages when amounts of message-drop logs
happen, and it becomes log spamming.
Use MergeLogger to merge log lines in this case.
2015-11-04 07:26:58 -08:00
Yicheng Qin
d6b4c7b67c
pkg/cors: add authorization into Access-Control-Allow-Headers
...
This helps browser to send auth-related request to etcd server when
cors flag is set.
2015-10-28 13:58:04 -07:00
Yicheng Qin
d3ebecdddd
pkg/transport: extend wait timeout for write
...
This helps the test to pass safely in semaphore CI.
Based on my manual testing, it may take at most 500ms to return
error in semaphore CI, so I set 1s as a safe value.
2015-10-21 18:27:21 -07:00
Xiang Li
3c1ecf70cf
pkg/transport: longer timeout for slow CI
2015-10-18 16:32:18 -07:00
Yicheng Qin
9673eb625a
pkg/transport: pass dial timeout to NewTransport
...
So we could set dial timeout for new transport, which makes it
customizable according to max RTT.
2015-10-11 10:09:25 -07:00
Yicheng Qin
e117f36e48
pkg/types: fix unwanted unescape in NewURLsMap
...
We use url.ParseQuery to parse names-to-urls string, but it has side
effect that unescape the string. If the initial-cluster string has ipv6
which contains `%25`, it will unescape it to `%` and make further url
parse failed.
Fix it by modifiying the parse process.
Go1.4 doesn't support literal IPv6 address w/ zone in
URI(https://github.com/golang/go/issues/6530 ), so we only enable tests
in Go1.5+.
2015-10-05 14:54:17 -07:00
Yicheng Qin
de1a16e0f1
pkg/transport: fix a data race in TestReadWriteTimeoutDialer
...
Accessing test.T async will cause data race.
Change to use select to coordinate the access of test.T.
2015-09-30 17:29:24 -07:00
Xiang Li
6c05a01ec6
Merge pull request #3604 from gyuho/replace_netutil_BasicAuth
...
etcdhttp/auth: BasicAuth method in standard pkg
2015-09-28 15:55:46 -07:00
Gyu-Ho Lee
e16f81838b
etcdhttp/auth: BasicAuth method in standard pkg
...
I created a new PR from https://github.com/coreos/etcd/pull/3598 .
This is for `TODO: use the standard lib BasicAuth method when we move to
Go 1.4.` [1]. `BasicAuth` method got into Go standard package a year ago. [2]
---
1. https://github.com/coreos/etcd/blob/master/pkg/netutil/netutil.go#L126-L138
2. https://codereview.appspot.com/76540043/
2015-09-28 14:02:55 -07:00
Xiang Li
5d033c22af
pkg/transport: fix a data race in TestWriteReadTimeoutListener
2015-09-25 10:02:37 -07:00
Jonathan Boulle
7848ac3979
*: add missing license headers
2015-09-15 14:09:01 -07:00
Yicheng Qin
1f0fb3d9aa
etcdserver: forbid to unset v3 demo once used
...
After enabling v3 demo, it may change the underlying data organization
for v3 store. So we forbid to unset --experimental-v3demo once it has
been used.
2015-09-14 21:27:11 -07:00
Yicheng Qin
df83af944b
Merge pull request #3384 from yichengq/fix-shadow
...
test: use go vet shadow feature instead of go-nyet
2015-08-27 14:27:57 -07:00
Yicheng Qin
92cd24d5bd
*: fix govet shadow check failure
2015-08-27 14:15:30 -07:00
Xiang Li
b2d33e6dcb
Merge pull request #3382 from xiang90/env
...
pkg/flags: print out evn usage information
2015-08-27 13:36:55 -07:00
Matt Keller
327632014e
cors: Removed new(?) header from test, resolving failure
...
"X-Content-Type-Options" was being autoadded, but none of the
test maps took it into account. I saw that "Content-Type" was
also being deleted, so I figured that was the best solution
for this as well.
2015-08-27 15:23:14 -04:00
Xiang Li
c8f5e03b75
pkg/flags: print out evn usage information
2015-08-27 12:08:31 -07:00
Yicheng Qin
57e88465bf
pkg/transport: print ClientCertAuth in TLSInfo.String()
...
It is good to print it in debug output:
```
21:56:12 etcd1 | 2015-08-25 21:56:12.162406 I | etcdmain: peerTLS: cert
= certs/etcd1.pem, key = certs/etcd1-key.pem, ca = , trusted-ca =
certs/ca.pem, client-cert-auth = true
```
2015-08-25 21:53:52 -07:00
Yicheng Qin
6250fed8a8
Merge pull request #3096 from philips/tls-info-debug
...
pkg/transport: include debug output for trusted-ca
2015-08-25 20:08:19 -07:00
Yicheng Qin
fc95ec0cc6
rafthttp: always cancel in-flight request when stop streamReader
...
This problem is totally fixed at 1.5.
go1.5 adds a Request.Cancel channel, which allows for "race free"
cancellation
(8b4278ffb7
).
Our implementation relies on it to always cancel in-flight request.
2015-08-25 08:54:13 -07:00
Cong Ding
c09b667d57
*: fix go vet reported issues
2015-08-22 12:19:02 -05:00
Xiang Li
044b23c3ca
Merge pull request #3356 from xiang90/travis
...
*: test gofmt with -s and fix reported issues
2015-08-21 18:59:51 -07:00
Xiang Li
6b23a8131f
*: test gofmt with -s and fix reported issues
2015-08-21 18:52:16 -07:00
Yicheng Qin
3c1e6b54b3
pkg/netutil: stop resolving in place
...
It helps to copy out a and b, and not modify the original a and b.
2015-08-21 12:09:17 -07:00
Yicheng Qin
1c334979cd
pkg/netutil: not introduce empty url when converting
...
It should not make slices with length and append elements at the same
time.
2015-08-21 12:08:17 -07:00
Yicheng Qin
7b871aab41
pkg/netutil: not export resolve and urlsEqual functions
...
They are only used in this package, so there is no need to public them.
2015-08-21 11:58:37 -07:00
Yicheng Qin
b1192e5c48
pkg/netutil: fix false negative comparison
...
Sort the resolved URLs before DeepEqual, so it will not compare URLs
that may be out of order due to resolution.
2015-08-21 10:15:08 -07:00
Yicheng Qin
8ea3d157c5
Revert "Revert "Treat URLs have same IP address as same""
...
This reverts commit 3153e635d5799f1ff8715fd4b7c07e0283820acd.
Conflicts:
etcdserver/config.go
2015-08-21 09:41:13 -07:00
Xiang Li
ff37cc455c
pkg/transport: remove home-grown limitedListener
2015-08-20 20:03:27 -07:00
Xiang Li
3ca5482251
pkg/fileutil: treat not support error as nil error in preallocate
2015-08-20 11:15:02 -07:00
Yicheng Qin
4778d780a8
pkg/pathutil: change copyright for path.go
...
The file only contains the function that is borrowed from std http lib,
so we use their copyright.
2015-08-18 11:48:22 -07:00
Yicheng Qin
b5ec7f543a
client: use canonical url path in request
...
The main change is that it keeps the trailing slash. This helps
auth feature to judge path permission accurately.
2015-08-18 08:59:48 -07:00
Yicheng Qin
2c2249dadc
Merge pull request #3219 from yichengq/limit-listener
...
etcdmain: stop accepting client conns when it reachs limit
2015-08-06 12:17:49 -07:00