git am failed, would you rebase to latest HEAD?
Thanks, Fengguang
On Thu, Oct 22, 2020 at 11:49:40AM +0800, Zhang Yale wrote:
[why] Provide a login port for users by email, determine whether to send the ssh_port message based on the "pub_key".
Signed-off-by: Zhang Yale zhangyale3@huawei.com
daemon/sshd | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/daemon/sshd b/daemon/sshd index cd57be4f..1ebc9d00 100755 --- a/daemon/sshd +++ b/daemon/sshd @@ -1,16 +1,16 @@ #!/bin/sh # pub_key # my_email -# my_uuid -# ssh_port_len -# ssh_port_base +# sshr_port +# sshr_port_len +# sshr_port_base
. $LKP_SRC/lib/http.sh
sshr_ip=$LKP_SERVER -sshr_port=5050 -[ -n "$ssh_port_len" ] || ssh_port_len=2000 -[ -n "$ssh_port_base" ] || ssh_port_base=50000 +[ -n "$sshr_port" ] || sshr_port=5050 +[ -n "$sshr_port_len" ] || sshr_port_len=2000 +[ -n "$sshr_port_base" ] || sshr_port_base=50000
run_ssh() { @@ -23,6 +23,7 @@ run_ssh()
data_success() {
- deadline=$(date -d "+$runtime seconds" +"%Y-%m-%d %H:%M:%S") data="To: $my_email
Subject: [NOTIFY Compass-ci] $testbox ready to use
@@ -43,7 +44,7 @@ Dear $my_username: $os $os_version $os_arch
Regards -Compass-ci +Compass-Ci " }
@@ -54,10 +55,10 @@ Subject: [NOTIFY Compass-ci] Applying $testbox failed
Dear $my_username: Sorry to inform you that your application failed.
- You may need to wait for a while and then try again.
- You may need to wait a moment, or check whether your pub_key exists.
Regards -Compass-ci +Compass-Ci " }
@@ -73,11 +74,11 @@ compose_email()
set_port() {
- [ -n "$my_uuid" ] || return
[ -n "$pub_key" ] || return
for i in $(seq 1 10) do
port=$(($(date +%s%N)%"$ssh_port_len"+"$ssh_port_base"))
ssh -o StrictHostKeyChecking=no -o ExitOnForwardFailure=yes -o TCPKeepAlive=yes \ -Nf -R $port:localhost:22 sshr@"$sshr_ip" -p "$sshr_port" &>/dev/null [ $? -eq 0 ] && returnport=$(($(date +%s%N)%"$sshr_port_len"+"$sshr_port_base"))
@@ -87,7 +88,7 @@ set_port()
run_email() {
- [ -n "$my_email" ] && [ -n "$my_uuid" ] || return 0
- [ -n "$my_email" ] || return 0 my_username=$(echo "$my_email" | awk -F '@' '{print $1}') compose_email curl -XPOST "${MAIL_HOST:-$LKP_SERVER}:${MAIL_PORT:-11312}/send_mail_text" -d "$data"
-- 2.23.0