Bug #2963
closed
Rudder should clean up it's LDAP log files that are no longer needed
Added by Francois BAYART about 12 years ago.
Updated over 9 years ago.
Description
I know you have some LDAP gods in your team so maybe could you explain to me why do you choose to have some big ldap log files ?
my /var/rudder/ldap/openldap-data use 2.0Go and in this directory the log.* use 1.9Go :)
- Tracker changed from Question to Bug
- Subject changed from openldap-data log or the ldap fatboy to Rudder should clean up it's LDAP log files that are no longer needed
- Category set to 11
- Status changed from New to 2
- Assignee set to Jonathan CLARKE
- Priority changed from N/A to 2
Ah, these are BerkeleyDB log files. They are useful for replaying transactions to recover a corrupt database (this can happen if your disk gets full, slapd is killed or your server crashes).
However, you have a good point that keeping them forver is not useful. I will adapt this bug to implement an option to auto-clean them.
In the mean time, you can clean them up yourself with the following procedure, run as root (Debian/Ubuntu specific):
# Find package name for db-utils (Debian/Ubuntu specific)
DB_VERSION=$(ldd /opt/rudder/sbin/slapcat | grep libdb | sed 's/^[ \t]*libdb-\([0-9\.]\+\)\.so => .*$/\1/')
DB_UTIL_PKG="db${DB_VERSION}-util"
# Install the db-util package adapted to the version of BerkeleyDB actually in use
apt-get install ${DB_UTIL_PKG}
# Run db_archive to remove useless files
/etc/init.d/slapd stop
cd /var/rudder/ldap/openldap-data
db${DB_VERSION}_archive -d
/etc/init.d/slapd start
- Status changed from 2 to Pending technical review
- % Done changed from 0 to 100
I've added the DB_LOG_AUTOREMOVE flag to our default DB_CONFIG file. This will automatically be applied to all future new installs.
- Status changed from Pending technical review to Released
- Project changed from Rudder to 34
- Category deleted (
11)
- Project changed from 34 to Rudder
- Category set to Packaging
Also available in: Atom
PDF