Mohamed Zied TLILI
2012-May-15 16:48 UTC
[Puppet Users] Puppet master errors with stored configurations : sqlite3 instead of mysql
Hi all, I have configured Puppet master to use *stored configurations with Mysql*, but when i run the agent, it looks like using sqlite3 instead of mysql : # puppet agent --test *err: Could not retrieve catalog from remote server: Error 400 on SERVER: Got 1 failure(s) while initializing: change from 0644 to 0660 failed: failed to set mode 644 on /var/lib/puppet/state/clientconfigs.sqlite3: Operation not permitted - /var/lib/puppet/state/clientconfigs.sqlite3* warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run* * Here is the error from puppetmaster log : *puppet-master[32559]: (/File[/var/lib/puppet/state/clientconfigs.sqlite3]/mode) change from 0644 to 0660 failed: failed to set mode 644 on /var/lib/puppet/state/clientconfigs.sqlite3: Operation not permitted - /var/lib/puppet/state/clientconfigs.sqlite3* *puppet-master[32559]: Cached catalog for xxxx failed: Got 1 failure(s) while initializing: change from 0644 to 0660 failed: failed to set mode 644 on /var/lib/puppet/state/clientconfigs.sqlite3: Operation not permitted - /var/lib/puppet/state/clientconfigs.sqlite3* i dont know why puppet try to modify this file "/var/lib/puppet/state/clientconfigs.sqlite3" since i''m using stored configurations with Mysql. So how to solve/debug this problem ? I have installed version 2.7 of Puppet : # puppetmasterd -V 2.7.13 here is my puppet.conf : [main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter templatedir=$confdir/templates prerun_command=/etc/puppet/etckeeper-commit-pre postrun_command=/etc/puppet/etckeeper-commit-post [master] certname=im1a9.internetmemory.org reports=http,store,tagmail,foreman storeconfigs = true dbadapter = *mysql* dbuser = puppet dbname = puppet dbpassword = xxxx dbserver = localhost dbsocket = /var/run/mysqld/mysqld.sock downcasefacts = true # These are needed when the puppetmaster is run by passenger # and can safely be removed if webrick is used. ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY Regards, -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/6tN8xBwlx1EJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
DieZ
2012-May-16 15:24 UTC
[Puppet Users] Re: Puppet master errors with stored configurations : sqlite3 instead of mysql
Hello, I''ve done some more research, so i tried to show all config settings and I found the unexpected result : : # puppet --configprint all ... storeconfigs = false dbadapter = sqlite3 dblocation = /var/lib/puppet/state/clientconfigs.sqlite3 ... As said in my previous post, i''ve already configured the master for stored configurations for MySQL : [master] ... storeconfigs=true dbadapter=mysql ... so why Puppet Master does not apply my changes ? info. : puppetmaster is running under mod passenger (libapache2-mod-passenger 2.2.11debian-2) Thanks, -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/n11lOv0NTJEJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Gary Larizza
2012-May-16 15:29 UTC
Re: [Puppet Users] Re: Puppet master errors with stored configurations : sqlite3 instead of mysql
Try the following: puppet config print dbadapter --mode master That will print out the configuration item of dbadapter as the MASTER knows it. You can use --mode master or agent to check those configuration items from the context of Puppet running as an agent or as a master (the way you ran it most likely output puppet.conf settings from the context of the agent) On Wed, May 16, 2012 at 8:24 AM, DieZ <mzt.tlili@gmail.com> wrote:> Hello, > > I''ve done some more research, so i tried to show all config settings and I > found the unexpected result : : > > # puppet --configprint all > ... > storeconfigs = false > dbadapter = sqlite3 > dblocation = /var/lib/puppet/state/clientconfigs.sqlite3 > ... > > > As said in my previous post, i''ve already configured the master for stored > configurations for MySQL : > > [master] > ... > storeconfigs=true > dbadapter=mysql > ... > > > so why Puppet Master does not apply my changes ? > > info. : puppetmaster is running under mod passenger > (libapache2-mod-passenger 2.2.11debian-2) > > Thanks, > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/n11lOv0NTJEJ. > > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- Gary Larizza Professional Services Engineer Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
DieZ
2012-May-16 15:39 UTC
Re: [Puppet Users] Re: Puppet master errors with stored configurations : sqlite3 instead of mysql
thanks for the quick reply, it shows the correct value (mysql) # puppet config print dbadapter --mode master mysql so why it uses SQLite3 if everything is configured correctly for using MySQL ? puppet-master[28784]: (/File[/var/lib/puppet/state/clientconfigs.sqlite3]/mode) change from 0644 to 0660 failed: failed to set mode 644 on /var/lib/puppet/state/clientconfigs.sqlite3: Operation not permitted - /var/lib/puppet/state/clientconfigs.sqlite3 On Wednesday, May 16, 2012 4:29:32 PM UTC+1, Gary Larizza wrote:> > Try the following: > > puppet config print dbadapter --mode master > > That will print out the configuration item of dbadapter as the MASTER > knows it. You can use --mode master or agent to check those configuration > items from the context of Puppet running as an agent or as a master (the > way you ran it most likely output puppet.conf settings from the context of > the agent) > > > -- > > Gary Larizza > Professional Services Engineer > Puppet Labs > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/QfK_PhGPEvsJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Gary Larizza
2012-May-16 15:44 UTC
Re: [Puppet Users] Re: Puppet master errors with stored configurations : sqlite3 instead of mysql
Did you restart your puppet master after you setup storeconfigs? Did the DB get created? On Wed, May 16, 2012 at 8:39 AM, DieZ <mzt.tlili@gmail.com> wrote:> thanks for the quick reply, > > it shows the correct value (mysql) > > # puppet config print dbadapter --mode master > mysql > > > so why it uses SQLite3 if everything is configured correctly for using > MySQL ? > > puppet-master[28784]: > (/File[/var/lib/puppet/state/clientconfigs.sqlite3]/mode) change from 0644 > to 0660 failed: failed to set mode 644 on > /var/lib/puppet/state/clientconfigs.sqlite3: Operation not permitted - > /var/lib/puppet/state/clientconfigs.sqlite3 > > > > > On Wednesday, May 16, 2012 4:29:32 PM UTC+1, Gary Larizza wrote: > >> Try the following: >> >> puppet config print dbadapter --mode master >> >> That will print out the configuration item of dbadapter as the MASTER >> knows it. You can use --mode master or agent to check those configuration >> items from the context of Puppet running as an agent or as a master (the >> way you ran it most likely output puppet.conf settings from the context of >> the agent) >> >> >> -- >> >> Gary Larizza >> Professional Services Engineer >> Puppet Labs >> >> -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/QfK_PhGPEvsJ. > > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- Gary Larizza Professional Services Engineer Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
DieZ
2012-May-16 15:53 UTC
Re: [Puppet Users] Re: Puppet master errors with stored configurations : sqlite3 instead of mysql
Yes, the databse is created : mysql> show tables; +------------------+ | Tables_in_puppet | +------------------+ | fact_names | | fact_values | | hosts | | inventory_facts | | inventory_nodes | | param_names | | param_values | | puppet_tags | | resource_tags | | resources | | source_files | +------------------+ I''m using Passenger, so there is no need to restart puppet master (according to http://projects.puppetlabs.com/projects/1/wiki/Using_Passenger) On Wednesday, May 16, 2012 4:44:32 PM UTC+1, Gary Larizza wrote:> > Did you restart your puppet master after you setup storeconfigs? Did the > DB get created? > > On Wed, May 16, 2012 at 8:39 AM, DieZ <xxx@gmail.com> wrote: > >> thanks for the quick reply, >> >> it shows the correct value (mysql) >> >> # puppet config print dbadapter --mode master >> mysql >> >> >> so why it uses SQLite3 if everything is configured correctly for using >> MySQL ? >> >> puppet-master[28784]: >> (/File[/var/lib/puppet/state/clientconfigs.sqlite3]/mode) change from 0644 >> to 0660 failed: failed to set mode 644 on >> /var/lib/puppet/state/clientconfigs.sqlite3: Operation not permitted - >> /var/lib/puppet/state/clientconfigs.sqlite3 >> >> >> >> >> On Wednesday, May 16, 2012 4:29:32 PM UTC+1, Gary Larizza wrote: >> >>> Try the following: >>> >>> puppet config print dbadapter --mode master >>> >>> That will print out the configuration item of dbadapter as the MASTER >>> knows it. You can use --mode master or agent to check those configuration >>> items from the context of Puppet running as an agent or as a master (the >>> way you ran it most likely output puppet.conf settings from the context of >>> the agent) >>> >>> >>> -- >>> >>> Gary Larizza >>> Professional Services Engineer >>> Puppet Labs >>> >> >> > > > -- > > Gary Larizza > Professional Services Engineer > Puppet Labs > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/fC7GfRO7WWIJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Paul Tötterman
2012-May-18 11:08 UTC
Re: [Puppet Users] Re: Puppet master errors with stored configurations : sqlite3 instead of mysql
> > I''m using Passenger, so there is no need to restart puppet master > (according to > http://projects.puppetlabs.com/projects/1/wiki/Using_Passenger) >Did you restart your webserver then? Or redeploy the passenger app http://modrails.com/documentation/Users%20guide%20Nginx.html#_redeploying_restarting_the_ruby_on_rails_application ? Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/iZnhsUZrP1YJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
DieZ
2012-May-18 12:49 UTC
Re: [Puppet Users] Re: Puppet master errors with stored configurations : sqlite3 instead of mysql
thx Paul, restarting apache has resolved this issue , have a nice day ;) Le vendredi 18 mai 2012 12:08:47 UTC+1, Paul Tötterman a écrit :> > I''m using Passenger, so there is no need to restart puppet master >> (according to >> http://projects.puppetlabs.com/projects/1/wiki/Using_Passenger) >> > > Did you restart your webserver then? Or redeploy the passenger app > http://modrails.com/documentation/Users%20guide%20Nginx.html#_redeploying_restarting_the_ruby_on_rails_application > ? > > Cheers, > Paul >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/qcL49lDCODUJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.