From daed7344c1cbc184b16009dc91b3cda8cc14a446 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Thu, 11 Dec 2014 11:54:10 +0800 Subject: [PATCH] Use ruby1.9.1 to avoid ruby1.8 + puppetd segfaults on ball More info: https://lists.debian.org/1418271834.28231.36.camel@debian.org --- modules/debian-org/files/dsa-puppet-stuff.cron.ignore | 4 ++++ modules/debian-org/templates/dsa-puppet-stuff.cron.erb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/modules/debian-org/files/dsa-puppet-stuff.cron.ignore b/modules/debian-org/files/dsa-puppet-stuff.cron.ignore index a4e70e5c8..e348b0ac8 100644 --- a/modules/debian-org/files/dsa-puppet-stuff.cron.ignore +++ b/modules/debian-org/files/dsa-puppet-stuff.cron.ignore @@ -9,3 +9,7 @@ ^pcilib: Cannot open /proc/bus/pci$ ^lspci: Cannot find any working access method\.$ ^can't open /proc/dma at /usr/bin/lsdev line 32\.$ +^/usr/lib/ruby/1.9.1/rubygems/custom_require\.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead\.$ +^/usr/lib/ruby/vendor_ruby/puppet/provider/service/freebsd\.rb:[8910]*: warning: class variable access from toplevel$ +^/usr/lib/ruby/vendor_ruby/puppet/provider/service/bsd\.rb:12: warning: class variable access from toplevel$ +^/usr/lib/ruby/vendor_ruby/puppet/type/tidy\.rb:1[0-9][0-9]: warning: class variable access from toplevel$ diff --git a/modules/debian-org/templates/dsa-puppet-stuff.cron.erb b/modules/debian-org/templates/dsa-puppet-stuff.cron.erb index e6ddd74fa..49d2e8a74 100644 --- a/modules/debian-org/templates/dsa-puppet-stuff.cron.erb +++ b/modules/debian-org/templates/dsa-puppet-stuff.cron.erb @@ -6,7 +6,11 @@ SHELL=/bin/bash @hourly root [ ! -d /var/cache/dsa ] || touch /var/cache/dsa/cron.alive <% if @lsbmajdistrelease <= '7' -%> +<% if scope.lookupvar('::hostname') == 'ball' -%> +34 */4 * * * root if [ -x /usr/sbin/puppetd ]; then sleep $(( $RANDOM \% 7200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 3600"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/bin/ruby1.9.1 /usr/sbin/puppetd -o --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi +<% else -%> 34 */4 * * * root if [ -x /usr/sbin/puppetd ]; then sleep $(( $RANDOM \% 7200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 3600"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/sbin/puppetd -o --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi +<% end -%> <% else -%> 34 */4 * * * root if [ -x /usr/bin/puppet ]; then sleep $(( $RANDOM \% 7200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 3600"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/bin/puppet agent --onetime --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi <% end -%> -- 2.20.1