Issue #2816 has been updated by James Turnbull.
Added this to the commit.
<pre>
diff --git a/spec/unit/rails.rb b/spec/unit/rails.rb
index 0302873..f61288f 100755
--- a/spec/unit/rails.rb
+++ b/spec/unit/rails.rb
@@ -90,7 +90,7 @@ end
describe Puppet::Rails, "when initializing a mysql or postgresql connection" do
confine "Cannot test without ActiveRecord" => Puppet.features.rails?
- it "should provide the adapter, log_level, and host, username, password,
and database arguments" do
+ it "should provide the adapter, log_level, and host, username, password,
database, and reconnect arguments" do
Puppet.settings.stubs(:value).with(:dbadapter).returns("mysql")
Puppet.settings.stubs(:value).with(:rails_loglevel).returns("testlevel")
Puppet.settings.stubs(:value).with(:dbserver).returns("testserver")
@@ -105,11 +105,12 @@ describe Puppet::Rails, "when initializing a mysql or
postgresql connection" do
:host => "testserver",
:username => "testuser",
:password => "testpassword",
- :database => "testname"
+ :database => "testname",
+ :reconnect => true
}
end
- it "should provide the adapter, log_level, and host, username, password,
database, and socket arguments" do
+ it "should provide the adapter, log_level, and host, username, password,
database, socket, and reconnect arguments" do
Puppet.settings.stubs(:value).with(:dbadapter).returns("mysql")
Puppet.settings.stubs(:value).with(:rails_loglevel).returns("testlevel")
Puppet.settings.stubs(:value).with(:dbserver).returns("testserver")
@@ -125,7 +126,8 @@ describe Puppet::Rails, "when initializing a mysql or
postgresql connection" do
:username => "testuser",
:password => "testpassword",
:database => "testname",
- :socket => "testsocket"
+ :socket => "testsocket",
+ :reconnect => true
}
end
end
</pre>
----------------------------------------
Bug #2816: Storeconfigs - MySQL server has gone away
http://projects.reductivelabs.com/issues/2816
Author: Dan Carley
Status: Ready for Testing
Priority: Normal
Assigned to:
Category: Rails
Target version: 0.25.2
Affected version: 0.25.1
Keywords:
Branch: http://github.com/jes5199/puppet/tree/ticket/0.25.x/2816
I am receiving the following error from storeconfigs with a MySQL backend.
<pre>
Mysql::Error: MySQL server has gone away
</pre>
Respawning one client in a loop doesn't produce the error. Spawning all clients
(17 on this particular network) at once from cron reproduces the error every
time. Several of the clients then fail to complete. Attached is a puppetmasterd
log of such a run. Observing MySQL's processlist at the time shows that it
holds up to 18 idle connections open until the point at which the errors are
logged and then connections are closed.
The puppetmaster is setup like so.
* Gentoo Linux
* Puppet 0.25.0
* Mongrel 1.1.5 (5 puppetmasterd processes)
* Nginx 0.8.17
* Rails 2.3.4
* ActiveRecord 2.3.4
* MySQL/Ruby 2.7.5
* MySQL 5.0.70 (unix socket, default settings)
I have tried combinations of the following with no success.
* Downgrading to Rails 2.2 and ActiveRecord 2.2.3 (with patch from #2508).
* Upgrading to MySQL/Ruby 2.8.1
I have noticed that amending @rails.rb@ to set the ActiveRecord connection
option @:reconnect = true@ seems to resolve the issue. However I'm not clear
whether such an approach is transaction safe for Puppet to use.
--
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://reductivelabs.com/redmine/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.