devstack: Have controller wait for K8s API
There could be cases, like for example when reusing existing K8s services where the wait_for K8s API has not run at all before the controller is run. This would end up in a controller failure, so we address it here. Change-Id: Id3946e8b970a1506d70d6448cc1667fb87415134 Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
This commit is contained in:
parent
b1da475537
commit
1ff372cf63
@ -428,6 +428,14 @@ function run_k8s_kubelet {
|
||||
run_process kubelet "$command"
|
||||
}
|
||||
|
||||
function run_kuryr_kubernetes {
|
||||
wait_for "Kubernetes API Server" "$KURYR_K8S_API_URL"
|
||||
run_process kuryr-kubernetes \
|
||||
"python ${KURYR_HOME}/scripts/run_server.py \
|
||||
--config-file $KURYR_CONFIG"
|
||||
}
|
||||
|
||||
|
||||
# main loop
|
||||
if is_service_enabled kuryr-kubernetes; then
|
||||
if [[ "$1" == "stack" && "$2" == "install" ]]; then
|
||||
@ -489,9 +497,7 @@ if is_service_enabled kuryr-kubernetes; then
|
||||
run_k8s_kubelet
|
||||
fi
|
||||
|
||||
run_process kuryr-kubernetes \
|
||||
"python ${KURYR_HOME}/scripts/run_server.py \
|
||||
--config-file $KURYR_CONFIG"
|
||||
run_kuryr_kubernetes
|
||||
fi
|
||||
|
||||
if [[ "$1" == "unstack" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user