Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hack-scripts] Add waiting for bookinfo app before the traffic genera… #7544

Draft
wants to merge 1 commit into
base: v1.73
Choose a base branch
from

Conversation

mkralik3
Copy link
Contributor

Describe the change

The traffic generator is installed right after bookinfo app, however, it doesn't wait till bookinfo app is ready. So, if it takes longer (e.g. cluster is still pulling the images), the traffic generator starts sending requests to the app that is not ready. So results in the traffic generator contain 503 errors

@mkralik3 mkralik3 marked this pull request as draft July 17, 2024 13:57
Comment on lines +433 to +440
# # Do not create traffic generator until all pods are ready
echo "Waiting till all pods are ready before installing the traffic generator"
$CLIENT_EXE -n ${NAMESPACE} wait --for condition=Available deployment/details-v1 --timeout=5m
$CLIENT_EXE -n ${NAMESPACE} wait --for condition=Available deployment/productpage-v1 --timeout=5m
$CLIENT_EXE -n ${NAMESPACE} wait --for condition=Available deployment/ratings-v1 --timeout=5m
$CLIENT_EXE -n ${NAMESPACE} wait --for condition=Available deployment/reviews-v1 --timeout=5m
$CLIENT_EXE -n ${NAMESPACE} wait --for condition=Available deployment/reviews-v2 --timeout=5m
$CLIENT_EXE -n ${NAMESPACE} wait --for condition=Available deployment/reviews-v3 --timeout=5m
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a -wt option - see if you can utilize that. It sets WAIT_TIMEOUT env var.

Sometimes we don't want this script waiting (locally, I often do not, I just want the script to end and I'm ok with traffic gen getting some errors). So we don't want this always blocking. But utilize the -wt option if you want to wait. See https://github.com/kiali/kiali/pull/7544/files#diff-7bca579da46f87d5c671523bb79d7146eee8f84e94114d8fa4aeeacb520c126aR119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants