Issue #12788 has been updated by Satoru KURASHIKI.
Assignee changed from Satoru KURASHIKI to Chris Price
hi,
Chris Price wrote:
> Can you please give a little more context for this issue? Perhaps attach a
> manifest that demonstrates the problem that you are having?
I got an error as follows (on debian squeeze box):
<pre>
root@localhost:~# puppetstoredconfigclean some.host.name
DEPRECATION WARNING: Please update config/database.yml to use 'database'
instead of 'dbfile'. (called from parse_sqlite_config! at
/usr/lib/ruby/1.8/active_record/connection_adapters/sqlite_adapter.rb:35)
/usr/lib/ruby/1.8/sqlite3/errors.rb:62:in `check': could not open database:
unable to open database file (SQLite3::CantOpenException)
from /usr/lib/ruby/1.8/sqlite3/database.rb:79:in `initialize'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/sqlite3_adapter.rb:13:in
`new'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/sqlite3_adapter.rb:13:in
`sqlite3_connection'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:223:in
`send'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:223:in
`new_connection'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:245:in
`checkout_new_connection'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:188:in
`checkout'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:184:in
`loop'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:184:in
`checkout'
from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:183:in
`checkout'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:98:in
`connection'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:326:in
`retrieve_connection'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_specification.rb:123:in
`retrieve_connection'
from
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_specification.rb:115:in
`connection'
from /usr/lib/ruby/1.8/active_record/base.rb:1271:in `columns'
from /usr/lib/ruby/1.8/active_record/base.rb:1284:in `column_names'
from /usr/lib/ruby/1.8/active_record/base.rb:1297:in
`column_methods_hash'
from /usr/lib/ruby/1.8/active_record/base.rb:1986:in
`all_attributes_exists?'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `all?'
from /usr/lib/ruby/1.8/active_record/base.rb:1986:in `each'
from /usr/lib/ruby/1.8/active_record/base.rb:1986:in `all?'
from /usr/lib/ruby/1.8/active_record/base.rb:1986:in
`all_attributes_exists?'
from /usr/lib/ruby/1.8/active_record/base.rb:1842:in `method_missing'
from /usr/sbin/puppetstoredconfigclean:93
from /usr/sbin/puppetstoredconfigclean:92:in `each'
from /usr/sbin/puppetstoredconfigclean:92
</pre>
This error says "sqlite setting is incorrect". But I use mysql in my
puppet.conf, not sqlite.
<pre>
root@localhost:~# cat /etc/puppet/puppet.conf
<snip>
[master]
reports = log
storeconfigs = true
dbadapter = mysql
dbuser = puppet
dbpassword = somepassword
dbserver = localhost
dbsocket = /var/run/mysqld/mysqld.sock
</pre>
So, I have 2 choice.
1. put my puppet.conf where command search by default
1. specify my puppet.conf with --config option
For 1, puppet sets default as:
<pre>
root@localhost:~# puppet --genconfig | grep puppet.conf
# The default value is '$confdir/puppet.conf'.
config = /etc/puppet/puppet.conf
</pre>
Indeed This is the location where my puppet.conf sits. Anyway I
have tried 2, and got the same error as first execution.
I looked puppetstoredconfgclean.rb, and it seems that
at first it loads default puppet config (line 14), and
GetoptLong overrides it when called with "--config" (line 34).
At this point, config variable will have the value either of
which "puppet default" of "user specified".
And next,
<pre>
if config != Puppet[:config]
Puppet[:config]=config
Puppet.settings.parse
end
</pre>
"Puppet.settings.parse" seems to be called ONLY when users
specified the location which DIFFER FROM puppet default.
So, I think that in my case (use default config location), I can't
make this script parse my settings, right?
regards,
----------------------------------------
Bug #12788: ext/puppetstoredconfigclean.rb may drop parsing
https://projects.puppetlabs.com/issues/12788#change-55876
Author: Satoru KURASHIKI
Status: Needs More Information
Priority: Normal
Assignee: Chris Price
Category:
Target version:
Affected Puppet version:
Keywords:
Branch:
hi,
when using default config file location, it seems not to parse
the config file...
<pre>
if config != Puppet[:config]
Puppet[:config]=config
- Puppet.settings.parse
end
+Puppet.settings.parse
</pre>
regards,
--
KURASHIKI Satoru
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.