Gyuho Lee
43d6162d3f
Merge pull request #12246 from SVilgelm/fix-import-path
...
Fix import path to fileutils in listener
2020-08-24 12:31:29 -07:00
Sahdev P. Zala
864d9f4127
pkg: file stat warning
...
Provide warning and doc instead of enforcing file permission.
2020-08-24 11:32:31 -04:00
Sergey Vilgelm
386ebbb704
Fix import path to fileutils in listener
...
transport/listener: change the import path of fileutil
Version 3.3 still uses the github.com/coreos/etcd prefix, but the transport/listener package
used the go.etcd.io/etcd path prefix.
2020-08-22 07:27:15 -05:00
Gyuho Lee
0bed5fffd4
pkg/runtime: optimize FDUsage by removing sort
...
No need sort when we just want the counts.
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-12 18:39:10 -07:00
Sahdev P. Zala
ac37d3499e
pkg: consider umask when use MkdirAll
...
os.MkdirAll creates directory before umask so make sure that a desired
permission is set after creating a directory with MkdirAll. Use the
existing TouchDirAll function which checks for permission if dir is already
exist and when create a new dir.
2020-07-07 12:02:55 -04:00
tangcong
44b0318929
pkg/fileutil: print desired file permission in error log
2020-06-29 10:00:23 +08:00
Changxin Miao
6be5c54c94
pkg: Fix dir permission check on Windows
2020-06-25 20:21:54 -04:00
Sahdev P. Zala
bde76af5fa
pkg: check file stats
...
modify file util.
2020-06-24 21:28:16 -04:00
Gyuho Lee
9caec0d124
etcdserver,wal: fix inconsistencies in WAL and snapshot
...
ref. https://github.com/etcd-io/etcd/issues/10219
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-18 02:26:57 -07:00
Gyuho Lee
89ecd19414
pkg/ioutil: add "FlushN"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-04-01 10:36:03 -07:00
Jingyi Hu
7c164a8948
etcdserver: wait purge file loop during shutdown
...
To prevent the purge file loop from accidentally acquiring the file lock
and remove the files during server shutdowm.
2019-10-30 16:47:06 -07:00
Andy Liu
d851911f86
etcdserver: add unit test.
2019-10-03 16:06:30 +08:00
Andy Liu
86b1686c7e
etcdserver: cherry-pick skip client san verification option for 3.3 version.
...
Co-authored-by: Martin Weindel <martin.weindel@sap.com>
Co-authored-by: Jingyi Hu <jingyih@google.com>
Co-authored-by: Liming Liu <andyliuliming@outlook.com>
2019-10-03 10:12:22 +08:00
Jingyi Hu
81fc7c23c2
*: fix gofmt
2019-08-19 20:22:15 -07:00
Gyuho Lee
7eb9a29e26
pkg/*: add
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 04:05:04 -07:00
Gyuho Lee
ffe90b9ff3
pkg/adt: remove TODO
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:02:28 -07:00
xkey
036bd1ab09
pkg/adt: fix interval tree black-height property based on rbtree
...
Author: xkey <xk33430@ly.com>
ref. https://github.com/etcd-io/etcd/pull/10978
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:02:21 -07:00
Gyuho Lee
33e4877b56
pkg/adt: document textbook implementation with pseudo-code
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:02:15 -07:00
Gyuho Lee
c25f746f77
pkg/adt: mask test failure, add TODO
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:02:07 -07:00
Gyuho Lee
f4341fd35c
pkg/adt: add "IntervalTree.Delete" failure case
...
Described in https://github.com/etcd-io/etcd/issues/10877 .
"black-height" property: Every path from a node to any descendant leaf node must have the same number of black nodes.
Expected
After deleting 11 (requires rebalancing):
[510,511]
/ \
---------- --------------------------
/ \
[383,384] [830,831]
/ \ / \
/ \ / \
[261,262](red) [410,411] [647,648] [899,900](red)
/ \ \ / \
/ \ \ / \
[82,83] [292,293] [815,816](red) [888,889] [972,973]
\ /
\ /
[238,239](red) [953,954](red)
Got
After deleting 11 (requires rebalancing):
[510,511]
/ \
---------- --------------------------
/ \
[82,83] [830,831]
\ / \
\ / \
[383,384] [647,648] [899,900]
/ \ \ / \
/ \ \ / \
[261,262] [410,411] [815,816] [888,889] [972,973]
/ \ /
/ \ /
[238,239] [292,293] [953,954]
This violates "black-height" property.
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:01:58 -07:00
Gyuho Lee
b3152365bb
pkg/adt: test node "11" deletion
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:01:51 -07:00
Gyuho Lee
d938435e44
pkg/adt: README "IntervalTree.Delete" test case images
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:01:43 -07:00
Gyuho Lee
594e7d6627
pkg/adt: README initial commit
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:01:35 -07:00
Gyuho Lee
266214d19e
pkg/adt: add "visitLevel", make "IntervalTree" interface, more tests
...
Make "IntervalTree" an interface to abstract range tree interface
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:01:16 -07:00
Gyuho Lee
0b37ae05b1
pkg: clean up code format
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2019-08-09 11:00:44 -07:00
Gyuho Lee
13715724b8
etcdmain: add "--cipher-suites" flag
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-05 18:50:15 -07:00
Gyuho Lee
6a3842776b
pkg/transport: add "TLSInfo.CipherSuites" field
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-05 18:10:35 -07:00
Gyuho Lee
641bddca0f
pkg/tlsutil: add "GetCipherSuite"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-05 18:10:16 -07:00
rob boll
08dc184618
pkg/transport: don't set certificates on tls config
2018-04-17 06:17:38 -07:00
Gyuho Lee
3736a126df
pkg/proxy: move from "pkg/transport"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-10 23:43:23 -07:00
Gyuho Lee
a4cbba89ff
pkg/transport: implement "Proxy"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-06 10:02:34 -08:00
Gyuho Lee
0bc06d72df
pkg/transport: add "fixtures" for TLS tests
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-06 10:02:25 -08:00
Gyuho Lee
dbde4e986b
pkg/netutil: return error from "URLStringsEqual"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-25 12:00:14 -08:00
Gyuho Lee
0ec5023b7b
pkg/expect: fix deadlock in mac OS
...
bufio.NewReader.ReadString blocks even
when the process received syscall.SIGKILL.
Remove ptyMu mutex and make ReadString return
when *os.File is closed.
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-02 14:34:01 -08:00
Gyu-Ho Lee
962976f2df
pkg/fileutil: fix preallocate under OS X kernel
...
ftruncate changes st_blocks, and following fallocate
syscalls would return EINVAL when allocated block size
is already greater than requested block size
(e.g. st_blocks==8, requested blocks are 2).
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-12-14 10:36:57 -08:00
Gyu-Ho Lee
965d9806d5
pkg/flags: fix "SetFlagsFromEnv" error masking
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-27 06:41:43 -08:00
Gyu-Ho Lee
75110dd839
*: fix naked returns
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 18:46:15 -08:00
Joe Betz
a9996f8768
test: Deflake TestV3LeasePrmote integration test
2017-10-26 16:58:37 -07:00
Gyu-Ho Lee
1f2197b1f8
pkg/transport: add TODO to deprecate 'CAFile' field in v4
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-04 14:01:01 -07:00
Hitoshi Mitake
70018e9207
etcdmain, pkg: CN based auth for inter peer connection
...
This commit adds an authentication mechanism to inter peer connection
(rafthttp). If the cert based peer auth is enabled and a new option
`--peer-cert-allowed-cn` is passed, an etcd process denies a peer
connection whose CN doesn't match.
2017-10-02 15:59:17 +09:00
Anthony Romano
4fa1dd196c
*: make receiver names consistent
2017-09-12 03:54:04 -07:00
Gyu-Ho Lee
6e39a39e3a
Merge pull request #8511 from gyuho/ctx
...
*: deprecate 'golang.org/x/net/context'
2017-09-07 18:07:57 -07:00
Gyu-Ho Lee
f65aee0759
*: replace 'golang.org/x/net/context' with 'context'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
lorneli
63aa64d240
lease: use monotime in time.Time for Go 1.9
...
The golang/time package tracks monotonic time in each time.Time
returned by time.Now function for Go 1.9.
Use time.Time to measure whether a lease is expired and remove
previous pkg/monotime. Use zero time.Time to mean forever. No
expiration when expiry.IsZero() is true.
2017-09-07 14:18:19 +08:00
Anthony Romano
492bbc9659
netutil: test schemes for URLStringsEqual
...
add tests for http/https mismatch and unix scheme
2017-08-31 12:41:05 -07:00
Anthony Romano
7d4a8a6935
Merge pull request #8466 from heyitsanthony/tls-srv-mismatch
...
srv: if a host matches a peer, only use if url schemes match
2017-08-30 10:42:20 -07:00
Manjunath A Kumatagi
cd772ea737
pkg/pbutil: Fix go vet errors
2017-08-30 20:07:14 +05:30
Anthony Romano
a671703c08
srv: if a host matches a peer, only use if url schemes match
...
The https scheme for a peer advertise URL was ignored when resolving through
SRV records.
2017-08-29 23:29:56 -07:00
blueblue
9b92e1b2d0
flag: improve StringFlags by support set default value when init ( #8447 )
...
* flag: improve StringFlags by support set default value when init
when init flagSet, set default value should be moved to StringFlags init
func, which is more friendly
personal proposal
* flag: code improved for StringFlags
2017-08-28 00:02:11 -07:00
lorneli
54fcdb4b5c
pkg/wait: change list's lock to RWMutex
...
Change list's lock from Mutex to RWMutex, which allows concurrent
access for list.IsRegistered function.
2017-08-27 18:23:18 +08:00