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

Exec[zabbix_server_create.sql] does not work because is might come after Package[zabbix-server-mysql #505

Closed
stefanandres opened this issue Jun 20, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@stefanandres
Copy link
Contributor

stefanandres commented Jun 20, 2018

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.1
  • Distribution: ubuntu-16.04
  • Module version: 6.3.1

Puppet fails with

       Notice: /Stage[main]/Zabbix::Database::Mysql/Exec[zabbix_server_create.sql]/returns: /bin/sh: 1: cd: can't cd to /usr/share/doc/zabbix-*-mysql*
       Error: 'cd /usr/share/doc/zabbix-*-mysql* && if [ -f create.sql.gz ]; then gunzip -f create.sql.gz ; fi && mysql -h '127.0.0.1' -u 'zabbix_server' -p'test1234' -D 'zabbix_server' < create.sql && touch /etc/zabbix/.schema.done' returned 2 instead of one of [0]
       Error: /Stage[main]/Zabbix::Database::Mysql/Exec[zabbix_server_create.sql]/returns: change from 'notrun' to ['0'] failed: 'cd /usr/share/doc/zabbix-*-mysql* && if [ -f create.sql.gz ]; then gunzip -f create.sql.gz ; fi && mysql -h '127.0.0.1' -u 'zabbix_server' -p'test1234' -D 'zabbix_server' < create.sql && touch /etc/zabbix/.schema.done' returned 2 instead of one of [0]

because the package might be installed afterwards:

       Notice: /Stage[main]/Zabbix::Server/Package[zabbix-server-mysql]/ensure: created

https://github.com/voxpupuli/puppet-zabbix/blob/master/manifests/database/mysql.pp#L78 is missing requires for this package.

@stefanandres
Copy link
Contributor Author

Fixed with #508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants