+++ /dev/null
-#!/bin/bash
-
-schroots=$(pgrep -x -u 0 schroot -d ',')
-pgrep -x -u 0 -P "$schroots" aptitude | xargs --no-run-if-empty ps h -o 'pid,vsz,cputime' | while read pid vsz cputime; do
- mb=$((vsz/1024))
- [ "$mb" -lt 250 ] && continue
- hours=${vsz%%:*}
- nohours=${vsz#*:}
- mins=${nohours%:*}
-
- if [ "$hours" -gt 0 ] || [ "$mins" -gt 15 ]; then
- kill "$pid"
- fi
-done
require => Package['debian.org']
}
- if ($::kernel == 'Linux') {
- package { 'python-psutil':
- ensure => installed,
- }
- file { '/usr/local/sbin/buildd-schroot-aptitude-kill':
- source => 'puppet:///modules/buildd/buildd-schroot-aptitude-kill',
- mode => '0555',
- }
- } else {
- file { '/usr/local/sbin/buildd-schroot-aptitude-kill':
- source => 'puppet:///modules/buildd/buildd-schroot-aptitude-kill.squeeze',
- mode => '0555',
- }
+ package { 'python-psutil':
+ ensure => installed,
}
+ file { '/usr/local/sbin/buildd-schroot-aptitude-kill':
+ source => 'puppet:///modules/buildd/buildd-schroot-aptitude-kill',
+ mode => '0555',
+ }
+
file { '/etc/cron.d/puppet-buildd-aptitude': ensure => absent }
concat::fragment { 'dsa-puppet-stuff--buildd-aptitude-killer':
target => '/etc/cron.d/dsa-puppet-stuff',