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

Check Elasticsearch connection before setup:install #326

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

requix
Copy link
Contributor

@requix requix commented Oct 17, 2020

There is no sense to continue installation process in case when Elasticsearch service isn't available.
We will try to connect every 5 sec during next 30 sec. And script is stopped if it's unsuccessful.

This helps to prevent failed Magento installation in next cases:

  1. Elasticsearch container is running, however Elasticsearch service isn't ready
  2. Elasticsearch container was killed because of RAM issues.

So we can detect Elasticsearch issues on early stage.

Otherwise, we will see an error during installation:
Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

@rangerz
Copy link
Contributor

rangerz commented Oct 17, 2020

until statement seems unable printf dot(...) within processing...

until sleep 10; do
    printf '.'
    sleep 1
done

@requix
Copy link
Contributor Author

requix commented Oct 18, 2020

@rangerz, in your example commands inside loop will be never executed. If you would like to test until statement, try this code: timeout 10 bash -c "until false; do printf '.'; sleep 1; done"

@markshust markshust merged commit 72b3351 into markshust:master Jan 29, 2021
@markshust
Copy link
Owner

Thanks a bunch, merged in. I'll do some testing before tagging new version 35.0.0 but looks good.

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

3 participants