2007-06-03 11:39:11 +04:00
%define initdir %{_sysconfdir}/init.d
2007-05-28 00:48:18 +04:00
Summary : Clustered TDB
Vendor : Samba Team
Packager : Samba Team <samba@samba.org>
Name : ctdb
Version : 1.0
2008-06-13 07:50:28 +04:00
Release : 42
2007-05-28 00:48:18 +04:00
Epoch : 0
2007-07-10 09:29:31 +04:00
License : GNU GPL version 3
2007-05-28 00:48:18 +04:00
Group : System Environment/Daemons
2007-06-01 15:10:49 +04:00
URL : http://ctdb.samba.org/
2007-05-28 00:48:18 +04:00
2007-06-11 06:30:32 +04:00
Source : ctdb-%{version} .tar.gz
2007-05-28 00:48:18 +04:00
2007-06-01 17:33:01 +04:00
Prereq : /sbin/chkconfig /bin/mktemp /usr/bin/killall
2007-05-28 00:48:18 +04:00
Prereq : fileutils sed /etc/init.d
Provides : ctdb = %{version}
Prefix : /usr
BuildRoot : %{_tmppath} /%{name} -%{version} -root
%description
ctdb is the clustered database used by samba
#######################################################################
%prep
%setup -q
# setup the init script and sysconfig file
2007-06-01 17:25:33 +04:00
%setup -T -D -n ctdb-%{version} -q
2007-05-28 00:48:18 +04:00
%build
2007-05-29 09:15:00 +04:00
CC=" g c c "
2007-05-28 00:48:18 +04:00
## always run autogen.sh
./autogen.sh
2008-04-03 10:07:00 +04:00
CFLAGS=" $RPM_OPT_FLAGS $ E X T R A - O 0 - D _ G N U _ S O U R C E - D C T D B _ V E R S = \" %{version} - %{release} \" " ./configure \
2007-05-28 00:48:18 +04:00
--prefix=%{_prefix} \
2007-05-29 10:23:47 +04:00
--sysconfdir=%{_sysconfdir} \
2007-06-09 09:28:32 +04:00
--mandir=%{_mandir} \
2007-05-29 10:23:47 +04:00
--localstatedir=" / v a r "
2007-05-28 00:48:18 +04:00
2007-05-29 09:52:03 +04:00
make showflags
2007-05-28 00:48:18 +04:00
make
%install
# Clean up in case there is trash left from a previous build
rm -rf $RPM_BUILD_ROOT
# Create the target build directory hierarchy
mkdir -p $RPM_BUILD_ROOT %{_sysconfdir} /sysconfig
2007-06-03 11:39:11 +04:00
mkdir -p $RPM_BUILD_ROOT %{_sysconfdir} /init.d
2007-05-28 00:48:18 +04:00
2007-05-29 09:15:00 +04:00
make DESTDIR=$RPM_BUILD_ROOT install
2007-05-28 00:48:18 +04:00
2007-06-02 13:40:07 +04:00
install -m644 config/ctdb.sysconfig $RPM_BUILD_ROOT %{_sysconfdir} /sysconfig/ctdb
install -m755 config/ctdb.init $RPM_BUILD_ROOT %{initdir} /ctdb
2007-05-29 16:53:28 +04:00
2007-05-28 00:48:18 +04:00
# Remove "*.old" files
find $RPM_BUILD_ROOT -name " * . o l d " -exec rm -f {} \;
%clean
rm -rf $RPM_BUILD_ROOT
%post
2007-06-01 17:25:33 +04:00
[ -x /sbin/chkconfig ] && /sbin/chkconfig --add ctdb
2007-05-28 00:48:18 +04:00
%preun
if [ $1 = 0 ] ; then
2007-06-01 17:25:33 +04:00
[ -x /sbin/chkconfig ] && /sbin/chkconfig --del ctdb
2007-05-28 00:48:18 +04:00
fi
exit 0
%postun
if [ " $ 1 " -ge " 1 " ]; then
%{initdir} /ctdb restart >/dev/null 2>&1
fi
#######################################################################
## Files section ##
#######################################################################
%files
%defattr (-,root,root)
%config (noreplace) %{_sysconfdir} /sysconfig/ctdb
%attr (755,root,root) %config %{initdir} /ctdb
2007-06-01 14:54:26 +04:00
%{_sysconfdir} /ctdb/functions
2007-08-15 05:36:01 +04:00
%{_sysconfdir} /ctdb/events.d/README
2007-08-15 09:01:31 +04:00
%{_sysconfdir} /ctdb/events.d/00.ctdb
2007-06-04 09:09:03 +04:00
%{_sysconfdir} /ctdb/events.d/10.interface
2007-06-05 12:14:01 +04:00
%{_sysconfdir} /ctdb/events.d/40.vsftpd
2008-01-11 02:44:16 +03:00
%{_sysconfdir} /ctdb/events.d/41.httpd
2007-06-04 09:09:03 +04:00
%{_sysconfdir} /ctdb/events.d/50.samba
%{_sysconfdir} /ctdb/events.d/60.nfs
2007-07-06 04:54:42 +04:00
%{_sysconfdir} /ctdb/events.d/61.nfstickle
2008-02-06 06:00:04 +03:00
%{_sysconfdir} /ctdb/events.d/70.iscsi
2007-10-08 08:05:22 +04:00
%{_sysconfdir} /ctdb/events.d/90.ipmux
2008-01-07 06:31:13 +03:00
%{_sysconfdir} /ctdb/events.d/91.lvs
2007-05-31 05:09:45 +04:00
%{_sysconfdir} /ctdb/statd-callout
2007-05-29 09:15:00 +04:00
%{_sbindir} /ctdbd
%{_bindir} /ctdb
2007-08-04 04:16:37 +04:00
%{_bindir} /smnotify
2007-10-08 08:05:22 +04:00
%{_bindir} /ctdb_ipmux
2007-09-05 08:20:34 +04:00
%{_bindir} /ctdb_diagnostics
2007-05-30 05:17:52 +04:00
%{_bindir} /onnode.ssh
%{_bindir} /onnode.rsh
%{_bindir} /onnode
2007-06-09 09:28:32 +04:00
%{_mandir} /man1/ctdb.1.gz
2007-06-10 04:45:52 +04:00
%{_mandir} /man1/ctdbd.1.gz
2007-06-12 07:44:01 +04:00
%{_mandir} /man1/onnode.1.gz
2007-05-28 00:48:18 +04:00
%{_includedir} /ctdb.h
2007-05-29 16:53:28 +04:00
%{_includedir} /ctdb_private.h
2007-12-04 07:50:43 +03:00
%changelog
2008-06-13 07:53:05 +04:00
* Fri Jun 13 2008 : Version 1.0.42
2008-06-13 07:50:28 +04:00
- When event scripts have hung/timedout more than EventScriptBanCount times
in a row the node will ban itself.
- Many updates to persistent write tests and the test scripts.
2008-05-28 08:51:46 +04:00
* Wed May 28 2008 : Version 1.0.41
- Reactivate the safe writes to persistent databases and solve the
locking issues. Locking issues are solved the only possible way,
by using a child process to do the writes. Expensive and slow but... .
2008-05-27 02:23:46 +04:00
* Tue May 27 2008 : Version 1.0.40
- Read the samba sysconfig file from the 50.samba eventscript
- Fix some emmory hierarchical bugs in the persistent write handling
2008-05-22 00:22:25 +04:00
* Thu May 22 2008 : Version 1.0.39
- Moved a CTDB_MANAGES_NFS, CTDB_MANAGES_ISCSI and CTDB_MANAGES_CSFTPD
into /etc/sysconfig/ctdb
- Lowered some debug messages to not fill the logfile with entries
that normally occur in the default configuration.
2008-05-16 03:51:42 +04:00
* Fri May 16 2008 : Version 1.0.38
- Add machine readable output support to " c t d b g e t m o n m o d e "
- Lots of tweaks and enhancements if the event scripts are " s l o w "
- Merge from tridge: an attempt to break the chicken-and-egg deadlock that
net conf introduces if used from an eventscript.
- Enhance tickles so we can tickle an ipv6 connection.
- Start adding ipv6 support : create a new container to replace sockaddr_in.
- Add a checksum routine for ipv6/tcp
- When starting up ctdb, let the init script do a tdbdump on all
persistent databases and verify that they are good (i.e. not corrupted).
- Try to use " s a f e t r a n s a c t i o n s " when writing to a persistent database
that was opened with the TDB_NOSYNC flag. If we can get the transaction
thats great, if we cant we have to write anyway since we cant block here.
2008-05-12 01:24:02 +04:00
* Mon May 12 2008 : Version 1.0.37
- When we shutdown ctdb we close the transport down before we run the
" s h u t d o w n " eventscripts. If ctdb decides to send a packet to a remote node
after we have shutdown the transport but before we have shutdown ctdbd
itself this could lead to a SEGV instead of a clean shutdown. Fix.
- When using the " e x p o r t f s " command to extract which NFS export directories
to monitor, exportfs violates the " p r i n c i p l e o f l e a s t s u r p r i s e " and
sometimes report a single export line as two lines of text output
causing the monitoring to fail.
2008-05-09 07:47:38 +04:00
* Fri May 9 2008 : Version 1.0.36
- fix a memory corruption bug that could cause the recovery daemon to crash.
- fix a bug with distributing public ip addresses during recovery.
If the node that is the recovery master did NOT use public addresses,
then it assumed that no other node in the cluster used them either and
thus skipped the entire step of reallocating public addresses.
2008-05-07 05:31:37 +04:00
* Wed May 7 2008 : Version 1.0.35
- During recovery, when we define the new set of lmasters (vnnmap)
only consider those nodes that have the can-be-lmaster capability
when we create the vnnmap. unless there are no nodes available which
supports this capability in which case we allow the recmaster to
become lmaster capable (temporarily).
- Extend the async framework so that we can use paralell async calls
to controls that return data.
- If we do not have the " c a n b e r e c m a s t e r " capability, make sure we will
lose any recmaster elections, unless there are no nodes available that
have the capability, in which case we " t a k e / w i n " the election anyway.
- Close and reopen the reclock pnn file at regular intervals.
Make it a non-fatal event if we occasionally fail to open/read/write
to this file.
- Monitor that the recovery daemon is still running from the main ctdb
daemon and shutdown the main daemon when recovery daemon has terminated.
- Add a " c t d b g e t c a p a b i l i t i e s " command to read the capabilities off a node.
- Define two new capabilities : can be recmaster and can be lmaster
and default both capabilities to YES.
- Log denied tcp connection attempts with DEBUG_ERR and not DEBUG_WARNING
2008-04-24 16:06:04 +04:00
* Thu Apr 24 2008 : Version 1.0.34
- When deleting a public ip from a node, try to migrate the ip to a different
node first.
- Change catdb to produce output similar to tdbdump
- When adding a new public ip address, if this ip does not exist yet in
the cluster, then grab the ip on the local node and activate it.
- When a node disagrees with the recmaster on WHO is the recmaster, then
mark that node as a recovery culprit so it will eventually become
banned.
- Make ctdb eventscript support the -n all argument.
2008-04-10 00:55:31 +04:00
* Thu Apr 10 2008 : Version 1.0.33
- Add facilities to include site local adaptations to the eventscript
by /etc/ctdb/rc.local which will be read by all eventscripts.
- Add a " c t d b v e r s i o n " command.
- Secure the domain socket with proper permissions from Chris Cowan
- Bugfixes for AIX from Chris Cowan
2008-04-02 05:09:27 +04:00
* Wed Apr 02 2008 : Version 1.0.32
- Add a control to have a node execute the eventscripts with arbitrary
command line arguments.
- Add a control " r d d u m p m e m o r y " that will dump the talloc memory allocations
for the recovery daemon.
- Decorate the talloc memdump to produce better and easier memory leak
tracking.
- Update the RHEL5 iscsi tgtd scripts to allow one iscsi target for each
public address.
- Add two new controls " a d d i p / d e l i p " that can be used to add/remove public
addresses to a node at runtime. After using these controls a " c t d b r e c o v e r "
ir required to make the changes take.
- Fix a couple of slow memory leaks.
2008-03-25 01:43:47 +03:00
* Tue Mar 25 2008 : Version 1.0.31
- Add back controls to disable/enable monitoring on a node.
- Fix a memory leak where we used to attach CALL data to the ctdb structure
when performing a local call. Memory which would be lost if the call was
aborted.
- Reduce the loglevel for the log output when someone connects to a non
public ip address for samba.
- Redo and optimize the vacuuming process to send only one control to each
other node containing all records to be vacuumed instead of one
control per node per record.
2008-03-04 05:40:29 +03:00
* Tue Mar 04 2008 : Version 1.0.30
- Update documentation cor new commands and tuneables
- Add machinereadable output to the ip,uptime and getdebug commands
- Add a moveip command to manually failover/failback public ips
- Add NoIPFallback tuneable that prevents ip address failback
- Use file locking inside the CFS as alternative to verify when other nodes
Are connected/disconnected to be able to recover from split network
- Add DisableWhenUnhealthy tunable
- Add CTDB_START_AS_DISABLED sysconfig param
- Add --start-as-disabled flag to ctdb
- Add ability to monitor for OOM condition
2008-02-21 00:37:29 +03:00
* Thu Feb 21 2008 : Version 1.0.29
- Add a new command to make expansion of an existing cluster easier
- Fix bug with references to freed objects in the ctdb structure
- Propagate debuglevel changes to the recovery daemon
- Merge patches to event scripts from Mathieu Parent :
- MP: Simulate " s e r v i c e " on systems which do not provide this tool
- MP: Set correct permissions for events.d/README
- Add nice helper functions to start/stop nfs from the event scripts
2008-02-08 07:12:06 +03:00
* Fri Feb 08 2008 : Version 1.0.28
- Fix a problem where we tried to use ethtool on non-ethernet interfaces
- Warn if the ipvsadm packege is missing when LVS is used
- Dont use absolute pathnames in some of the event scripts
- Fix for persistent tdbs growing inifinitely.
2008-02-06 06:00:04 +03:00
* Wed Feb 06 2008 : Version 1.0.27
- Add eventscript for iscsi
2008-01-31 01:24:02 +03:00
* Thu Jan 31 2008 : Version 1.0.26
- Fix crashbug in tdb transaction code
2008-01-29 06:11:49 +03:00
* Tue Jan 29 2008 : Version 1.0.25
- added async recovery code
- make event scripts more portable
- fixed ctdb dumpmemory
- more efficient tdb allocation code
- improved machine readable ctdb status output
- added ctdb uptime
2008-01-16 14:23:10 +03:00
* Wed Jan 16 2008 : Version 1.0.24
- added syslog support
- documentation updates
2008-01-16 01:47:43 +03:00
* Wed Jan 16 2008 : Version 1.0.23
- fixed a memory leak in the recoveryd
- fixed a corruption bug in the new transaction code
- fixed a case where an packet for a disconnected client could be processed
- added http event script
- updated documentation
2008-01-10 02:05:33 +03:00
* Thu Jan 10 2008 : Version 1.0.22
- auto-run vacuum and repack ops
2008-01-09 00:29:19 +03:00
* Wed Jan 09 2008 : Version 1.0.21
- added ctdb vacuum and ctdb repack code
2008-01-06 05:25:17 +03:00
* Sun Jan 06 2008 : Version 1.0.20
- new transaction based recovery code
2008-01-05 01:52:53 +03:00
* Sat Jan 05 2008 : Version 1.0.19
- fixed non-master bug
- big speedup in recovery for large databases
- lots of changes to improve tdb and ctdb for high churn databases
2007-12-27 02:19:09 +03:00
* Thu Dec 27 2007 : Version 1.0.18
- fixed crash bug in monitor_handler
2007-12-04 07:50:43 +03:00
* Tue Dec 04 2007 : Version 1.0.17
- fixed bugs related to ban/unban of nodes
- fixed a race condition that could lead to monitoring being permanently disabled,
which would lead to long recovery times
- make deterministic IPs the default
- fixed a bug related to continuous recovery
- added a debugging option --node-ip