Puppet master errors with stored configurations : sqlite3 instead of mysql

465 views
Skip to first unread message

Mohamed Zied TLILI

unread,
May 15, 2012, 12:48:37 PM5/15/12
to puppet...@googlegroups.com
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]
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,

DieZ

unread,
May 16, 2012, 11:24:13 AM5/16/12
to puppet...@googlegroups.com
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,

Gary Larizza

unread,
May 16, 2012, 11:29:32 AM5/16/12
to puppet...@googlegroups.com
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)


--
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...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@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

DieZ

unread,
May 16, 2012, 11:39:40 AM5/16/12
to puppet...@googlegroups.com
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

unread,
May 16, 2012, 11:44:32 AM5/16/12
to puppet...@googlegroups.com
Did you restart your puppet master after you setup storeconfigs?  Did the DB get created?

--
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...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

DieZ

unread,
May 16, 2012, 11:53:42 AM5/16/12
to puppet...@googlegroups.com
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?

Paul Tötterman

unread,
May 18, 2012, 7:08:47 AM5/18/12
to puppet...@googlegroups.com
I'm using Passenger, so there is no need to restart puppet master (according to http://projects.puppetlabs.com/projects/1/wiki/Using_Passenger)


Cheers,
Paul 

DieZ

unread,
May 18, 2012, 8:49:27 AM5/18/12
to puppet...@googlegroups.com
thx Paul, restarting apache has resolved this issue ,

have a nice day ;)
Reply all
Reply to author
Forward
0 new messages