Browse Source

[fix] Deploy scp-hosts use fullpath avoid dangling (#10249)

This path fix error modify worker application.yaml when
running `scp-hosts.sh` script in different directory. Currently
setting only work when running `scp-hosts.sh` in path
`<DOLPHINSCHEDULER_HOME>/bin` using command `./scp-hosts.sh`.
And will fail when we run script in directory
`<DOLPHINSCHEDULER_HOME>` using command `./bin/scp-hosts.sh`

ref: #10209 and #10208
3.1.0-release
Jiajie Zhong 3 years ago committed by GitHub
parent
commit
58afe5d8b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      script/scp-hosts.sh

4
script/scp-hosts.sh

@ -47,7 +47,7 @@ do
fi fi
done done
# set worker groups in application.yaml # set worker groups in application.yaml
[[ -n ${workerIndex} ]] && sed -i "s/- default/- ${groupNames[$workerIndex]}/" ../worker-server/conf/application.yaml [[ -n ${workerIndex} ]] && sed -i "s/- default/- ${groupNames[$workerIndex]}/" $workDir/../worker-server/conf/application.yaml
for dsDir in bin master-server worker-server alert-server api-server ui tools for dsDir in bin master-server worker-server alert-server api-server ui tools
do do
@ -56,7 +56,7 @@ do
scp -q -P $sshPort -r $workDir/../$dsDir $host:$installPath scp -q -P $sshPort -r $workDir/../$dsDir $host:$installPath
done done
# restore worker groups to default # restore worker groups to default
[[ -n ${workerIndex} ]] && sed -i "s/- ${groupNames[$workerIndex]}/- default/" ../worker-server/conf/application.yaml [[ -n ${workerIndex} ]] && sed -i "s/- ${groupNames[$workerIndex]}/- default/" $workDir/../worker-server/conf/application.yaml
echo "scp dirs to $host/$installPath complete" echo "scp dirs to $host/$installPath complete"
done done

Loading…
Cancel
Save