Compare commits
12 Commits
api/v3.5.0
...
v3.3.0-rc.
Author | SHA1 | Date | |
---|---|---|---|
d3c2acf090 | |||
5e35f79087 | |||
6dff1a9398 | |||
325913d6fb | |||
24c9fb0527 | |||
8511db5e2b | |||
3193f3c9ab | |||
bdc508cadf | |||
d5a0609412 | |||
67af1a2138 | |||
66d68a8fdb | |||
ebaa83c985 |
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
TEST_SUFFIX=$(date +%s | base64 | head -c 15)
|
TEST_SUFFIX=$(date +%s | base64 | head -c 15)
|
||||||
|
|
||||||
TEST_OPTS="RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional' MANUAL_VER=v3.2.11"
|
TEST_OPTS="RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional' MANUAL_VER=v3.3.0-rc.0"
|
||||||
if [ "$TEST_ARCH" == "386" ]; then
|
if [ "$TEST_ARCH" == "386" ]; then
|
||||||
TEST_OPTS="GOARCH=386 PASSES='build unit integration_e2e'"
|
TEST_OPTS="GOARCH=386 PASSES='build unit integration_e2e'"
|
||||||
fi
|
fi
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
## [v3.3.0](https://github.com/coreos/etcd/releases/tag/v3.3.0) (2018-01-??)
|
## [v3.3.0](https://github.com/coreos/etcd/releases/tag/v3.3.0)
|
||||||
|
|
||||||
**v3.3.0 is not yet released; expected to be released in January 2018.**
|
|
||||||
|
|
||||||
## [v3.3.0-rc.0](https://github.com/coreos/etcd/releases/tag/v3.3.0-rc.0) (2017-12-20)
|
|
||||||
|
|
||||||
See [code changes](https://github.com/coreos/etcd/compare/v3.2.0...v3.3.0) and [v3.3 upgrade guide](https://github.com/coreos/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
|
See [code changes](https://github.com/coreos/etcd/compare/v3.2.0...v3.3.0) and [v3.3 upgrade guide](https://github.com/coreos/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
|
||||||
|
|
||||||
|
@ -906,7 +906,7 @@ func TestKVLargeRequests(t *testing.T) {
|
|||||||
maxCallSendBytesClient: 10 * 1024 * 1024,
|
maxCallSendBytesClient: 10 * 1024 * 1024,
|
||||||
maxCallRecvBytesClient: 0,
|
maxCallRecvBytesClient: 0,
|
||||||
valueSize: 10 * 1024 * 1024,
|
valueSize: 10 * 1024 * 1024,
|
||||||
expectError: grpc.Errorf(codes.ResourceExhausted, "grpc: trying to send message larger than max (%d vs. %d)", 10485770, 10485760),
|
expectError: grpc.Errorf(codes.ResourceExhausted, "grpc: trying to send message larger than max "),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
maxRequestBytesServer: 10 * 1024 * 1024,
|
maxRequestBytesServer: 10 * 1024 * 1024,
|
||||||
@ -920,7 +920,7 @@ func TestKVLargeRequests(t *testing.T) {
|
|||||||
maxCallSendBytesClient: 10 * 1024 * 1024,
|
maxCallSendBytesClient: 10 * 1024 * 1024,
|
||||||
maxCallRecvBytesClient: 0,
|
maxCallRecvBytesClient: 0,
|
||||||
valueSize: 10*1024*1024 + 5,
|
valueSize: 10*1024*1024 + 5,
|
||||||
expectError: grpc.Errorf(codes.ResourceExhausted, "grpc: trying to send message larger than max (%d vs. %d)", 10485775, 10485760),
|
expectError: grpc.Errorf(codes.ResourceExhausted, "grpc: trying to send message larger than max "),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for i, test := range tests {
|
for i, test := range tests {
|
||||||
@ -939,7 +939,7 @@ func TestKVLargeRequests(t *testing.T) {
|
|||||||
if err != test.expectError {
|
if err != test.expectError {
|
||||||
t.Errorf("#%d: expected %v, got %v", i, test.expectError, err)
|
t.Errorf("#%d: expected %v, got %v", i, test.expectError, err)
|
||||||
}
|
}
|
||||||
} else if err != nil && err.Error() != test.expectError.Error() {
|
} else if err != nil && !strings.HasPrefix(err.Error(), test.expectError.Error()) {
|
||||||
t.Errorf("#%d: expected %v, got %v", i, test.expectError, err)
|
t.Errorf("#%d: expected %v, got %v", i, test.expectError, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,8 +445,11 @@ func (lkv *leasingKV) revokeLeaseKvs(ctx context.Context, kvs []*mvccpb.KeyValue
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (lkv *leasingKV) waitSession(ctx context.Context) error {
|
func (lkv *leasingKV) waitSession(ctx context.Context) error {
|
||||||
|
lkv.leases.mu.RLock()
|
||||||
|
sessionc := lkv.sessionc
|
||||||
|
lkv.leases.mu.RUnlock()
|
||||||
select {
|
select {
|
||||||
case <-lkv.sessionc:
|
case <-sessionc:
|
||||||
return nil
|
return nil
|
||||||
case <-lkv.ctx.Done():
|
case <-lkv.ctx.Done():
|
||||||
return lkv.ctx.Err()
|
return lkv.ctx.Err()
|
||||||
|
@ -268,8 +268,11 @@ func (cfg *Config) SetupLogging() {
|
|||||||
if cfg.Debug {
|
if cfg.Debug {
|
||||||
capnslog.SetGlobalLogLevel(capnslog.DEBUG)
|
capnslog.SetGlobalLogLevel(capnslog.DEBUG)
|
||||||
grpc.EnableTracing = true
|
grpc.EnableTracing = true
|
||||||
|
// enable info, warning, error
|
||||||
|
grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr))
|
||||||
} else {
|
} else {
|
||||||
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
|
// only discard info
|
||||||
|
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, os.Stderr, os.Stderr))
|
||||||
}
|
}
|
||||||
if cfg.LogPkgLevels != "" {
|
if cfg.LogPkgLevels != "" {
|
||||||
repoLog := capnslog.MustRepoLogger("github.com/coreos/etcd")
|
repoLog := capnslog.MustRepoLogger("github.com/coreos/etcd")
|
||||||
|
@ -179,6 +179,7 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) {
|
|||||||
AuthToken: cfg.AuthToken,
|
AuthToken: cfg.AuthToken,
|
||||||
InitialCorruptCheck: cfg.ExperimentalInitialCorruptCheck,
|
InitialCorruptCheck: cfg.ExperimentalInitialCorruptCheck,
|
||||||
CorruptCheckTime: cfg.ExperimentalCorruptCheckTime,
|
CorruptCheckTime: cfg.ExperimentalCorruptCheckTime,
|
||||||
|
Debug: cfg.Debug,
|
||||||
}
|
}
|
||||||
|
|
||||||
if e.Server, err = etcdserver.NewServer(srvcfg); err != nil {
|
if e.Server, err = etcdserver.NewServer(srvcfg); err != nil {
|
||||||
|
@ -17,6 +17,7 @@ package etcdmain
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
"math"
|
"math"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -37,10 +38,12 @@ import (
|
|||||||
"github.com/coreos/etcd/pkg/transport"
|
"github.com/coreos/etcd/pkg/transport"
|
||||||
"github.com/coreos/etcd/proxy/grpcproxy"
|
"github.com/coreos/etcd/proxy/grpcproxy"
|
||||||
|
|
||||||
|
"github.com/coreos/pkg/capnslog"
|
||||||
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
|
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
|
||||||
"github.com/soheilhy/cmux"
|
"github.com/soheilhy/cmux"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/grpclog"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -75,6 +78,8 @@ var (
|
|||||||
|
|
||||||
grpcProxyEnablePprof bool
|
grpcProxyEnablePprof bool
|
||||||
grpcProxyEnableOrdering bool
|
grpcProxyEnableOrdering bool
|
||||||
|
|
||||||
|
grpcProxyDebug bool
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -127,12 +132,26 @@ func newGRPCProxyStartCommand() *cobra.Command {
|
|||||||
// experimental flags
|
// experimental flags
|
||||||
cmd.Flags().BoolVar(&grpcProxyEnableOrdering, "experimental-serializable-ordering", false, "Ensure serializable reads have monotonically increasing store revisions across endpoints.")
|
cmd.Flags().BoolVar(&grpcProxyEnableOrdering, "experimental-serializable-ordering", false, "Ensure serializable reads have monotonically increasing store revisions across endpoints.")
|
||||||
cmd.Flags().StringVar(&grpcProxyLeasing, "experimental-leasing-prefix", "", "leasing metadata prefix for disconnected linearized reads.")
|
cmd.Flags().StringVar(&grpcProxyLeasing, "experimental-leasing-prefix", "", "leasing metadata prefix for disconnected linearized reads.")
|
||||||
|
|
||||||
|
cmd.Flags().BoolVar(&grpcProxyDebug, "debug", false, "Enable debug-level logging for grpc-proxy.")
|
||||||
|
|
||||||
return &cmd
|
return &cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
func startGRPCProxy(cmd *cobra.Command, args []string) {
|
func startGRPCProxy(cmd *cobra.Command, args []string) {
|
||||||
checkArgs()
|
checkArgs()
|
||||||
|
|
||||||
|
capnslog.SetGlobalLogLevel(capnslog.INFO)
|
||||||
|
if grpcProxyDebug {
|
||||||
|
capnslog.SetGlobalLogLevel(capnslog.DEBUG)
|
||||||
|
grpc.EnableTracing = true
|
||||||
|
// enable info, warning, error
|
||||||
|
grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr))
|
||||||
|
} else {
|
||||||
|
// only discard info
|
||||||
|
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, os.Stderr, os.Stderr))
|
||||||
|
}
|
||||||
|
|
||||||
tlsinfo := newTLS(grpcProxyListenCA, grpcProxyListenCert, grpcProxyListenKey)
|
tlsinfo := newTLS(grpcProxyListenCA, grpcProxyListenCert, grpcProxyListenKey)
|
||||||
if tlsinfo == nil && grpcProxyListenAutoTLS {
|
if tlsinfo == nil && grpcProxyListenAutoTLS {
|
||||||
host := []string{"https://" + grpcProxyListenAddr}
|
host := []string{"https://" + grpcProxyListenAddr}
|
||||||
|
@ -16,8 +16,10 @@ package v3rpc
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
"io/ioutil"
|
||||||
"math"
|
"math"
|
||||||
"os"
|
"os"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"github.com/coreos/etcd/etcdserver"
|
"github.com/coreos/etcd/etcdserver"
|
||||||
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
|
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
|
||||||
@ -36,9 +38,8 @@ const (
|
|||||||
maxSendBytes = math.MaxInt32
|
maxSendBytes = math.MaxInt32
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
// integration tests call this multiple times, which is racey in gRPC side
|
||||||
grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr))
|
var grpclogOnce sync.Once
|
||||||
}
|
|
||||||
|
|
||||||
func Server(s *etcdserver.EtcdServer, tls *tls.Config, gopts ...grpc.ServerOption) *grpc.Server {
|
func Server(s *etcdserver.EtcdServer, tls *tls.Config, gopts ...grpc.ServerOption) *grpc.Server {
|
||||||
var opts []grpc.ServerOption
|
var opts []grpc.ServerOption
|
||||||
@ -70,5 +71,16 @@ func Server(s *etcdserver.EtcdServer, tls *tls.Config, gopts ...grpc.ServerOptio
|
|||||||
// set zero values for metrics registered for this grpc server
|
// set zero values for metrics registered for this grpc server
|
||||||
grpc_prometheus.Register(grpcServer)
|
grpc_prometheus.Register(grpcServer)
|
||||||
|
|
||||||
|
grpclogOnce.Do(func() {
|
||||||
|
if s.Cfg.Debug {
|
||||||
|
grpc.EnableTracing = true
|
||||||
|
// enable info, warning, error
|
||||||
|
grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr))
|
||||||
|
} else {
|
||||||
|
// only discard info
|
||||||
|
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, os.Stderr, os.Stderr))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return grpcServer
|
return grpcServer
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ func (ls *LeaseServer) leaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) erro
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.Warningf("failed to receive lease keepalive request from gRPC stream (%q)", err.Error())
|
plog.Debugf("failed to receive lease keepalive request from gRPC stream (%q)", err.Error())
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ func (ls *LeaseServer) leaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) erro
|
|||||||
resp.TTL = ttl
|
resp.TTL = ttl
|
||||||
err = stream.Send(resp)
|
err = stream.Send(resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
plog.Warningf("failed to send lease keepalive response to gRPC stream (%q)", err.Error())
|
plog.Debugf("failed to send lease keepalive response to gRPC stream (%q)", err.Error())
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ func (ws *watchServer) Watch(stream pb.Watch_WatchServer) (err error) {
|
|||||||
// deadlock when calling sws.close().
|
// deadlock when calling sws.close().
|
||||||
go func() {
|
go func() {
|
||||||
if rerr := sws.recvLoop(); rerr != nil {
|
if rerr := sws.recvLoop(); rerr != nil {
|
||||||
plog.Warningf("failed to receive watch request from gRPC stream (%q)", rerr.Error())
|
plog.Debugf("failed to receive watch request from gRPC stream (%q)", rerr.Error())
|
||||||
errc <- rerr
|
errc <- rerr
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
@ -339,7 +339,7 @@ func (sws *serverWatchStream) sendLoop() {
|
|||||||
|
|
||||||
mvcc.ReportEventReceived(len(evs))
|
mvcc.ReportEventReceived(len(evs))
|
||||||
if err := sws.gRPCStream.Send(wr); err != nil {
|
if err := sws.gRPCStream.Send(wr); err != nil {
|
||||||
plog.Warningf("failed to send watch response to gRPC stream (%q)", err.Error())
|
plog.Debugf("failed to send watch response to gRPC stream (%q)", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,7 +356,7 @@ func (sws *serverWatchStream) sendLoop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := sws.gRPCStream.Send(c); err != nil {
|
if err := sws.gRPCStream.Send(c); err != nil {
|
||||||
plog.Warningf("failed to send watch control response to gRPC stream (%q)", err.Error())
|
plog.Debugf("failed to send watch control response to gRPC stream (%q)", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ func (sws *serverWatchStream) sendLoop() {
|
|||||||
for _, v := range pending[wid] {
|
for _, v := range pending[wid] {
|
||||||
mvcc.ReportEventReceived(len(v.Events))
|
mvcc.ReportEventReceived(len(v.Events))
|
||||||
if err := sws.gRPCStream.Send(v); err != nil {
|
if err := sws.gRPCStream.Send(v); err != nil {
|
||||||
plog.Warningf("failed to send pending watch response to gRPC stream (%q)", err.Error())
|
plog.Debugf("failed to send pending watch response to gRPC stream (%q)", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,8 @@ type ServerConfig struct {
|
|||||||
// before serving any peer/client traffic.
|
// before serving any peer/client traffic.
|
||||||
InitialCorruptCheck bool
|
InitialCorruptCheck bool
|
||||||
CorruptCheckTime time.Duration
|
CorruptCheckTime time.Duration
|
||||||
|
|
||||||
|
Debug bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// VerifyBootstrap sanity-checks the initial config for bootstrap case
|
// VerifyBootstrap sanity-checks the initial config for bootstrap case
|
||||||
|
4
test
4
test
@ -246,13 +246,13 @@ function grpcproxy_pass {
|
|||||||
function release_pass {
|
function release_pass {
|
||||||
rm -f ./bin/etcd-last-release
|
rm -f ./bin/etcd-last-release
|
||||||
# to grab latest patch release; bump this up for every minor release
|
# to grab latest patch release; bump this up for every minor release
|
||||||
UPGRADE_VER=$(git tag -l --sort=-version:refname "v3.2.*" | head -1)
|
UPGRADE_VER=$(git tag -l --sort=-version:refname "v3.3.*" | head -1)
|
||||||
if [ -n "$MANUAL_VER" ]; then
|
if [ -n "$MANUAL_VER" ]; then
|
||||||
# in case, we need to test against different version
|
# in case, we need to test against different version
|
||||||
UPGRADE_VER=$MANUAL_VER
|
UPGRADE_VER=$MANUAL_VER
|
||||||
fi
|
fi
|
||||||
if [[ -z ${UPGRADE_VER} ]]; then
|
if [[ -z ${UPGRADE_VER} ]]; then
|
||||||
UPGRADE_VER="v3.2.0"
|
UPGRADE_VER="v3.3.0"
|
||||||
echo "fallback to" ${UPGRADE_VER}
|
echo "fallback to" ${UPGRADE_VER}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -16,17 +16,13 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.org/x/time/rate"
|
"golang.org/x/time/rate"
|
||||||
"google.golang.org/grpc/grpclog"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() { grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr)) }
|
|
||||||
|
|
||||||
type Stresser interface {
|
type Stresser interface {
|
||||||
// Stress starts to stress the etcd cluster
|
// Stress starts to stress the etcd cluster
|
||||||
Stress() error
|
Stress() error
|
||||||
|
@ -26,7 +26,7 @@ import (
|
|||||||
var (
|
var (
|
||||||
// MinClusterVersion is the min cluster version this etcd binary is compatible with.
|
// MinClusterVersion is the min cluster version this etcd binary is compatible with.
|
||||||
MinClusterVersion = "3.0.0"
|
MinClusterVersion = "3.0.0"
|
||||||
Version = "3.3.0"
|
Version = "3.3.0-rc.1"
|
||||||
APIVersion = "unknown"
|
APIVersion = "unknown"
|
||||||
|
|
||||||
// Git SHA Value will be set during build
|
// Git SHA Value will be set during build
|
||||||
|
Reference in New Issue
Block a user