Extend timeout for the kubectl cmds in dbmon
In AIO-DX, during the swact, dbmon experiences kubectl commands respond slower than expected. dbmon reports error while the kubectl commands not responding within 5 seconds, the 5 seconds timeout is too short. Extend the timeout to 10 seconds, to avoid reporting unnecessary error. This changes originally merged into master from review below. https://review.opendev.org/#/c/680499/ Note that the file has been reloacated in the master branch. Change-Id: I243a751437e7e2910f0fb3ae31b2facc4b7b74ab Closes-Bug: 1837919 Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
parent
138a38449a
commit
2b42ddf7d1
|
@ -111,7 +111,7 @@ debuginfo() {
|
|||
APP_STATUS='uninstalled'
|
||||
|
||||
# Check whether kubectl is working.
|
||||
timeout -k 5 5 kubectl get node ${HOSTNAME} &> /dev/null
|
||||
timeout -k 10 10 kubectl get node ${HOSTNAME} &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
ocf_log info "kubectl isn't working."
|
||||
STATUS="Primary"
|
||||
|
@ -174,7 +174,7 @@ get_pod_and_status() {
|
|||
# The "timeout" call is in case we're in the middle of swacting and kubectl
|
||||
# isn't responding, in which case the audit should catch any issues.
|
||||
|
||||
PODNAME=`timeout -k 5 5 kubectl -n openstack get pod --field-selector spec.nodeName=${HOSTNAME} \
|
||||
PODNAME=`timeout -k 10 10 kubectl -n openstack get pod --field-selector spec.nodeName=${HOSTNAME} \
|
||||
-l application=mariadb,component=server -o=jsonpath='{.items[0].metadata.name'}`
|
||||
if [ $? -ne 0 ]; then
|
||||
ocf_log info "Error getting mariadb server pod name on this node."
|
||||
|
|
Loading…
Reference in New Issue