You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2020/12/04 17:15:11 UTC

[servicecomb-service-center] branch test updated (193ce38 -> c959489)

This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a change to branch test
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git.


 discard 193ce38  SCB-2094 Bug fixes: Unavailable SSL
     new c959489  SCB-2094 Bug fixes: Unavailable SSL

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (193ce38)
            \
             N -- N -- N   refs/heads/test (c959489)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 datasource/etcd/client/remote/etcd.go | 3 +++
 server/bootstrap/bootstrap.go         | 2 +-
 server/config/config.go               | 5 +----
 server/config/server.go               | 5 +----
 server/server.go                      | 2 +-
 5 files changed, 7 insertions(+), 10 deletions(-)


[servicecomb-service-center] 01/01: SCB-2094 Bug fixes: Unavailable SSL

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git

commit c959489c4f3c5935b8a1fc990655a178adf71be6
Author: little-cui <su...@qq.com>
AuthorDate: Fri Dec 4 23:27:11 2020 +0800

    SCB-2094 Bug fixes: Unavailable SSL
---
 datasource/etcd/client/remote/etcd.go | 7 +++++--
 server/bootstrap/bootstrap.go         | 2 +-
 server/config/config.go               | 5 +----
 server/config/server.go               | 5 +----
 server/server.go                      | 1 +
 5 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/datasource/etcd/client/remote/etcd.go b/datasource/etcd/client/remote/etcd.go
index 4f4d4a6..1dba232 100644
--- a/datasource/etcd/client/remote/etcd.go
+++ b/datasource/etcd/client/remote/etcd.go
@@ -73,6 +73,9 @@ func (c *Client) Initialize() (err error) {
 		// parse the endpoints from config
 		c.parseEndpoints()
 	}
+	log.Info(fmt.Sprintf("parse %v -> endpoints: %v, ssl: %v",
+		etcd.Configuration().Clusters, c.Endpoints, etcd.Configuration().SslEnabled))
+
 	if c.TLSConfig == nil && etcd.Configuration().SslEnabled {
 		var err error
 		// go client tls限制,提供身份证书、不认证服务端、不校验CN
@@ -99,8 +102,8 @@ func (c *Client) Initialize() (err error) {
 
 	close(c.ready)
 
-	log.Warnf("get etcd client %v completed, auto sync endpoints interval is %s.",
-		c.Endpoints, c.AutoSyncInterval)
+	log.Warn(fmt.Sprintf("get etcd client %v completed, ssl: %v, dial timeout: %s, auto sync endpoints interval is %s.",
+		c.Endpoints, c.TLSConfig != nil, c.DialTimeout, c.AutoSyncInterval))
 	return
 }
 
diff --git a/server/bootstrap/bootstrap.go b/server/bootstrap/bootstrap.go
index 07f3deb..e42b4aa 100644
--- a/server/bootstrap/bootstrap.go
+++ b/server/bootstrap/bootstrap.go
@@ -16,8 +16,8 @@
  */
 package bootstrap
 
-//etcd
 import (
+	//etcd
 	_ "github.com/apache/servicecomb-service-center/datasource/etcd/bootstrap"
 
 	//mongo
diff --git a/server/config/config.go b/server/config/config.go
index 91545ad..facab7a 100644
--- a/server/config/config.go
+++ b/server/config/config.go
@@ -149,10 +149,7 @@ func newInfo() ServerInformation {
 
 			EnablePProf: GetInt("server.pprof.mode", 0, WithStandby("enable_pprof")) != 0,
 
-			SslEnabled:    GetInt("ssl.mode", 1, WithStandby("ssl_mode")) != 0,
-			SslMinVersion: GetString("ssl.minVersion", "TLSv1.2", WithStandby("ssl_min_version")),
-			SslVerifyPeer: GetInt("ssl.verifyClient", 1, WithStandby("ssl_verify_client")) != 0,
-			SslCiphers:    GetString("ssl.ciphers", "", WithStandby("ssl_ciphers")),
+			SslEnabled: GetInt("ssl.mode", 1, WithStandby("ssl_mode")) != 0,
 
 			CompactIndexDelta: GetInt64("registry.compact.indexDelta", 100, WithStandby("compact_index_delta")),
 			CompactInterval:   GetDuration("registry.compact.interval", 12*time.Hour, WithStandby("compact_interval")),
diff --git a/server/config/server.go b/server/config/server.go
index f48a63e..c0138af 100644
--- a/server/config/server.go
+++ b/server/config/server.go
@@ -36,10 +36,7 @@ type ServerConfig struct {
 	LimitConnections int64  `json:"limitConnections"`
 	LimitIPLookup    string `json:"limitIPLookup"`
 
-	SslEnabled    bool   `json:"sslEnabled,string"`
-	SslMinVersion string `json:"sslMinVersion"`
-	SslVerifyPeer bool   `json:"sslVerifyPeer,string"`
-	SslCiphers    string `json:"sslCiphers"`
+	SslEnabled bool `json:"sslEnabled,string"`
 
 	AutoSyncInterval  time.Duration `json:"-"`
 	CompactIndexDelta int64         `json:"-"`
diff --git a/server/server.go b/server/server.go
index 2453151..5440e9e 100644
--- a/server/server.go
+++ b/server/server.go
@@ -111,6 +111,7 @@ func (s *ServiceCenterServer) initDatasource() {
 	kind := datasource.ImplName(config.GetString("registry.kind", "", config.WithStandby("registry_plugin")))
 	if err := datasource.Init(datasource.Options{
 		PluginImplName:    kind,
+		SslEnabled:        config.GetSSL().SslEnabled,
 		InstanceTTL:       config.GetRegistry().InstanceTTL,
 		SchemaEditable:    config.GetRegistry().SchemaEditable,
 		CompactInterval:   config.GetRegistry().CompactInterval,