Compare commits

..

8 Commits

Author SHA1 Message Date
Gyu-Ho Lee
f1d7dd87da version: bump up to v3.2.9
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-06 08:58:06 -07:00
Gyu-Ho Lee
ad212d339b Makefile: sync with master branch on test commands
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-06 08:57:42 -07:00
Gyu-Ho Lee
9f49665284 Documentation/op-guide: remove git merge line in monitoring.md
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-06 08:55:56 -07:00
Xiang
78f8d6e185 embed: fix HTTPs + DNS SRV discovery 2017-10-05 16:03:22 -07:00
Gyu-Ho Lee
a954a0de53 Makefile: initial commit, update Dockerfile
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-05 10:31:24 -07:00
Gyu-Ho Lee
0c3defdd2b vendor: update 'golang.org/x/crypto'
To include 6c586e17d9.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-05 09:49:00 -07:00
Gyu-Ho Lee
814588d166 travis: use Go 1.8.4
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-05 09:19:29 -07:00
Gyu-Ho Lee
2d2932822c version: bump up to 3.2.8+git
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-05 09:18:48 -07:00
11 changed files with 159 additions and 26 deletions

View File

@@ -4,7 +4,7 @@ go_import_path: github.com/coreos/etcd
sudo: false
go:
- 1.8.3
- 1.8.4
- tip
notifications:

View File

@@ -44,7 +44,6 @@ When Elapsed (s)
## Metrics endpoint
Each etcd server exports metrics under the `/metrics` path on its client port and optionally on interfaces given by `--listen-metrics-urls`.
>>>>>>> 607d0762e... Documentation/op-guide: remove grafana demo link
The metrics can be fetched with `curl`:

120
Makefile Normal file
View File

@@ -0,0 +1,120 @@
# run from repository root
TEST_SUFFIX = $(shell date +%s | base64 | head -c 15)
.PHONY: build
build:
GO_BUILD_FLAGS="-v" ./build
./bin/etcd --version
ETCDCTL_API=3 ./bin/etcdctl version
test:
$(info log-file: test-$(TEST_SUFFIX).log)
PASSES='fmt bom dep compile build unit' ./test 2>&1 | tee test-$(TEST_SUFFIX).log
! grep FAIL -A10 -B50 test-$(TEST_SUFFIX).log
test-all:
$(info log-file: test-all-$(TEST_SUFFIX).log)
RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional' ./test 2>&1 | tee test-all-$(TEST_SUFFIX).log
! grep FAIL -A10 -B50 test-all-$(TEST_SUFFIX).log
test-proxy:
$(info log-file: test-proxy-$(TEST_SUFFIX).log)
PASSES='build grpcproxy' ./test 2>&1 | tee test-proxy-$(TEST_SUFFIX).log
! grep FAIL -A10 -B50 test-proxy-$(TEST_SUFFIX).log
test-coverage:
$(info log-file: test-coverage-$(TEST_SUFFIX).log)
COVERDIR=covdir PASSES='build build_cov cov' ./test 2>&1 | tee test-coverage-$(TEST_SUFFIX).log
$(shell curl -s https://codecov.io/bash >codecov)
chmod 700 ./codecov
./codecov -h
./codecov -t 6040de41-c073-4d6f-bbf8-d89256ef31e1
# clean up failed tests, logs, dependencies
clean:
rm -f ./codecov
rm -f ./*.log
rm -f ./bin/Dockerfile-release
rm -rf ./bin/*.etcd
rm -rf ./gopath
rm -rf ./release
rm -f ./integration/127.0.0.1:* ./integration/localhost:*
rm -f ./clientv3/integration/127.0.0.1:* ./clientv3/integration/localhost:*
rm -f ./clientv3/ordering/127.0.0.1:* ./clientv3/ordering/localhost:*
# sync with Dockerfile-test, e2e/docker-dns/Dockerfile, e2e/docker-dns-srv/Dockerfile
_GO_VERSION = go1.8.4
ifdef GO_VERSION
_GO_VERSION = $(GO_VERSION)
endif
# build base container image for testing on Linux
docker-test-build:
docker build --tag gcr.io/etcd-development/etcd-test:$(_GO_VERSION) --file ./Dockerfile-test .
# e.g.
# gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd.json)" https://gcr.io
docker-test-push:
gcloud docker -- push gcr.io/etcd-development/etcd-test:$(_GO_VERSION)
docker-test-pull:
docker pull gcr.io/etcd-development/etcd-test:$(_GO_VERSION)
# compile etcd and etcdctl with Linux
docker-test-compile:
docker run \
--rm \
--volume=`pwd`/:/etcd \
gcr.io/etcd-development/etcd-test:$(_GO_VERSION) \
/bin/bash -c "cd /etcd && GO_BUILD_FLAGS=-v ./build && ./bin/etcd --version"
# run tests inside container
docker-test:
$(info log-file: docker-test-$(TEST_SUFFIX).log)
docker run \
--rm \
--volume=`pwd`:/go/src/github.com/coreos/etcd \
gcr.io/etcd-development/etcd-test:$(_GO_VERSION) \
/bin/bash -c "RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional' ./test 2>&1 | tee docker-test-$(TEST_SUFFIX).log"
! grep FAIL -A10 -B50 docker-test-$(TEST_SUFFIX).log
docker-test-386:
$(info log-file: docker-test-386-$(TEST_SUFFIX).log)
docker run \
--rm \
--volume=`pwd`:/go/src/github.com/coreos/etcd \
gcr.io/etcd-development/etcd-test:$(_GO_VERSION) \
/bin/bash -c "GOARCH=386 PASSES='build unit integration_e2e' ./test 2>&1 | tee docker-test-386-$(TEST_SUFFIX).log"
! grep FAIL -A10 -B50 docker-test-386-$(TEST_SUFFIX).log
docker-test-proxy:
$(info log-file: docker-test-proxy-$(TEST_SUFFIX).log)
docker run \
--rm \
--volume=`pwd`:/go/src/github.com/coreos/etcd \
gcr.io/etcd-development/etcd-test:$(_GO_VERSION) \
/bin/bash -c "PASSES='build grpcproxy' ./test ./test 2>&1 | tee docker-test-proxy-$(TEST_SUFFIX).log"
! grep FAIL -A10 -B50 docker-test-proxy-$(TEST_SUFFIX).log
# build release container image with Linux
_ETCD_VERSION ?= $(shell git rev-parse --short HEAD || echo "GitNotFound")
ifdef ETCD_VERSION
_ETCD_VERSION = $(ETCD_VERSION)
endif
docker-release-master-build: docker-test-compile
cp ./Dockerfile-release ./bin/Dockerfile-release
docker build \
--tag gcr.io/etcd-development/etcd:$(_ETCD_VERSION) \
--file ./bin/Dockerfile-release \
./bin
rm -f ./bin/Dockerfile-release
docker run \
--rm \
gcr.io/etcd-development/etcd:$(_ETCD_VERSION) \
/bin/sh -c "/usr/local/bin/etcd --version && ETCDCTL_API=3 /usr/local/bin/etcdctl version"
docker-release-master-push:
gcloud docker -- push gcr.io/etcd-development/etcd:$(_ETCD_VERSION)

View File

@@ -12,9 +12,10 @@ import (
"crypto/subtle"
"errors"
"fmt"
"golang.org/x/crypto/blowfish"
"io"
"strconv"
"golang.org/x/crypto/blowfish"
)
const (
@@ -205,7 +206,6 @@ func bcrypt(password []byte, cost int, salt []byte) ([]byte, error) {
}
func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cipher, error) {
csalt, err := base64Decode(salt)
if err != nil {
return nil, err
@@ -213,7 +213,8 @@ func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cip
// Bug compatibility with C bcrypt implementations. They use the trailing
// NULL in the key string during expansion.
ckey := append(key, 0)
// We copy the key to prevent changing the underlying array.
ckey := append(key[:len(key):len(key)], 0)
c, err := blowfish.NewSaltedCipher(ckey, csalt)
if err != nil {

View File

@@ -6,7 +6,7 @@
package blowfish // import "golang.org/x/crypto/blowfish"
// The code is a port of Bruce Schneier's C implementation.
// See http://www.schneier.com/blowfish.html.
// See https://www.schneier.com/blowfish.html.
import "strconv"
@@ -39,7 +39,7 @@ func NewCipher(key []byte) (*Cipher, error) {
// NewSaltedCipher creates a returns a Cipher that folds a salt into its key
// schedule. For most purposes, NewCipher, instead of NewSaltedCipher, is
// sufficient and desirable. For bcrypt compatiblity, the key can be over 56
// sufficient and desirable. For bcrypt compatibility, the key can be over 56
// bytes.
func NewSaltedCipher(key, salt []byte) (*Cipher, error) {
if len(salt) == 0 {

View File

@@ -4,7 +4,7 @@
// The startup permutation array and substitution boxes.
// They are the hexadecimal digits of PI; see:
// http://www.schneier.com/code/constants.txt.
// https://www.schneier.com/code/constants.txt.
package blowfish

View File

@@ -1,12 +1,23 @@
FROM golang:1.8.3-stretch
LABEL Description="Image for etcd DNS testing"
RUN apt update -y
RUN go get github.com/mattn/goreman
RUN apt install -y bind9
RUN mkdir /var/bind
RUN chown bind /var/bind
ADD Procfile.tls /Procfile.tls
ADD run.sh /run.sh
ADD named.conf etcd.zone rdns.zone /etc/bind/
ADD resolv.conf /etc/resolv.conf
CMD ["/run.sh"]
FROM golang:1.8.4-stretch
RUN apt-get -y update
RUN apt-get -y install \
netcat \
libaspell-dev \
libhunspell-dev \
hunspell-en-us \
aspell-en \
shellcheck
RUN mkdir -p ${GOPATH}/src/github.com/coreos/etcd
WORKDIR ${GOPATH}/src/github.com/coreos/etcd
ADD ./scripts/install-marker.sh ./scripts/install-marker.sh
RUN go get -v -u -tags spell github.com/chzchzchz/goword \
&& go get -v -u github.com/coreos/license-bill-of-materials \
&& go get -v -u honnef.co/go/tools/cmd/gosimple \
&& go get -v -u honnef.co/go/tools/cmd/unused \
&& go get -v -u honnef.co/go/tools/cmd/staticcheck \
&& go get -v -u github.com/wadey/gocovmerge \
&& ./scripts/install-marker.sh amd64

View File

@@ -331,7 +331,9 @@ func (cfg *Config) PeerURLsMapAndToken(which string) (urlsmap types.URLsMap, tok
}
clusterStr := strings.Join(clusterStrs, ",")
if strings.Contains(clusterStr, "https://") && cfg.PeerTLSInfo.CAFile == "" {
cfg.PeerTLSInfo.ServerName = cfg.DNSCluster
// SRV targets have subdomains under the given DNSCluster, so wildcard matching
// is needed.
cfg.PeerTLSInfo.ServerName = "*." + cfg.DNSCluster
}
urlsmap, err = types.NewURLsMap(clusterStr)
// only etcd member must belong to the discovered cluster.

6
glide.lock generated
View File

@@ -1,5 +1,5 @@
hash: cee1f2629857e9c2384ad89ff6014db09498c9af53771e5144ad3a4b510ff00e
updated: 2017-05-30T10:29:08.22609283-07:00
hash: e18fa8fb6e4dc1d7eb3cd538c90b0927f26e1ab0b04cbdd209d2d5c3233b7c5b
updated: 2017-10-05T07:34:38.051011-07:00
imports:
- name: github.com/beorn7/perks
version: 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9
@@ -108,7 +108,7 @@ imports:
- name: github.com/xiang90/probing
version: 07dd2e8dfe18522e9c447ba95f2fe95262f63bb2
- name: golang.org/x/crypto
version: 1351f936d976c60a0a48d728281922cf63eafb8d
version: 9419663f5a44be8b34ca85f08abc5fe1be11f8a3
subpackages:
- bcrypt
- blowfish

View File

@@ -78,7 +78,7 @@ import:
- package: github.com/grpc-ecosystem/go-grpc-prometheus
version: v1.1
- package: golang.org/x/crypto
version: 1351f936d976c60a0a48d728281922cf63eafb8d
version: 9419663f5a44be8b34ca85f08abc5fe1be11f8a3
subpackages:
- bcrypt
- blowfish

View File

@@ -26,7 +26,7 @@ import (
var (
// MinClusterVersion is the min cluster version this etcd binary is compatible with.
MinClusterVersion = "3.0.0"
Version = "3.2.8"
Version = "3.2.9"
APIVersion = "unknown"
// Git SHA Value will be set during build