FAQ
I'm working with the mysql module from puppetforge:
https://forge.puppetlabs.com/puppetlabs/mysql

I'm clearly missing something. I'm trying to work with it on a puppet
master setup. I've used the following in nodes.pp

This simple example (using the riak module) works fine:

node /^qcriak.example.com/ inherits default {
   include riak_other
   class {'riak':
     version => '1.3.1',
   }
}

This rather more complex example doesn't work, and I'm missing something:

node /^qczabbix.example.com/ inherits default {
   class {'mysql::server':
     package_name => 'mysql55-server',
     config_hash => { 'root_password' => 'root_password' },
   }
   class { 'mysql::db':
     title => 'zabbix',
     user => 'zabbix',
     password => 'zabbix_password',
     host => 'localhost',
     grant => ['all'],
   }
   include zabbix_users
   include zabbix_server
}

The error I'm seeing is this (on qczabbix.example.com):

[root@qczabbix ~]# puppet agent -t
Notice: Ignoring --listen on onetime run
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/twc_base_facts.rb
Error: Could not retrieve catalog from remote server: Error 400 on
SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError:
Could not find declared class mysql::db at
/etc/puppet/manifests/nodes.pp:69 on node qczabbix4b00.aws.weather.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

What am I missing? The /etc/puppet/module/mysql/manifests/db.pp file
exists... and has the right permissions.

--Jason

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Ryan Coleman at Jun 11, 2013 at 8:52 pm

    On Tue, Jun 11, 2013 at 1:33 PM, Jason Price wrote:

    What am I missing? The /etc/puppet/module/mysql/manifests/db.pp file
    exists... and has the right permissions.
    Hi Jason,

    mysql::db is a defined resource type, not a class as you've declared it.
    Declare it like you would any other resource type, either in your node
    definition or perhaps more appropriately, within the class that needs the
    database.

    mysql::db { 'title':
       key => value,
    }

    I've made a note that the documentation could be more clear about this.
    Hope this helps you get back on track.

    --
    Ryan Coleman | Modules & Forge | @ryanycoleman | ryancoleman in #puppet

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jason Price at Jun 12, 2013 at 12:38 am
    THANK YOU!

    I was entirely missing that distinction.

    FWIW, here's the 'corrected' version of the above nodes.pp file example:

    node /^qczabbix.example.com/ inherits default {
       class {'mysql::server':
         package_name => 'mysql55-server',
         config_hash => { 'root_password' => 'root_password' },
       }
       mysql::db { 'zabbix':
         user => 'zabbix',
         password => 'zabbix_password',
         host => 'localhost',
         grant => ['all'],
       }
       include zabbix_users
       include zabbix_server
    }

    --Jason
    On Tue, Jun 11, 2013 at 4:52 PM, Ryan Coleman wrote:
    On Tue, Jun 11, 2013 at 1:33 PM, Jason Price wrote:

    What am I missing? The /etc/puppet/module/mysql/manifests/db.pp file
    exists... and has the right permissions.

    Hi Jason,

    mysql::db is a defined resource type, not a class as you've declared it.
    Declare it like you would any other resource type, either in your node
    definition or perhaps more appropriately, within the class that needs the
    database.

    mysql::db { 'title':
    key => value,
    }

    I've made a note that the documentation could be more clear about this. Hope
    this helps you get back on track.

    --
    Ryan Coleman | Modules & Forge | @ryanycoleman | ryancoleman in #puppet


    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJun 11, '13 at 8:47p
activeJun 12, '13 at 12:38a
posts3
users2
websitepuppetlabs.com

2 users in discussion

Jason Price: 2 posts Ryan Coleman: 1 post

People

Translate

site design / logo © 2021 Grokbase