зеркало из https://github.com/microsoft/pai.git
limit PAI worker daemon port range (#4546)
refer to issue #4384. Work host daemon may use port range which overlap PAI job port range. Change the work node port range to avoid conflict.
This commit is contained in:
Родитель
a2acd37144
Коммит
0f05a1772b
|
@ -56,6 +56,8 @@ ansible-playbook -i ${HOME}/pai-deploy/cluster-cfg/hosts.yml drivers-install.yml
|
|||
|
||||
ansible-playbook -i ${HOME}/pai-deploy/cluster-cfg/hosts.yml docker-runtime-setup.yml || exit $?
|
||||
|
||||
ansible-playbook -i ${HOME}/pai-deploy/cluster-cfg/hosts.yml set-host-daemon-port-range.yml || exit $?
|
||||
|
||||
/bin/bash requirement.sh -m ${MASTER_LIST} -w ${WORKER_LIST} -c ${CLUSTER_CONFIG} || exit $?
|
||||
|
||||
/bin/bash script/kubernetes-boot.sh || exit $?
|
||||
|
|
|
@ -67,4 +67,10 @@ docker_image_tag: <% latest-release %>
|
|||
|
||||
# openpai_kubespray_extra_var:
|
||||
# kay: value
|
||||
# key: value
|
||||
# key: value
|
||||
|
||||
#######################################################################
|
||||
# host daemon port setting #
|
||||
#######################################################################
|
||||
# host_daemon_port_start: 40000
|
||||
# host_daemon_port_end: 65535
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
while getopts "c:" opt; do
|
||||
case $opt in
|
||||
c)
|
||||
CLUSTER_CONFIG=$OPTARG
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "cluster config file path: ${CLUSTER_CONFIG}"
|
||||
|
||||
ABS_CONFIG_PATH="$(echo ${CLUSTER_CONFIG})"
|
||||
echo "Config path is: ${ABS_CONFIG_PATH}"
|
||||
ansible-playbook -i ${HOME}/pai-pre-check/pre-check.yml set-host-daemon-port-range.yaml -e "@${ABS_CONFIG_PATH}"
|
||||
ret_code_check=$?
|
||||
|
||||
if [ $ret_code_check -eq 0 ]
|
||||
then
|
||||
echo "Preinstall script finished succssfully"
|
||||
else
|
||||
echo "Preinstall script exited with error"
|
||||
exit $ret_code_check
|
||||
fi
|
|
@ -50,6 +50,8 @@ ansible all -i ${HOME}/pai-deploy/cluster-cfg/hosts.yml -m ping || exit $?
|
|||
|
||||
/bin/bash requirement.sh -m ${MASTER_LIST} -w ${WORKER_LIST} -c ${CLUSTER_CONFIG} || exit $?
|
||||
|
||||
/bin/bash preinstall.sh -c ${CLUSTER_CONFIG} || exit $?
|
||||
|
||||
/bin/bash script/kubernetes-boot.sh || exit $?
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
host_daemon_port_start: 40000
|
||||
host_daemon_port_end: 65535
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: "Set host daemon port range"
|
||||
sysctl:
|
||||
name: net.ipv4.ip_local_port_range
|
||||
value: "{{ host_daemon_port_start }} {{ host_daemon_port_end }}"
|
||||
state: present
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
- hosts: gpu
|
||||
become: true
|
||||
become_user: root
|
||||
gather_facts: true
|
||||
roles:
|
||||
- { role: port }
|
Загрузка…
Ссылка в новой задаче