when the external ip address of host is the same as the srv_http_host, the host can not use the url to get result. --- lib/monitor.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/monitor.rb b/lib/monitor.rb index 9091c92a9..82e48c3e6 100755 --- a/lib/monitor.rb +++ b/lib/monitor.rb @@ -107,9 +107,7 @@ class Monitor
def lftp_mirror @result_root.delete_prefix!('/srv') - srv_http_host = job['SRV_HTTP_HOST'] || 'api.compass-ci.openeuler.org' - srv_http_port = job['SRV_HTTP_PORT'] || '11300' - url = "http://#%7Bsrv_http_host%7D:#%7Bsrv_http_port%7D#%7B@result_root%7D" + url = "http://api.compass-ci.openeuler.org:11300#%7B@result_root%7D" system "lftp -c mirror #{url} >/dev/null 2>&1" end
Please keep SRV_HTTP_HOST/PORT.
On Thu, Jan 28, 2021 at 03:38:17PM +0800, Li Ping wrote:
when the external ip address of host is the same as the srv_http_host, the host can not use the url to get result.
lib/monitor.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/monitor.rb b/lib/monitor.rb index 9091c92a9..82e48c3e6 100755 --- a/lib/monitor.rb +++ b/lib/monitor.rb @@ -107,9 +107,7 @@ class Monitor
def lftp_mirror @result_root.delete_prefix!('/srv')
- srv_http_host = job['SRV_HTTP_HOST'] || 'api.compass-ci.openeuler.org'
- srv_http_port = job['SRV_HTTP_PORT'] || '11300'
- url = "http://#%7Bsrv_http_host%7D:#%7Bsrv_http_port%7D#%7B@result_root%7D"
- url = "http://api.compass-ci.openeuler.org:11300#%7B@result_root%7D" system "lftp -c mirror #{url} >/dev/null 2>&1" end
-- 2.23.0
On Thu, Jan 28, 2021 at 04:41:41PM +0800, Wu Fengguang wrote:
Please keep SRV_HTTP_HOST/PORT.
but I have given the reason why i want to change it. I request the result via http, so it is not unreasonable to use the domain name directly. right?
On Thu, Jan 28, 2021 at 03:38:17PM +0800, Li Ping wrote:
when the external ip address of host is the same as the srv_http_host, the host can not use the url to get result.
lib/monitor.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/monitor.rb b/lib/monitor.rb index 9091c92a9..82e48c3e6 100755 --- a/lib/monitor.rb +++ b/lib/monitor.rb @@ -107,9 +107,7 @@ class Monitor
def lftp_mirror @result_root.delete_prefix!('/srv')
- srv_http_host = job['SRV_HTTP_HOST'] || 'api.compass-ci.openeuler.org'
- srv_http_port = job['SRV_HTTP_PORT'] || '11300'
- url = "http://#%7Bsrv_http_host%7D:#%7Bsrv_http_port%7D#%7B@result_root%7D"
- url = "http://api.compass-ci.openeuler.org:11300#%7B@result_root%7D" system "lftp -c mirror #{url} >/dev/null 2>&1" end
-- 2.23.0