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

Add connection timeout to job submitter script #146

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

metowolf
Copy link
Contributor

When deploying a new cluster, the submitter is hanging by curl -sS "http://jobmanager:8081/jobs" for a long time until the default timeout of 120s because the jobmanager is not yet ready.

Adding --connect-timeout <seconds> to solve this problem.

Copy link
Contributor

@regadas regadas left a comment

Choose a reason for hiding this comment

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

Thanks @metowolf !

local success_count=0

echo_log "Checking job manager to be ready. Will check success of ${REQUIRED_SUCCESS_NUMBER} API calls for stable job submission." "job_check_log"
for ((i = 1; i <= MAX_RETRY; i++)); do
echo_log "curl -sS \"http://${FLINK_JM_ADDR}/jobs\"" "job_check_log"
if curl -sS "http://${FLINK_JM_ADDR}/jobs" 2>&1 | tee -a job_check_log; then
if curl -sS --connect-timeout ${CONNECT_TIMEOUT} "http://${FLINK_JM_ADDR}/jobs" 2>&1 | tee -a job_check_log; then
Copy link
Contributor

Choose a reason for hiding this comment

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

We should definitely replace this logic with proper curl retry since it supports it nicely. This is for a follow up PR

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.

None yet

2 participants