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

ssl=true and version is not defined, gives an error #1173

Closed
asusk7m550 opened this issue Nov 2, 2022 · 1 comment · Fixed by #1175
Closed

ssl=true and version is not defined, gives an error #1173

asusk7m550 opened this issue Nov 2, 2022 · 1 comment · Fixed by #1175

Comments

@asusk7m550
Copy link

asusk7m550 commented Nov 2, 2022

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: all
  • Ruby: -
  • Distribution: all
  • Module version: v8.0.2

How to reproduce (e.g Puppet code you use)

class { 'elasticsearch' :
  ssl                  => true,
  ca_certificate       => '/path/to/ca.pem',
  certificate          => '/path/to/cert.pem',
  private_key          => '/path/to/key.pem',
  keystore_password    => 'keystorepassword',
}

What are you seeing

When you want SSL enabled and use the default packages from the OS (so not setting a version), there is an error in getting the catalog.

What behaviour did you expect instead

When no version is defined, expect a version of 7 or higher and add the tls_config from that one.

Output log

Evaluation Error: Error while evaluating a Function Call, 'versioncmp' parameter 'a' expects a String value, got Boolean (file: /etc/puppetlabs/code/environments/xxx/modules/elasticsearch/manifests/config.pp, line: 96, column: 11)

Any additional information you'd like to impart

@YokaiRick
Copy link

YokaiRick commented Jan 23, 2023

Hi, thanks this also fixes #1174
At least partly.. shouldn't be the if case not be:

if ($elasticsearch::version == false or versioncmp($elasticsearch::version, '7') >= 0)

cause rn, when i set the version to false, it rolls out the tls config for ela6 and not for ela7

see also here:

What behaviour did you expect instead
When no version is defined, expect a version of 7 or higher and add the tls_config from that one

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

Successfully merging a pull request may close this issue.

3 participants