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

Lazily evaluate ES version detection code #1300

Merged
merged 2 commits into from
Jun 14, 2017
Merged

Conversation

stevendanna
Copy link
Contributor

When running against chef-backend, the external elasticsearch node is proxies by HAProxy, which is started by Chef Server. Thus, we need to make sure the ES version detection code runs at compile-time to avoid it getting ECONNREFUSED.

@stevendanna
Copy link
Contributor Author

@Sgtpluck Thanks for getting this started! You'll need to add the DCO Sign-off to your commit. See here for details: https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco

Copy link
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

LGTM (with DCO fixed)

@Sgtpluck Sgtpluck force-pushed the dm/lazy-elasticsearch branch from de0b955 to bba2432 Compare June 12, 2017 16:26
:helper => OmnibusHelper.new(node)))
:helper => OmnibusHelper.new(node))
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If the thing on line 51 is a hash, I think the curly brackets on lines 50 and 61 are unnecessary.

Minor fixup to ensure elastic_search_major_version is called inside
the lazy block.

Signed-off-by: Steven Danna <[email protected]>
@srenatus srenatus merged commit 9421ad9 into master Jun 14, 2017
@stevendanna stevendanna deleted the dm/lazy-elasticsearch branch June 14, 2017 07:59
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.

4 participants