From d822f34d551bfc996a88332fff58310d62cd10c1 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Sat, 13 Jul 2019 04:20:45 +0000 Subject: [PATCH 1/2] =?UTF-8?q?lbagent:=20deploy:=20=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E9=BB=98=E8=AE=A4sslverify?= =?UTF-8?q?=3D0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/compute/models/loadbalanceragents_deploy.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/compute/models/loadbalanceragents_deploy.go b/pkg/compute/models/loadbalanceragents_deploy.go index 9b91599b15..78fbc43663 100644 --- a/pkg/compute/models/loadbalanceragents_deploy.go +++ b/pkg/compute/models/loadbalanceragents_deploy.go @@ -107,6 +107,9 @@ func (lbagent *SLoadbalancerAgent) deploy(ctx context.Context, userCred mcclient if v, ok := input.Host.GetVar("repo_base_url"); !ok || v == "" { return nil, httperrors.NewBadRequestError("use yum requires valid repo_base_url") } + if v, ok := input.Host.GetVar("repo_sslverify"); !ok || v == "" { + input.Host.SetVar("repo_sslverify", "0") + } pb.Files["yunionRepoTmpl"] = []byte(yunionRepoTmpl) pb.Modules = append(pb.Modules, ansible.Module{ @@ -125,7 +128,6 @@ func (lbagent *SLoadbalancerAgent) deploy(ctx context.Context, userCred mcclient "name=yunion-lbagent", "state=latest", "update_cache=yes", - "validate_certs=no", }, }, ) @@ -296,6 +298,7 @@ baseurl={{ repo_base_url }}/updates failovermethod=priority enabled=1 gpgcheck=0 +sslverify={{ repo_sslverify }} [yunion-extra] name=Extra Packages for Yunion - $basearch @@ -303,6 +306,7 @@ baseurl={{ repo_base_url }}/packages failovermethod=priority enabled=1 gpgcheck=0 +sslverify={{ repo_sslverify }} ` ) From e86db7084eb521911b5ff2ca651166493e73e386 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Sat, 13 Jul 2019 05:15:00 +0000 Subject: [PATCH 2/2] =?UTF-8?q?lbagent:=20deploy:=20=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E9=87=8D=E5=90=AF=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/compute/models/loadbalanceragents_deploy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/compute/models/loadbalanceragents_deploy.go b/pkg/compute/models/loadbalanceragents_deploy.go index 78fbc43663..7113cce984 100644 --- a/pkg/compute/models/loadbalanceragents_deploy.go +++ b/pkg/compute/models/loadbalanceragents_deploy.go @@ -199,7 +199,7 @@ func (lbagent *SLoadbalancerAgent) deploy(ctx context.Context, userCred mcclient Args: []string{ "name=yunion-lbagent", "enabled=yes", - "state=started", + "state=restarted", "daemon_reload=yes", }, },