Issue #9304 has been updated by Mark Chappell.

I recently hit the same issue.  The cause is actually in activerecord, it 
doesn't play nicely with the non-gem version of ruby's mysql libraries.

Either install the mysql gem, or change activerecord:

gems/activerecord-3*/lib/active_record/connection_adapters/mysql_adapter.rb and 
comment out "gem 'mysql', '~> 2.8.1'"
----------------------------------------
Bug #9304: Problem with activerecord 3.1.0, puppet 2.6.2, and storeconfigs
https://projects.puppetlabs.com/issues/9304#change-80969

Author: Jordan Sissel
Status: Accepted
Priority: Normal
Assignee: 
Category: Rails
Target version: 
Affected Puppet version: 2.6.2
Keywords: storeconfigs rails activerecord 3.1.0 3.10
Branch: 


Short version: i think activerecord 3.1.0 and puppet 2.6.2 (possibly other 
versions) do not mix well.

The full situation is follows.

I use puppet to bootstrap itself (adding stuff so storeconfigs works, etc). I 
foolishly had this in my manifest:

<pre>

    "activerecord":
      ensure => present,
      provider => "gem";
</pre>

The foolishness was "present" - did not pin a version. Today while launching 
some new machines in EC2, they failed when trying to use storeconfigs with this 
error:
<pre>
    err: Cached facts for solr00-15.prod.loggly.net failed: Could not connect 
to database: Please install the mysql adap
ter: `gem install activerecord-mysql-adapter` (Could not find mysql (~> 2.8.1) 
amongst [< long list of gems installed trimmed>])
</pre>
On a hunch, I checked 'gem list' on an older, but working machine - 
activerecord 3.0.9. The new machine had 3.1.0. After downgrading activerecord 
to 3.0.9, things were working again.

Specific details of the downgrade were to uninstall activerecord *and* a 
"mysql2" gem that came as a dependency and reinstalled activerecord with 'gem 
install activerecord -v 3.0.9'


I trimmed the above error for content. It appears below unmodified:
<pre>
err: Cached facts for solr00-15.prod.loggly.net failed: Could not connect to 
database: Please install the mysql adap
ter: `gem install activerecord-mysql-adapter` (Could not find mysql (~> 2.8.1) 
amongst [activemodel-3.1.0, activemod
el-3.0.10, activerecord-3.1.0, activerecord-3.0.10, 
activerecord-jdbc-adapter-1.1.3, activerecord-jdbcmysql-adapter-
1.1.3, activerecord-mysql2legacydb-adapter-0.2.0, activesupport-3.1.0, 
activesupport-3.0.10, arel-2.2.1, arel-2.0.10
, bcrypt-ruby-3.0.0, builder-3.0.0, builder-2.1.2, cucumber-1.0.2, 
diff-lcs-1.1.3, facter-1.6.0, facter-1.5.2, gherk
in-2.4.16, i18n-0.6.0, i18n-0.5.0, jdbc-mysql-5.1.13, jls-puppet-2.6.2, 
json-1.5.4, multi_json-1.0.3, mysql2-0.2.13,
 net-sftp-2.0.5, net-ssh-2.1.3, rake-0.8.7, ruby-mysql-2.9.3, 
rubygems-update-1.8.10, s3sync-1.2.5, sshkeyauth-0.0.7
, stomp-1.1.6, term-ansicolor-1.0.6, tzinfo-0.3.29, xml-simple-1.0.14])
</pre>

If this bug does not affect current versions of puppet, feel free to close :)


-- 
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.

Reply via email to