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 15:37:27 UTC

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

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 193ce381a2099bc96b3dffd6bcb1d811756d1c8f
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 | 4 ++--
 server/server.go                      | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/datasource/etcd/client/remote/etcd.go b/datasource/etcd/client/remote/etcd.go
index 4f4d4a6..6412fb1 100644
--- a/datasource/etcd/client/remote/etcd.go
+++ b/datasource/etcd/client/remote/etcd.go
@@ -99,8 +99,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/server.go b/server/server.go
index 2453151..5cc66f7 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.GetInt("ssl.mode", 1, config.WithStandby("ssl_mode")) != 0,
 		InstanceTTL:       config.GetRegistry().InstanceTTL,
 		SchemaEditable:    config.GetRegistry().SchemaEditable,
 		CompactInterval:   config.GetRegistry().CompactInterval,