Univention Bugzilla – Bug 42573
Listener should check free space
Last modified: 2016-10-21 10:59:05 CEST
/var/lib/univention-directory-listener/ got filled up by UDL. On shutdown UDL writes the handler status using src/handlers.c:597 »···state_fp = fopen(state_filename, "w"); this truncates any existing file to zero, which leads to the module being reinitialized on the next start. For 30M objects this takes a long time. UDL should 1. check the free space itself or 2. write to a new file and do an atomic rename to prevent the state from being lost, 3. write the state from change_new_modules(), 4. check the return value of write() and close() for errors like disk-full. FYI: univention-directory-replication has its own check: Bug #28232
*** Bug 42576 has been marked as a duplicate of this bug. ***
r73217 | Bug #42573 listener: Check free space r73216 | Bug #42573 listener: Abort on failed write r73210 | Bug #42573 listener: Remove unused dump functions r73209 | Bug #42573 listener: Mark functions static r73208 | Bug #42573 listener: Allow compiler flags Package: univention-directory-listener Version: 10.0.0-17.333.201610141332 Version: 10.0.0-17.334.201610141418 Branch: ucs_4.1-0 Scope: errata4.1-3 r73231 | Bug #42573 listener: Check free space r73230 | Bug #42573 listener: Abort on failed write r73224 | Bug #42573 listener: Remove unused dump functions r73223 | Bug #42573 listener: Mark functions static r73242 | Bug #42328,Bug #41960,Bug #41842,Bug #42573 listener: YAML univention-directory-listener.yaml
svn r73217: The UCR variable description says KiB for de and MiB for en.
(In reply to Florian Best from comment #3) > svn r73217: > The UCR variable description says KiB for de and MiB for en. r73245 | Bug #42573 UDL: Fix variable description for 'listener/freespace' Package: univention-directory-listener Version: 10.0.0-18.335.201610141453 Branch: ucs_4.1-0 Scope: errata4.1-3 r73247 | Bug #42573 UDL: Fix variable description for 'listener/freespace' YAML univention-directory-listener.yaml
Created attachment 8123 [details] 42573.diff 4603a11 Bug #42573 UDL: Fix variable description for 'listener/freespace' 39cecf3 Bug #42573 listener: Check free space 087f0b6 Bug #42573 listener: Abort on failed write
Tests: OK, works as expected. The listener stops the replication if less than 10 MB are available. Code review: OK Merge: OK YAML: OK
r73380 | Bug #42573 listener: Initialize UCRV 'listener/freespace'=10 MiB Package: univention-directory-listener Version: 10.0.0-19.337.201610201003 Branch: ucs_4.1-0 Scope: errata4.1-3 r73381 | Bug #42573 listener: Initialize UCRV 'listener/freespace'=10 MiB YAML univention-directory-listener.yaml r73382 | Bug #42573 listener: Initialize UCRV 'listener/freespace'=10 MiB UCS-4.2 QA: /etc/init.d/univention-directory-listener stop cd /var/lib/univention-directory-listener mount -t tmpfs -o size=12M xxx /var/lib/univention-directory-listener cp -pr * /var/lib/univention-directory-listener/ stat -f /var/lib/univention-directory-listener /etc/runit/univention-directory-listener/run & udm container/cn modify --dn cn=users,$(ucr get ldap/base) --set description=$RANDOM dd bs=1M count=1 if=/dev/zero of=$PWD/fill df -h /var/lib/univention-directory-listener udm container/cn modify --dn cn=users,$(ucr get ldap/base) --set description=$RANDOM # 19.10.16 21:36:10.469 LISTENER ( ERROR ) : File system '/var/lib/univention-directory-listener' full: 9 < 10 umount $PWD /etc/init.d/univention-directory-listener start
<http://errata.software-univention.de/ucs/4.1/311.html>