Package: graphite-web Version: 0.9.15+debian-2 Severity: minor Tags: patch Dear Jonas,
I had a race condition when search_index is build. In the last to steps of the script the temp-file is moved, and afterwards ownership is changed. This triggered the race condition, when my Grafana-Server did its minutely alert checking. The condition occurred about twice a day. I changed the order of the last two commands, which solved the problem for me. -- System Information: Debian Release: 8.6 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable'), (10, 'unstable'), (10, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages graphite-web depends on: ii adduser 3.113+nmu3 ii libjs-prototype 1.7.1-3 ii libjs-scriptaculous 1.9.0-2 ii python-cairo 1.8.8-1+b2 ii python-django 1.7.11-1+deb8u1 ii python-django-tagging 1:0.4.1-1 ii python-pyparsing 2.0.3+dfsg1-1 ii python-simplejson 3.6.5-1 ii python-tz 2012c+dfsg-0.1 ii python-whisper 0.9.15-1 pn python:any <none> graphite-web recommends no packages. Versions of packages graphite-web suggests: ii graphite-carbon 0.9.15-1 ii libapache2-mod-wsgi 4.3.0-1 pn python-ldap <none> pn python-memcache <none> ii python-mysqldb 1.2.3-2.1 -- Configuration Files: /etc/graphite/local_settings.py changed [not included] /etc/logrotate.d/graphite-web changed [not included] -- no debconf information
#!/bin/sh # Jonas Genannt <jonas.gena...@capi2name.de>, 2012 for the Debian Project set -e INDEX_FILE_TMP=$(mktemp) INDEX_FILE="/var/lib/graphite/search_index" WHISPER_DIR="/var/lib/graphite/whisper" cd ${WHISPER_DIR} && find -L . -name '*.wsp' | sed \ -e 's@\.wsp$@@' \ -e 's@^\./@@' \ -e 's@/@.@g' > ${INDEX_FILE_TMP} chmod 0640 ${INDEX_FILE_TMP} chown _graphite:_graphite ${INDEX_FILE_TMP} mv -f ${INDEX_FILE_TMP} ${INDEX_FILE}