Closed Bug 779474 Opened 13 years ago Closed 13 years ago

put expire_logs_days and max_binlog_size into puppet for puppetdashboard

Categories

(Data & BI Services Team :: DB: MySQL, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: scabral, Assigned: scabral)

Details

For puppetdashboard servers, let's make parameters for max_binlog_size and expire_logs_days, because they should be different from the defaults. They should be: expire_logs_days=2 max_binlog_size=250M
expire_logs_days successfully added as a parameter by adding the following to modules/mysql2/templates/my.cnf.erb: <% expire_days = scope.lookupvar("mysql2::server::expire_logs_days") -%> <% if expire_days and expire_days != "undef" and expire_days != :undef -%> expire_logs_days=<%= expire_days %> <% else -%> expire_logs_days=10 <% end -%> And a variable to modules/mysql2/manifests/server.pp. I successfully parameterized it and ran puppet on puppetdashboard1 and the only my.cnf change was expire_logs_days, to 2.
I have now set max_binlog_size to be a parameter, with: <% binlog_size = scope.lookupvar("mysql2::server::max_binlog_size") -%> <% if binlog_size and binlog_size != "undef" and binlog_size != :undef -%> max_binlog_size=<%= binlog_size %> <% end -%> And set puppetdashboard1 and 2 to have 250M binlog sizes. I've also set puppetdashboard2 to have expire_logs_days 2.
w00t! [root@puppetdashboard2.db.phx1 ~]# diff /etc/my.cnf /etc/my.cnf.old 6c6 < expire_logs_days=2 --- > expire_logs_days=10 8d7 < max_binlog_size=250M [root@puppetdashboard2.db.phx1 ~]# I'm going to call this closed!
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: mozilla.org → Data & BI Services Team
You need to log in before you can comment on or make changes to this bug.