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

REOPEN: does not handle database host correctly #572

Closed
yfried opened this issue Jun 26, 2019 · 3 comments
Closed

REOPEN: does not handle database host correctly #572

yfried opened this issue Jun 26, 2019 · 3 comments

Comments

@yfried
Copy link

yfried commented Jun 26, 2019

I'm hitting the same issue as in #255.
Also, the workaround described doesn't work for me, as mysql client fails to connect:

Error: 'mysql -h '-:"database"' -P '3306' -u 'icinga2' 'icinga2core' < '/usr/share/icinga2-ido-mysql/schema/mysql.sql'' returned 1 instead of one of [0]
Error: /Stage[main]/Icinga2::Feature::Idomysql/Exec[idomysql-import-schema]/returns: change from 'notrun' to ['0'] failed: 'mysql -h '-:"database"' -P '3306' -u 'icinga2' 'icinga2core' < '/usr/share/icinga2-ido-mysql/schema/mysql.sql'' returned 1 instead of one of [0]

Your Environment

  • Module version (puppet module list):

icinga-icinga2 (v1.3.6)
icinga-icingaweb2 (v2.2.0)

  • Puppet version (puppet -V):

Puppet v5.5.1

  • Operating System and version:

Ubuntu 16.04.4 LTS

@lbetz
Copy link
Member

lbetz commented Jul 11, 2019

Ok, I see the problem... -: takes care if the string is used as parameter of an Icinga object but not if we use it to connect a database.

The quick fix was to use the IP not use -: notation.

@lbetz
Copy link
Member

lbetz commented Jul 11, 2019

You use puppet v5.5.1, please update to the current puppet-icinga2 version.

@lbetz
Copy link
Member

lbetz commented Jul 11, 2019

You must not use any of the object attributes to assign as a string to an attribute. All this is parsed as unquoted. If you'd use the fqdn it'll work fine with the current version of this module.

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

No branches or pull requests

2 participants