[debian-edu-commits] debian-edu/ 01/01: Correct filesystem testsuite check to warn if less then 20% is free on the file systems and only check the /skole/tjener/home0 and /skole/backup file system on the main server profile.
Petter Reinholdtsen
pere at moszumanska.debian.org
Sat Oct 11 09:22:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
pere pushed a commit to branch master
in repository debian-edu-config.
commit 6707d3e3d76e75ddb61f459032362d69aea97e28
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Sat Oct 11 11:22:11 2014 +0200
Correct filesystem testsuite check to warn if less then 20% is free on the file systems and only check the /skole/tjener/home0 and /skole/backup file system on the main server profile.
---
debian/changelog | 3 +++
testsuite/filesystems | 38 +++++++++++++++++++-------------------
2 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9613aa4..236a2fa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,9 @@ debian-edu-config (1.810) UNRELEASED; urgency=high
* Add PAM module to reject Kerberos password changes and point users
to the Gosa web page instead to try to keep the password databases
in sync (Closes: 704461). Depend on libpam-python for this.
+ * Correct filesystem testsuite check to warn if less then 20% is free
+ on the file systems and only check the /skole/tjener/home0 and
+ /skole/backup file system on the main server profile.
-- Wolfgang Schweer <wschweer at arcor.de> Tue, 07 Oct 2014 12:47:06 +0200
diff --git a/testsuite/filesystems b/testsuite/filesystems
index 9da8d04..fa5d107 100755
--- a/testsuite/filesystems
+++ b/testsuite/filesystems
@@ -30,31 +30,31 @@ for p in `(df -Pt ext3 2>/dev/null;df -Pt ext4 2>/dev/null) | grep -v ^Filesyste
fi
done
-# Make sure home0 and backup have acl and user_xattr enabled
-# See bug #638822 is present or not.
-for dir in /skole/tjener/home0 /skole/backup; do
- dev="$(LC_ALL=C df -P /var/log|awk '/%/ {print $1}')"
- for opt in acl user_xattr ; do
- if LC_ALL=C tune2fs -l "$dev" | \
- grep 'Default mount' | \
- grep -qw $opt ; then
- echo "success: $0: Found option $opt in $dir."
- else
- echo "error: $0: Did not find option $opt in $dir."
- fi
- done
-done
-
-# Make sure autofs do not hide the real file systems
if echo "$PROFILE" | grep -q Main-Server ; then
+ # Make sure autofs do not hide the real file systems
if [ -d /skole/tjener/home0/lost+found ] ; then
echo "success: $0: Found lost+found in /skole/tjener/home0/"
else
echo "error: $0: No lost+found in /skole/tjener/home0/. Blocked by autofs?"
fi
+
+ # Make sure home0 and backup have acl and user_xattr enabled. See
+ # if bug #638822 is present or not.
+ for dir in /skole/tjener/home0 /skole/backup; do
+ dev="$(LC_ALL=C df -P /var/log|awk '/%/ {print $1}')"
+ for opt in acl user_xattr ; do
+ if LC_ALL=C tune2fs -l "$dev" | \
+ grep 'Default mount' | \
+ grep -qw $opt ; then
+ echo "success: $0: Found option $opt in $dir."
+ else
+ echo "error: $0: Did not find option $opt in $dir."
+ fi
+ done
+ done
fi
-# Report too full file systems. Should have at least 10% free,
-# preferably between 10% and 20%.
+# Report too full file systems. Should have at least 20% free to
+# avoid warning from Nagios, preferably between 20% and 25%.
df -m -P -x tmpfs |
- awk '/\/dev\// { if ($3/$2 >= 0.90) print "error: Too full file system", $1, "uses", $3, "of", $2, "MiB" }'
+ awk '/\/dev\// { if ($3/$2 >= 0.80) print "error: Too full file system", $1, "uses", $3, "of", $2, "MiB" }'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git
More information about the debian-edu-commits
mailing list