Merge "Gate: fix multinode support for running outside of zuul"
This commit is contained in:
commit
c4c1b937dd
@ -15,7 +15,8 @@ sudo chmod 777 --recursive ${LOGS_DIR}/*
|
||||
|
||||
mkdir -p ${LOGS_DIR}/k8s
|
||||
for OBJECT_TYPE in nodes \
|
||||
namespace; do
|
||||
namespace \
|
||||
storageclass; do
|
||||
kubectl get ${OBJECT_TYPE} -o yaml > ${LOGS_DIR}/k8s/${OBJECT_TYPE}.yaml
|
||||
done
|
||||
kubectl describe nodes > ${LOGS_DIR}/k8s/nodes.txt
|
||||
|
@ -54,8 +54,8 @@ function kube_wait_for_nodes {
|
||||
end=$((end + 180))
|
||||
fi
|
||||
while true; do
|
||||
NUMBER_OF_NODES_EXPECTED=$1
|
||||
NUMBER_OF_NODES=$(kubectl get nodes --no-headers -o name | wc -l)
|
||||
NUMBER_OF_NODES_EXPECTED=$(($(cat /etc/nodepool/sub_nodes_private | wc -l) + 1))
|
||||
[ $NUMBER_OF_NODES -eq $NUMBER_OF_NODES_EXPECTED ] && \
|
||||
NODES_ONLINE="True" || NODES_ONLINE="False"
|
||||
while read SUB_NODE; do
|
||||
|
@ -16,6 +16,7 @@ set -ex
|
||||
: ${SSH_PRIVATE_KEY:="/etc/nodepool/id_rsa"}
|
||||
: ${PRIMARY_NODE_IP:="$(cat /etc/nodepool/primary_node_private | tail -1)"}
|
||||
: ${SUB_NODE_IPS:="$(cat /etc/nodepool/sub_nodes_private)"}
|
||||
export SUB_NODE_COUNT="$(($(echo ${SUB_NODE_IPS} | wc -w) + 1))"
|
||||
|
||||
sudo chown $(whoami) ${SSH_PRIVATE_KEY}
|
||||
sudo chmod 600 ${SSH_PRIVATE_KEY}
|
||||
@ -40,7 +41,7 @@ bash ${SUB_NODE_PROVISION_SCRIPT}
|
||||
rm -rf ${SUB_NODE_PROVISION_SCRIPT}
|
||||
|
||||
source ${WORK_DIR}/tools/gate/funcs/kube.sh
|
||||
kube_wait_for_nodes 240
|
||||
kube_wait_for_nodes ${SUB_NODE_COUNT} 240
|
||||
kube_wait_for_pods kube-system 240
|
||||
kube_wait_for_pods openstack 240
|
||||
kubectl get nodes --show-all
|
||||
|
Loading…
Reference in New Issue
Block a user