Problem with storedconfigs on Ubuntu Jaunty (9.04)

82 views
Skip to first unread message

Adam Ryczkowski

unread,
Nov 18, 2009, 9:11:24 PM11/18/09
to Puppet Users
Since it appeared to be impossible to get recent puppet with augeas
and stored configs running on Hardy (8.04), I tried to install it on
Jaunty. Unfortunately my attempt failed on stored configs.

I followed the following path
On Server:
1. Install vanilla Jaunty system from mini-cd, only with SSH server
2. wget http://ftp.pl.debian.org/debian/pool/main/f/facter/facter_1.5.6-2_all.deb
3. dpkg -i facter_1.5.6-2_all.deb
4. wget http://ftp.pl.debian.org/debian/pool/main/p/puppet/puppet_0.25.1-2_all.deb
5. dpkg -i puppet_0.25.1-2_all.deb
6. wget http://ftp.pl.debian.org/debian/pool/main/p/puppet/puppetmaster_0.25.1-2_all.deb
7. dpkg -i puppetmaster_0.25.1-2_all.deb
8. apt-get -f install
9. apt-get install rubygems libmocha-ruby librspec-ruby libsqlite3-
ruby sqlite3
10. gem install ZenTest
11. edit the /etc/puppet/puppet.conf to turn on stored configs,
_exactly_ as on http://reductivelabs.com/trac/puppet/wiki/UsingStoredConfiguration
On Client:
Followed almost the same steps as in server except for installing
puppetmaster, and packages libsqlite3-ruby sqlite3 and editing /etc/
puppet/puppet.conf

Then of course I edited the /etc/hosts so both computers could see
each other using fqdn, then killed deamon processes, manually
exchanged certificates and run on server «puppetmasterd --no-daemonize
--verbose»
and «puppetd --server puppet.domain.com --test» on client

Then I got the following output
On server:
-----------------------------------------------------------
notice: Starting Puppet server version 0.25.1
info: access[^/catalog/([^/]+)$]: allowing 'method' find
info: access[^/catalog/([^/]+)$]: allowing $1 access
info: access[/certificate_revocation_list/ca]: allowing 'method' find
info: access[/certificate_revocation_list/ca]: allowing * access
info: access[/report]: allowing 'method' save
info: access[/report]: allowing * access
info: access[/file]: allowing * access
info: access[/certificate/ca]: adding authentication no
info: access[/certificate/ca]: allowing 'method' find
info: access[/certificate/ca]: allowing * access
info: access[/certificate/]: adding authentication no
info: access[/certificate/]: allowing 'method' find
info: access[/certificate/]: allowing * access
info: access[/certificate_request]: adding authentication no
info: access[/certificate_request]: allowing 'method' find
info: access[/certificate_request]: allowing 'method' save
info: access[/certificate_request]: allowing * access
info: access[/]: adding authentication any
info: Could not find filesystem info for file 'plugins' in environment
production
DEPRECATION WARNING: Please update config/database.yml to use
'database' instead of 'dbfile'. (called from parse_sqlite_config! at /
var/lib/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/sqlite_adapter.rb:35)
err: Cached catalog for puppetclient.domain.com failed: could not open
database: unable to open database file
DEPRECATION WARNING: Please update config/database.yml to use
'database' instead of 'dbfile'. (called from parse_sqlite_config! at /
var/lib/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/sqlite_adapter.rb:35)
err: could not open database: unable to open database file


and on Client:
------------------------------
info: Retrieving plugin
err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of
resource: Could not retrieve information from source(s)
puppet://puppet.domain.com/plugins
err: Could not retrieve catalog from remote server: Error 400 on
SERVER: could not open database: unable to open database file
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run



Can anyone help me?
Thank you in advance.



seph

unread,
Nov 19, 2009, 12:48:22 AM11/19/09
to puppet...@googlegroups.com
Adam Ryczkowski <adam.ry...@gmail.com> writes:

> Since it appeared to be impossible to get recent puppet with augeas
> and stored configs running on Hardy (8.04), I tried to install it on
> Jaunty. Unfortunately my attempt failed on stored configs.

As said before, I'm using the current puppet and augeas on ubuntu
hardy. I'm using stored configs. I really haven't had any problems with it.

I've used the pretty standard backporting methods, which I've emailed
before. I'm not really sure what problems you're having, but it's
certainly possible.

> err: could not open database: unable to open database file

Well, it looks like the puppetmaster can't open the database file. Did
you configure it?

seph

Adam Ryczkowski

unread,
Nov 19, 2009, 5:40:37 AM11/19/09
to Puppet Users

> > Since it appeared to be impossible to get recent puppet with augeas
> > and stored configs running on Hardy (8.04), I tried to install it on
> > Jaunty. Unfortunately my attempt failed on stored configs.
>
> As said before, I'm using the current puppet and augeas on ubuntu
> hardy. I'm using stored configs. I really haven't had any problems with it.
>
> I've used the pretty standard backporting methods, which I've emailed
> before. I'm not really sure what problems you're having, but it's
> certainly possible.
Yes, your mail was very helpful (and thank you), but it did not solve
all my problems (http://groups.google.com/group/puppet-users/
browse_thread/thread/ef877c4b0accebc7/9f1334d1d3a6ea56?
lnk=gst&q=augeas#9f1334d1d3a6ea56), so being in a dead end I tried an
opposite approach: to migrate my servers to more recent distribution.

>
> > err: could not open database: unable to open database file
>
> Well, it looks like the puppetmaster can't open the database file. Did
> you configure it?
Well, I didn’t. There is no menton of any more reconfiguring sqlite3
beyond those threee statements in the puppet.conf, which I wrote
about. I took those statements from Puppet Wiki:

storeconfigs = true
dbadapter = sqlite3
dblocation = /var/lib/puppet/storeconfigs.sqlite

I will add that no database was ever created in /var/lib/puppet/.

Julian Simpson

unread,
Nov 19, 2009, 10:44:58 AM11/19/09
to puppet...@googlegroups.com
> Well, I didn’t. There is no menton of any more reconfiguring sqlite3
> beyond those threee statements in the puppet.conf, which I wrote
> about. I took those statements from Puppet Wiki:
>
> storeconfigs = true
> dbadapter = sqlite3
> dblocation = /var/lib/puppet/storeconfigs.sqlite
>
> I will add that no database was ever created in /var/lib/puppet/.
>

Did you try creating the sqlite database by hand?

J.

--
Julian Simpson
Software Build and Deployment
http://www.build-doctor.com

Adam Ryczkowski

unread,
Nov 19, 2009, 11:33:33 AM11/19/09
to Puppet Users
Well, it seems I didn't have to. After reboot (and automatic start
puppetmasterd as a daemon) the database miraculously appeared. The
storedconfigs still didn't work, and puppetmasterd complained (in a
very verbose way) something about insufficient permission. So chowned
the sqlite database for user puppet.

It must have helped a little, since now I have got other error. Same
setup, as in previous mail.

on puppetclient:
# puppetd --server puppet.domain.com --test
info: Retrieving plugin
err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of
resource: Could not retrieve information from source(s)
puppet://puppet.domain.com/plugins
err: Could not retrieve catalog from remote server: Error 400 on
SERVER: SQLite3::SQLException: unable to open database file: INSERT
INTO "hosts" ("name", "last_report", "created_at", "updated_at", "ip",
"last_freshcheck", "environment", "source_file_id", "last_compile")
VALUES('puppetclient.domain.com', NULL, '2009-11-19 17:27:41',
'2009-11-19 17:27:41', NULL, NULL, NULL, NULL, NULL)
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

on puppet:
# puppetmasterd --no-daemonize --verbose
err: SQLite3::SQLException: unable to open database file: INSERT INTO
"hosts" ("name", "last_report", "created_at", "updated_at", "ip",
"last_freshcheck", "environment", "source_file_id", "last_compile")
VALUES('puppetclient.domain.com', NULL, '2009-11-19 17:27:41',
'2009-11-19 17:27:41', NULL, NULL, NULL, NULL, NULL)

Can anyone tell me, what I need to do to get stored configs working?

Actually, at the moment I don't need to have the storedconfigs be
specifically backed by sqlite3. It can be anything, I simply choose
sqlite3 because I thought it would be easier...

seph

unread,
Nov 19, 2009, 1:58:42 PM11/19/09
to puppet...@googlegroups.com
Adam Ryczkowski <adam.ry...@gmail.com> writes:

>> > Since it appeared to be impossible to get recent puppet with augeas
>> > and stored configs running on Hardy (8.04), I tried to install it on
>> > Jaunty. Unfortunately my attempt failed on stored configs.
>>
>> As said before, I'm using the current puppet and augeas on ubuntu
>> hardy. I'm using stored configs. I really haven't had any problems with it.
>>
>> I've used the pretty standard backporting methods, which I've emailed
>> before. I'm not really sure what problems you're having, but it's
>> certainly possible.
> Yes, your mail was very helpful (and thank you), but it did not solve
> all my problems (http://groups.google.com/group/puppet-users/
> browse_thread/thread/ef877c4b0accebc7/9f1334d1d3a6ea56?
> lnk=gst&q=augeas#9f1334d1d3a6ea56), so being in a dead end I tried an
> opposite approach: to migrate my servers to more recent distribution.

From my mail earlier in that thread:

Of course, now that I've actually tried using puppet and augeas, I've
discovered I also need the libaugeas-ruby package. It can also be
compiled with the same process.

seph

Reply all
Reply to author
Forward
0 new messages