[Why] "env = docker_env(defaults)" already add "-e xxx". Don't need to add in cmd again. SCHED_HOST/SCHED_PORT/GIT_SERVER/MASTER_FLUENTD_HOST/MASTER_FLUENTD_HOST may add duplicate -e.
Signed-off-by: Wu Zhende wuzhende666@163.com --- container/scheduler/start | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/container/scheduler/start b/container/scheduler/start index 6898d4b..70a3496 100755 --- a/container/scheduler/start +++ b/container/scheduler/start @@ -32,15 +32,17 @@ defaults = relevant_defaults(names) defaults['SSHR_PORT'] ||= 5050 defaults['SSHR_PORT_BASE'] ||= 50000 defaults['SSHR_PORT_LEN'] ||= 2000 +defaults['SCHED_PORT'] ||= '3000' +defaults['SCHED_HOST'] ||= '172.17.0.1' +defaults['MASTER_FLUENTD_PORT'] ||= '24224' env = docker_env(defaults)
CCI_REPOS = ENV['CCI_REPOS'] || '/c' DEFAULT_LKP = "#{CCI_REPOS}/lkp-tests" DEFAULT_CCI = "#{CCI_REPOS}/compass-ci" LAB = defaults['lab'] || 'z9' -SCHED_PORT = defaults['SCHED_PORT'] || '3000' -SCHED_HOST = defaults['SCHED_HOST'] || '172.17.0.1' -MASTER_FLUENTD_PORT = defaults['MASTER_FLUENTD_PORT'] || '24224' +SCHED_PORT = defaults['SCHED_PORT'] +SCHED_HOST = defaults['SCHED_HOST'] DEFAULT_CONFIG_DIR = '/etc/compass-ci/defaults'
docker_rm "s001-alpine-#{SCHED_PORT}" @@ -61,11 +63,6 @@ cmd = %W[ -e CCI_REPOS=#{CCI_REPOS} -e LKP_SRC=#{DEFAULT_LKP} -e CCI_SRC=#{DEFAULT_CCI} - -e SCHED_HOST=#{SCHED_HOST} - -e SCHED_PORT=#{SCHED_PORT} - -e GIT_SERVER=#{defaults["GIT_SERVER"]} - -e MASTER_FLUENTD_HOST=#{defaults["MASTER_FLUENTD_HOST"]} - -e MASTER_FLUENTD_PORT=#{MASTER_FLUENTD_PORT} -v #{ENV['LKP_SRC']}:#{DEFAULT_LKP} -v #{ENV['CCI_SRC']}:#{DEFAULT_CCI} -v #{DEFAULT_CONFIG_DIR}:#{DEFAULT_CONFIG_DIR}:ro