diff --git a/.cvsignore b/.cvsignore index e69de29..06fe70f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1,2 @@ +mysql-mmm-2.0.10-1.pdf +mysql-mmm-2.0.10.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..bb5f18d --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +mysql-mmm-2_0_10-4:HEAD:mysql-mmm-2.0.10-4.src.rpm:1260819829 diff --git a/mysql-mmm-2.0.10-default_logging.patch b/mysql-mmm-2.0.10-default_logging.patch new file mode 100644 index 0000000..c64ebd0 --- /dev/null +++ b/mysql-mmm-2.0.10-default_logging.patch @@ -0,0 +1,55 @@ +--- mysql-mmm-2.0.10/lib/Common/Log.pm.orig 2009-10-29 13:26:29.000000000 -0500 ++++ mysql-mmm-2.0.10/lib/Common/Log.pm 2009-11-17 13:04:08.000000000 -0600 +@@ -31,42 +31,17 @@ + + # Use default configuration + my $conf = " +- log4perl.logger = INFO, FileInfo, FileWarn, FileError, FileFatal, MailFatal ++ log4perl.logger = INFO, MMMLog + +- log4perl.appender.FileInfo = Log::Log4perl::Appender::File +- log4perl.appender.FileInfo.Threshold = INFO +- log4perl.appender.FileInfo.filename = /var/log/mysql-mmm/$progam.info +- log4perl.appender.FileInfo.recreate = 1 +- log4perl.appender.FileInfo.layout = PatternLayout +- log4perl.appender.FileInfo.layout.ConversionPattern = %d %5p %m%n +- +- log4perl.appender.FileWarn = Log::Log4perl::Appender::File +- log4perl.appender.FileWarn.Threshold = WARN +- log4perl.appender.FileWarn.filename = /var/log/mysql-mmm/$progam.warn +- log4perl.appender.FileWarn.recreate = 1 +- log4perl.appender.FileWarn.layout = PatternLayout +- log4perl.appender.FileWarn.layout.ConversionPattern = %d %5p %m%n +- +- log4perl.appender.FileError = Log::Log4perl::Appender::File +- log4perl.appender.FileError.Threshold = ERROR +- log4perl.appender.FileError.filename = /var/log/mysql-mmm/$progam.error +- log4perl.appender.FileError.recreate = 1 +- log4perl.appender.FileError.layout = PatternLayout +- log4perl.appender.FileError.layout.ConversionPattern= %d %5p %m%n +- +- log4perl.appender.FileFatal = Log::Log4perl::Appender::File +- log4perl.appender.FileFatal.Threshold = FATAL +- log4perl.appender.FileFatal.filename = /var/log/mysql-mmm/$progam.fatal +- log4perl.appender.FileFatal.recreate = 1 +- log4perl.appender.FileFatal.layout = PatternLayout +- log4perl.appender.FileFatal.layout.ConversionPattern= %d %5p %m%n +- +- log4perl.appender.MailFatal = Log::Dispatch::Email::MailSend +- log4perl.appender.MailFatal.Threshold = FATAL +- log4perl.appender.MailFatal.to = root +- log4perl.appender.MailFatal.subject = FATAL error in $progam +- log4perl.appender.MailFatal.layout = PatternLayout +- log4perl.appender.MailFatal.layout.ConversionPattern= %d %m%n ++ log4perl.appender.MMMLog = Log::Log4perl::Appender::File ++ log4perl.appender.MMMLog.Threshold = INFO ++ log4perl.appender.MMMLog.filename = /var/log/mysql-mmm/$progam.log ++ log4perl.appender.MMMLog.recreate = 1 ++ log4perl.appender.MMMLog.layout = PatternLayout ++ log4perl.appender.MMMLog.layout.ConversionPattern = %d %5p %m%n ++ ++ log4perl.appender.MailFatal = Log::Dispatch::Email::MailSend ++ log4perl.appender.MailFatal.Threshold = FATAL + "; + Log::Log4perl->init(\$conf); + diff --git a/mysql-mmm-2.0.10-lp473446.patch b/mysql-mmm-2.0.10-lp473446.patch new file mode 100644 index 0000000..e05c995 --- /dev/null +++ b/mysql-mmm-2.0.10-lp473446.patch @@ -0,0 +1,61 @@ +https://bugs.launchpad.net/mysql-mmm/+bug/473446 + +--- mysql-mmm/lib/Common/Angel.pm 2009-11-17 11:35:20.000000000 -0600 ++++ angel-infinit-failures/lib/Common/Angel.pm 2009-11-17 11:32:32.000000000 -0600 +@@ -10,12 +10,17 @@ + + our $start_process; + our $pid; ++our $attempts; ++our $starttime; ++ + + sub Init($) { + my $pidfile = shift; + + + $MMM::Common::Angel::start_process = 1; ++ $MMM::Common::Angel::attempts = 0; ++ $MMM::Common::Angel::starttime = time(); + my $is_shutdown = 0; + + $pidfile->create() if (defined($pidfile)); +@@ -25,6 +30,7 @@ + local $SIG{QUIT} = \&MMM::Common::Angel::SignalHandler; + + do { ++ $MMM::Common::Angel::attempts++; + + if ($MMM::Common::Angel::start_process) { + $MMM::Common::Angel::start_process = 0; +@@ -41,6 +47,9 @@ + + # Wait for child to exit + if (waitpid($MMM::Common::Angel::pid, 0) == -1) { ++ # child exited clean, reset attempts and starttime ++ $MMM::Common::Angel::attempts = 0; ++ $MMM::Common::Angel::starttime = time(); + if ($ERRNO{ECHLD}) { + $is_shutdown = 1 unless ($MMM::Common::Angel::start_process); + } +@@ -52,8 +61,18 @@ + $is_shutdown = 1; + } + else { +- FATAL sprintf("Child exited with exitcode %s, restarting", WEXITSTATUS($?)); +- $MMM::Common::Angel::start_process = 1; ++ my $now = time(); ++ my $diff = $now - $MMM::Common::Angel::starttime; ++ if ($MMM::Common::Angel::attempts >= 10 && $diff < 300) { ++ FATAL sprintf("Child exited with exitcode %s and has failed more than 10 times consecutively in the last 5 minutes, not restarting", WEXITSTATUS($?)); ++ $MMM::Common::Angel::start_process = 0; ++ $is_shutdown = 1; ++ } ++ else { ++ FATAL sprintf("Child exited with exitcode %s, restarting after 10 second sleep", WEXITSTATUS($?)); ++ sleep(10); ++ $MMM::Common::Angel::start_process = 1; ++ } + } + } + if (WIFSIGNALED($CHILD_ERROR)) { diff --git a/mysql-mmm-2.0.9-configs.patch b/mysql-mmm-2.0.9-configs.patch new file mode 100644 index 0000000..904120a --- /dev/null +++ b/mysql-mmm-2.0.9-configs.patch @@ -0,0 +1,178 @@ +--- mysql-mmm-2.0.9/etc/mysql-mmm/mmm_common.conf.orig 2009-06-18 20:15:54.000000000 -0500 ++++ mysql-mmm-2.0.9/etc/mysql-mmm/mmm_common.conf 2009-11-03 12:47:50.000000000 -0600 +@@ -1,45 +1,41 @@ +-active_master_role writer +- ++active_master_role writer + + +- cluster_interface eth0 +- +- pid_path /var/run/mmmd_agent.pid +- bin_path /usr/bin/mysql-mmm/ +- ++ cluster_interface eth0 ++ pid_path /var/run/mysql-mmm/mmmd_agent.pid ++ bin_path /usr/libexec/mysql-mmm/ + replication_user replication + replication_password slave +- +- agent_user mmm_agent +- agent_password RepAgent ++ agent_user mmm_agent ++ agent_password RepAgent + + + +- ip 192.168.0.31 +- mode master +- peer db2 ++ ip 192.168.0.31 ++ mode master ++ peer db2 + + + +- ip 192.168.0.32 +- mode master +- peer db1 ++ ip 192.168.0.32 ++ mode master ++ peer db1 + + + +- ip 192.168.0.33 +- mode slave ++ ip 192.168.0.33 ++ mode slave + + + + +- hosts db1, db2 +- ips 192.168.0.50 +- mode exclusive ++ hosts db1, db2 ++ ips 192.168.0.50 ++ mode exclusive + + + +- hosts db1, db2, db3 +- ips 192.168.0.51, 192.168.0.52, 192.168.0.53 +- mode balanced ++ hosts db1, db2, db3 ++ ips 192.168.0.51, 192.168.0.52, 192.168.0.53 ++ mode balanced + +--- mysql-mmm-2.0.9/etc/mysql-mmm/mmm_tools.conf.orig 2009-06-18 20:15:54.000000000 -0500 ++++ mysql-mmm-2.0.9/etc/mysql-mmm/mmm_tools.conf 2009-11-03 12:51:47.000000000 -0600 +@@ -1,43 +1,43 @@ + include mmm_agent.conf + +-default_copy_method scp +-clone_dirs data, logs ++default_copy_method scp ++clone_dirs data, logs + + +- ssh_user root ++ ssh_user root + +- lvm_snapshot_size 1G +- lvm_logical_volume mysql +- lvm_volume_group storage +- lvm_mount_dir /mmm_snapshot +- lvm_mount_opts -orw,nouuid ++ lvm_snapshot_size 1G ++ lvm_logical_volume mysql ++ lvm_volume_group storage ++ lvm_mount_dir /mmm_snapshot ++ lvm_mount_opts -orw,nouuid + +- tools_user mmm_tools +- tools_password RepTools ++ tools_user mmm_tools ++ tools_password RepTools + +- backup_dir /mmm_backup +- restore_dir /mysql ++ backup_dir /mmm_backup ++ restore_dir /mysql + + + + + backup_command scp -c blowfish -r %SSH_USER%@%IP%:%SNAPSHOT%/%CLONE_DIR% %DEST_DIR%/ + restore_command cp -axv %BACKUP_DIR%/* %DEST_DIR%/ +- true_copy 1 ++ true_copy 1 + + + +- backup_command rdiff-backup --ssh-no-compression -v 5 !--include %SNAPSHOT%/%CLONE_DIR%! --exclude %SNAPSHOT% %SSH_USER%@%IP%::%SNAPSHOT%/ %DEST_DIR%/ +- restore_command rdiff-backup --force -v 5 -r %VERSION% %BACKUP_DIR% %DEST_DIR%/.mmm_restore; cp -axvl --remove-destination %DEST_DIR%/.mmm_restore/* %DEST_DIR%/; rm -r %DEST_DIR%/.mmm_restore/ +- incremental_command rdiff-backup --parsable-output -l %BACKUP_DIR% +- single_run 1 +- incremental 1 ++ backup_command rdiff-backup --ssh-no-compression -v 5 !--include %SNAPSHOT%/%CLONE_DIR%! --exclude %SNAPSHOT% %SSH_USER%@%IP%::%SNAPSHOT%/ %DEST_DIR%/ ++ restore_command rdiff-backup --force -v 5 -r %VERSION% %BACKUP_DIR% %DEST_DIR%/.mmm_restore; cp -axvl --remove-destination %DEST_DIR%/.mmm_restore/* %DEST_DIR%/; rm -r %DEST_DIR%/.mmm_restore/ ++ incremental_command rdiff-backup --parsable-output -l %BACKUP_DIR% ++ single_run 1 ++ incremental 1 + + + +- backup_command ssh -c blowfish %SSH_USER%@%IP% "cd '%SNAPSHOT%'; tar cv !'%CLONE_DIR%'!" | gzip > %DEST_DIR%/backup.tar.gz +- restore_command cd %DEST_DIR%; tar xzfv %BACKUP_DIR%/backup.tar.gz +- single_run 1 ++ backup_command ssh -c blowfish %SSH_USER%@%IP% "cd '%SNAPSHOT%'; tar cv !'%CLONE_DIR%'!" | gzip > %DEST_DIR%/backup.tar.gz ++ restore_command cd %DEST_DIR%; tar xzfv %BACKUP_DIR%/backup.tar.gz ++ single_run 1 + + + +--- mysql-mmm-2.0.10/etc/mysql-mmm/mmm_agent.conf.orig 2009-10-29 13:26:29.000000000 -0500 ++++ mysql-mmm-2.0.10/etc/mysql-mmm/mmm_agent.conf 2009-11-03 17:29:11.000000000 -0600 +@@ -1,2 +1,6 @@ + include mmm_common.conf ++ ++# The 'this' variable refers to this server. Proper operation requires ++# that 'this' server (db1 by default), as well as all other servers, have the ++# proper IP addresses set in mmm_common.conf. + this db1 +--- mysql-mmm-2.0.10/etc/mysql-mmm/mmm_mon.conf.orig 2009-10-29 13:26:29.000000000 -0500 ++++ mysql-mmm-2.0.10/etc/mysql-mmm/mmm_mon.conf 2009-11-03 17:54:12.000000000 -0600 +@@ -1,16 +1,24 @@ + include mmm_common.conf + + +- ip 127.0.0.1 +- pid_path /var/run/mmmd_mon.pid +- bin_path /usr/bin/mysql-mmm/ +- status_path /var/lib/misc/mmmd_mon.status +- ping_ips 192.168.0.1, 192.168.0.2, 192.168.0.3 ++ ip 127.0.0.1 ++ pid_path /var/run/mysql-mmm/mmmd_mon.pid ++ bin_path /usr/libexec/mysql-mmm ++ status_path /var/lib/mysql-mmm/mmmd_mon.status ++ ping_ips 192.168.0.1, 192.168.0.2, 192.168.0.3 ++ auto_set_online 60 ++ ++ # The kill_host_bin does not exist by default, though the monitor will ++ # throw a warning about it missing. See the section 5.10 "Kill Host ++ # Functionality" in the PDF documentation. ++ # ++ # kill_host_bin /usr/libexec/mysql-mmm/monitor/kill_host ++ # + + + +- monitor_user mmm_monitor +- monitor_password RepMonitor ++ monitor_user mmm_monitor ++ monitor_password RepMonitor + + + debug 0 diff --git a/mysql-mmm-2.0.9-paths.patch b/mysql-mmm-2.0.9-paths.patch new file mode 100644 index 0000000..0350204 --- /dev/null +++ b/mysql-mmm-2.0.9-paths.patch @@ -0,0 +1,55 @@ +--- mysql-mmm-2.0.9/etc/init.d/mysql-mmm-monitor.orig 2009-06-18 20:15:54.000000000 -0500 ++++ mysql-mmm-2.0.9/etc/init.d/mysql-mmm-monitor 2009-10-19 22:40:05.000000000 -0500 +@@ -6,8 +6,8 @@ + # chkconfig: - 64 36 + # description: MMM Monitor. + # processname: mmmd_mon +-# config: /etc/mmm_mon.conf +-# pidfile: /var/run/mmmd_mon.pid ++# config: /etc/mysql-mmm/mmm_mon.conf ++# pidfile: /var/run/mysql-mmm/mmmd_mon.pid + + # Cluster name (it can be empty for default cases) + CLUSTER='' +@@ -17,10 +17,10 @@ + # Paths + if [ "$CLUSTER" != "" ]; then + MMMD_MON_BIN="/usr/sbin/mmmd_mon @$CLUSTER" +- MMMD_MON_PIDFILE="/var/run/mmmd_mon-$CLUSTER.pid" ++ MMMD_MON_PIDFILE="/var/run/mysql-mmm/mmmd_mon-$CLUSTER.pid" + else + MMMD_MON_BIN="/usr/sbin/mmmd_mon" +- MMMD_MON_PIDFILE="/var/run/mmmd_mon.pid" ++ MMMD_MON_PIDFILE="/var/run/mysql-mmm/mmmd_mon.pid" + fi + + echo "Daemon bin: '$MMMD_MON_BIN'" +--- mysql-mmm-2.0.9/etc/init.d/mysql-mmm-agent.orig 2009-06-18 20:15:54.000000000 -0500 ++++ mysql-mmm-2.0.9/etc/init.d/mysql-mmm-agent 2009-10-19 22:39:37.000000000 -0500 +@@ -6,12 +6,12 @@ + # chkconfig: - 64 36 + # description: MMM Agent. + # processname: mmmd_agent +-# config: /etc/mmm_agent.conf +-# pidfile: /var/run/mmmd_agent.pid ++# config: /etc/mysql-mmm/mmm_agent.conf ++# pidfile: /var/run/mysql-mmm/mmmd_agent.pid + + # Paths + MMMD_AGENT_BIN="/usr/sbin/mmmd_agent" +-MMMD_AGENT_PIDFILE="/var/run/mmmd_agent.pid" ++MMMD_AGENT_PIDFILE="/var/run/mysql-mmm/mmmd_agent.pid" + + #----------------------------------------------------------------------- + # See how we were called. +--- mysql-mmm-2.0.9/Makefile.orig 2009-06-18 20:15:54.000000000 -0500 ++++ mysql-mmm-2.0.9/Makefile 2009-10-19 22:26:47.000000000 -0500 +@@ -4,7 +4,7 @@ + endif + + MODULEDIR = $(DESTDIR)$(shell eval "`perl -V:${INSTALLDIR}`"; echo "$$${INSTALLDIR}")/MMM +-BINDIR = $(DESTDIR)/usr/bin/mysql-mmm ++BINDIR = $(DESTDIR)/usr/libexec/mysql-mmm + SBINDIR = $(DESTDIR)/usr/sbin + LOGDIR = $(DESTDIR)/var/log/mysql-mmm + ETCDIR = $(DESTDIR)/etc diff --git a/mysql-mmm-agent.init b/mysql-mmm-agent.init new file mode 100644 index 0000000..6b0eeb7 --- /dev/null +++ b/mysql-mmm-agent.init @@ -0,0 +1,74 @@ +#!/bin/sh +# +# mysql-mmm-agent This shell script takes care of starting and stopping +# the mmm agent daemon. +# +# chkconfig: - 64 36 +# description: MMM Agent. +# processname: mmmd_agent +# config: /etc/mysql-mmm/mmm_agent.conf +# pidfile: /var/run/mysql-mmm/mmmd_agent.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +# Paths +MMMD_AGENT_BIN="/usr/sbin/mmmd_agent" +MMMD_AGENT_PIDFILE="/var/run/mysql-mmm/mmmd_agent.pid" +LOCKFILE='/var/lock/subsys/mysql-mmm-agent' +prog='MMM Agent Daemon' + +start() { + echo -n "Starting $prog: " + if [ -s $MMMD_AGENT_PIDFILE ] && kill -0 `cat $MMMD_AGENT_PIDFILE` 2> /dev/null; then + echo " already running." + exit 0 + fi + daemon $MMMD_AGENT_BIN + RETVAL=$? + echo + [ $RETVAL = 0 ] && touch $LOCKFILE + return $RETVAL +} + +stop() { + # Stop daemon. + echo -n "Stopping $prog: " + killproc -p $MMMD_AGENT_PIDFILE $MMMD_AGENT_BIN + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f $LOCKFILE + return $RETVAL +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + status) + status -p $MMMD_AGENT_PIDFILE $MMMD_AGENT_BIN + RETVAL=$? + ;; + + restart|reload) + stop + start + ;; + + condrestart) + if [ -f $LOCKFILE ]; then + stop + start + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|condrestart|status}" + ;; +esac + +exit $RETVAL diff --git a/mysql-mmm-monitor.init b/mysql-mmm-monitor.init new file mode 100644 index 0000000..b83ec85 --- /dev/null +++ b/mysql-mmm-monitor.init @@ -0,0 +1,82 @@ +#!/bin/sh +# +# mysql-mmm-monitor This shell script takes care of starting and stopping +# the mmm monitoring daemon. +# +# chkconfig: - 64 36 +# description: MMM Monitor. +# processname: mmmd_mon +# config: /etc/mysql-mmm/mmm_mon.conf +# pidfile: /var/run/mysql-mmm/mmmd_mon.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +# Cluster name (it can be empty for default cases) +CLUSTER='' +LOCKFILE='/var/lock/subsys/mysql-mmm-monitor' +prog='MMM Monitor Daemon' + +if [ "$CLUSTER" != "" ]; then + MMMD_MON_BIN="/usr/sbin/mmmd_mon @$CLUSTER" + MMMD_MON_PIDFILE="/var/run/mysql-mmm/mmmd_mon-$CLUSTER.pid" +else + MMMD_MON_BIN="/usr/sbin/mmmd_mon" + MMMD_MON_PIDFILE="/var/run/mysql-mmm/mmmd_mon.pid" +fi + + +start() { + echo -n "Starting $prog: " + if [ -s $MMMD_MON_PIDFILE ] && kill -0 `cat $MMMD_MON_PIDFILE` 2> /dev/null; then + echo " already running." + exit 0 + fi + daemon $MMMD_MON_BIN + RETVAL=$? + echo + [ $RETVAL = 0 ] && touch $LOCKFILE + return $RETVAL +} + +stop() { + # Stop daemon. + echo -n "Stopping $prog: " + killproc -p $MMMD_MON_PIDFILE $MMMD_MON_BIN + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f $LOCKFILE + return $RETVAL +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + status) + status -p $MMMD_MON_PIDFILE $MMMD_MON_BIN + RETVAL=$? + ;; + + restart|reload) + stop + start + ;; + + condrestart) + if [ -f $LOCKFILE ]; then + stop + start + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|condrestart|status}" + ;; +esac + +exit $RETVAL diff --git a/mysql-mmm.logrotate b/mysql-mmm.logrotate new file mode 100644 index 0000000..4dc9967 --- /dev/null +++ b/mysql-mmm.logrotate @@ -0,0 +1,9 @@ +/var/log/mysql-mmm/*.log { + daily + missingok + rotate 7 + compress + delaycompress + notifempty + create 640 root adm +} diff --git a/mysql-mmm.spec b/mysql-mmm.spec new file mode 100644 index 0000000..f58e434 --- /dev/null +++ b/mysql-mmm.spec @@ -0,0 +1,271 @@ + +Name: mysql-mmm +Version: 2.0.10 +Release: 4%{?dist} +Summary: Multi-Master Replication Manager for MySQL +License: GPLv2 +URL: http://mysql-mmm.org +Group: Applications/System +Source: http://mysql-mmm.org/_media/:mmm2:/%{name}-%{version}.tar.gz +Source1: mysql-mmm.logrotate +Source2: http://mysql-mmm.org/_media/:mmm2:/%{name}-%{version}-1.pdf +Source3: mysql-mmm-agent.init +Source4: mysql-mmm-monitor.init +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +BuildArch: noarch +Provides: mmm = %{version}-%{release} +Provides: mysql-master-master = %{version}-%{release} + +Patch0: mysql-mmm-2.0.9-paths.patch +Patch1: mysql-mmm-2.0.9-configs.patch +Patch3: mysql-mmm-2.0.10-lp473446.patch +Patch4: mysql-mmm-2.0.10-default_logging.patch + +%description +MMM (MySQL Master-Master Replication Manager) is a set of flexible scripts +to perform monitoring/failover and management of MySQL Master-Master +replication configurations (with only one node writable at any time). The +toolset also has the ability to read balance standard master/slave +configurations with any number of slaves, so you can use it to move virtual +IP addresses around a group of servers depending on whether they are behind +in replication. In addition to that, it also has scripts for data backups, +resynchronization between nodes etc. + +%package agent +Summary: MMM Database Server Agent Daemon and Libraries +Group: Applications/System +Requires: %{name} = %{version}-%{release} +Requires: iproute +Provides: mysql-master-master-agent = %{version}-%{release} +Provides: mmm-agent = %{version}-%{release} + +%description agent +Agent daemon and libraries which run on each MySQL server and provides the +monitoring node with a simple set of remote services. + +%package monitor +Summary: MMM Monitor Server Daemon and Libraries +Group: Applications/System +Requires: %{name} = %{version}-%{release} +Requires: perl(Class::Singleton), perl(DBD::mysql) +Provides: mysql-master-master-monitor = %{version}-%{release} +Provides: mmm-monitor = %{version}-%{release} + +%description monitor +Monitoring daemon and libraries that do all monitoring work and make all +decisions about roles moving and so on. + +%package tools +Summary: MMM Control Scripts and Libraries +Group: Applications/System +Requires: %{name} = %{version}-%{release} +Provides: mysql-master-master-tools = %{version}-%{release} +Provides: mmm-tools = %{version}-%{release} + +%description tools +Scripts and libraries dedicated to management of the mmmd_mon processes +by com- mands. + +%prep +%setup -q +cp -a %{SOURCE2} . + +# currently the README included with mysql-mmm is zero-length +cat >>README < /dev/null 2>&1 + /sbin/chkconfig --del mysql-mmm-agent +fi + +%preun monitor +if [ $1 -eq 0 ]; then + /sbin/service mysql-mmm-monitor stop > /dev/null 2>&1 + /sbin/chkconfig --del mysql-mmm-monitor +fi + + +%files +%defattr(-,root,root,-) +%doc COPYING INSTALL README VERSION %{name}-%{version}-1.pdf +%dir %{_sysconfdir}/mysql-mmm +%attr(755,root,root) %dir %{_localstatedir}/lib/mysql-mmm +%attr(755,root,root) %dir %{_localstatedir}/run/mysql-mmm +%attr(755,root,root) %dir %{_localstatedir}/log/mysql-mmm +%config(noreplace) %{_sysconfdir}/logrotate.d/mysql-mmm +%config(noreplace) %attr(640,root,root) %{_sysconfdir}/mysql-mmm/mmm_common.conf +%{perl_vendorlib}/MMM/Common + +%files tools +%defattr(-,root,root,-) +%doc README +%config(noreplace) %attr(644,root,root) %{_sysconfdir}/mysql-mmm/mmm_tools.conf +%{perl_vendorlib}/MMM/Tools +%{_libexecdir}/mysql-mmm/tools/ +%{_sbindir}/mmm_backup +%{_sbindir}/mmm_clone +%{_sbindir}/mmm_restore + +%files agent +%defattr(-,root,root,-) +%doc README +%config(noreplace) %attr(640,root,root) %{_sysconfdir}/mysql-mmm/mmm_agent.conf +%attr(755,root,root) %{_sysconfdir}/init.d/mysql-mmm-agent +%{perl_vendorlib}/MMM/Agent +%{_libexecdir}/mysql-mmm/agent/ +%{_sbindir}/mmmd_agent + +%files monitor +%defattr(-,root,root,-) +%doc README +%config(noreplace) %attr(640,root,root) %{_sysconfdir}/mysql-mmm/mmm_mon.conf +%attr(755,root,root) %{_sysconfdir}/init.d/mysql-mmm-monitor +%{perl_vendorlib}/MMM/Monitor +%{_libexecdir}/mysql-mmm/monitor/ +%{_sbindir}/mmmd_mon +%{_sbindir}/mmm_control + + +%changelog +* Fri Dec 04 2009 BJ Dierkes - 2.0.10-4 +- Add auto_set_online to 60 in mmm_mon.conf +- Provides full version-release for all subpackages +- Append doc location to pdf documentation in README +- Use subsys/lockfile in init scripts + +* Thu Nov 19 2009 BJ Dierkes - 2.0.10-3 +- BuildArch: noarch +- Monitor subpackage Requires: perl(DBD::mysql) +- Provides full version-release for mmm, mysql-master-master +- Removed redundant /var/run/mysql-mmm entry +- Use _localstatedir macro for /var/log/mysql-mmm file listing +- Fixed logic in post and postun scripts to properly handle + install/upgrade conditions. +- Post scripts now perform condrestart +- Added Source3: mysql-mmm-agent.init +- Added Source4: mysql-mmm-monitor.init + +* Tue Nov 17 2009 BJ Dierkes - 2.0.10-2 +- Removed Patch2: mysql-mmm-2.0.10-sleep.patch (obsoleted by Patch3) +- Added Patch3: mysql-mmm-2.0.10-lp473446.patch +- Added Patch4: mysql-mmm-2.0.10-default_logging.patch + +* Tue Nov 03 2009 BJ Dierkes - 2.0.10-1 +- Latest sources from upstream. +- Added Patch1: mysql-mmm-2.0.9-configs.patch +- Added Patch2: mysql-mmm-2.0.10-sleep.patch +- Moved mmm_control under monitor package + +* Mon Oct 19 2009 BJ Dierkes - 2.0.9-1 +- Starting mostly from scratch with 2.0 branch +- Added Patch0: mysql-mmm-2.0.9-patchs.patch + +* Tue Oct 13 2009 BJ Dierkes - 1.2.6-4 +- Cleaning up rpmlint errors +- No longer require perl-DBD-MySQL + +* Tue Sep 29 2009 BJ Dierkes - 1.2.6-3.3 +- Removing .rs tag (Packaging for Fedora/Epel). + +* Mon Sep 28 2009 BJ Dierkes - 1.2.6-3.2.rs +- Change subpackage -control to -tools +- No longer build or include send_arp, removing requirement of + libnet +- Keep etc config files actually in /etc, symlink at _mmm_instdir/etc + +* Thu Sep 23 2009 BJ Dierkes - 1.2.6-3.rs +- Cleaned up spec a bit further, moved sed changes to patches +- Added Patch1: mysql-master-master-1.2.6-libnet_1.1.patch +- Added Patch2: mysql-master-master-1.2.6-paths.patch +- Explicitly require libnet >= 1.1 +- Added subpackages to break up agent, monitor, and control (backup/restore) + +* Mon Sep 21 2009 Andrew Garner - 1.2.6-2.abg +- Added patch for http://code.google.com/p/mysql-master-master/issues/detail?id=35 + +* Wed Sep 02 2009 Andrew Garner - 1.2.6-1.abg +- New upstream release + +* Thu Jul 09 2009 Andrew Garner +- Fix release string to drop out incorrect ~rs identifier +- Updated to release 5.abg + +* Thu Apr 16 2009 Andrew Garner +- Change /etc/init.d/mysql-mmm_{mon,agent} back to mmm_{mon,agent} +- symlink /etc/mysql-mmm to /usr/lib/mysql-mmm (not the other way around) + +* Mon Apr 14 2009 Andrew Garner +- Cleanup spec +- Use standard state/log paths +- Rebuild fping +- Added dist suffix +- Changed Release to 4.rs-abg + +* Sun Apr 13 2009 Andrew Garner +- Fix send_arp for RHEL 5.3's libnet +- Changed /usr/local/mmm to /usr/lib/mysql-mmm/ +- Changed /etc/init.d/mmm_{mon,agent} to mysql-mmm_{mon,agent} +- Changed Release to 3.rs-abg + +* Thu Apr 09 2009 Andrew Garner +- Updating for Rackspace + +* Wed Feb 25 2009 Ryan Lowe +- Initial build (I owe JayKim) diff --git a/sources b/sources index e69de29..f9f35b7 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +822a0d8819af1bcf6fb228f0ecfd3ed4 mysql-mmm-2.0.10-1.pdf +e8b8df923eeeeae9c4f8ec5584f5023d mysql-mmm-2.0.10.tar.gz