Not all environments require https scheduler. So start it only if CA certificate exists.
Signed-off-by: Wu Zhende wuzhende666@163.com --- container/scheduler-https/start | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/container/scheduler-https/start b/container/scheduler-https/start index 38c4892..38427b7 100755 --- a/container/scheduler-https/start +++ b/container/scheduler-https/start @@ -6,6 +6,10 @@ require 'set' require_relative '../defconfig.rb'
+warn_msg = 'CA certificate is missing.Ignore if the HTTPS scheduler is not required' +ca_path = '/etc/compass-ci/ca' +raise warn_msg unless File.exist?("#{ca_path}/server.crt") && File.exist?("#{ca_path}/server.key") + names = Set.new %w[ SCHED_HOST SCHED_PORT
On Thu, Nov 12, 2020 at 04:25:56PM +0800, Wu Zhende wrote:
Not all environments require https scheduler. So start it only if CA certificate exists.
Signed-off-by: Wu Zhende wuzhende666@163.com
container/scheduler-https/start | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/container/scheduler-https/start b/container/scheduler-https/start index 38c4892..38427b7 100755 --- a/container/scheduler-https/start +++ b/container/scheduler-https/start @@ -6,6 +6,10 @@ require 'set' require_relative '../defconfig.rb'
+warn_msg = 'CA certificate is missing.Ignore if the HTTPS scheduler is not required'
^need a space after ".". Thanks, Xueliang
+ca_path = '/etc/compass-ci/ca' +raise warn_msg unless File.exist?("#{ca_path}/server.crt") && File.exist?("#{ca_path}/server.key")
names = Set.new %w[ SCHED_HOST SCHED_PORT -- 2.23.0