Faidon Liambotis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/214028

Change subject: Remove txstatsd module and role class
......................................................................

Remove txstatsd module and role class

Only the txstatsd::decommission class was referenced and this can safely
go now too.

Change-Id: I513abe352a4e3daff039c8da313b7e1dd6351198
---
D files/txstatsd/backends/8126.cfg
D files/txstatsd/backends/8127.cfg
D files/txstatsd/backends/8128.cfg
D files/txstatsd/backends/8129.cfg
D files/txstatsd/backends/8130.cfg
D files/txstatsd/backends/8131.cfg
D files/txstatsd/backends/8132.cfg
D files/txstatsd/backends/8133.cfg
D files/txstatsd/backends/8134.cfg
D files/txstatsd/backends/8135.cfg
D files/txstatsd/backends/8136.cfg
D files/txstatsd/backends/8137.cfg
D files/txstatsd/backends/8138.cfg
D files/txstatsd/backends/8139.cfg
D files/txstatsd/init/init.conf
D files/txstatsd/init/instance.conf
D files/txstatsd/txstatsdctl
M manifests/role/labmon.pp
M manifests/role/statsdlb.pp
M manifests/role/swift.pp
D manifests/role/txstatsd.pp
D modules/txstatsd/files/txstatsd.conf
D modules/txstatsd/files/txstatsd.service
D modules/txstatsd/manifests/decommission.pp
D modules/txstatsd/manifests/init.pp
D modules/txstatsd/templates/txstatsd.cfg.erb
26 files changed, 0 insertions(+), 428 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/214028/1

diff --git a/files/txstatsd/backends/8126.cfg b/files/txstatsd/backends/8126.cfg
deleted file mode 100644
index a7497ff..0000000
--- a/files/txstatsd/backends/8126.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8126
-listen-port = 8126
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8127.cfg b/files/txstatsd/backends/8127.cfg
deleted file mode 100644
index a74726d..0000000
--- a/files/txstatsd/backends/8127.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8127
-listen-port = 8127
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8128.cfg b/files/txstatsd/backends/8128.cfg
deleted file mode 100644
index 83c263f..0000000
--- a/files/txstatsd/backends/8128.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8128
-listen-port = 8128
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8129.cfg b/files/txstatsd/backends/8129.cfg
deleted file mode 100644
index a32fd99..0000000
--- a/files/txstatsd/backends/8129.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8129
-listen-port = 8129
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8130.cfg b/files/txstatsd/backends/8130.cfg
deleted file mode 100644
index da136f6..0000000
--- a/files/txstatsd/backends/8130.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8130
-listen-port = 8130
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8131.cfg b/files/txstatsd/backends/8131.cfg
deleted file mode 100644
index 663a60a..0000000
--- a/files/txstatsd/backends/8131.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8131
-listen-port = 8131
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8132.cfg b/files/txstatsd/backends/8132.cfg
deleted file mode 100644
index b201ef4..0000000
--- a/files/txstatsd/backends/8132.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8132
-listen-port = 8132
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8133.cfg b/files/txstatsd/backends/8133.cfg
deleted file mode 100644
index af6cf74..0000000
--- a/files/txstatsd/backends/8133.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8133
-listen-port = 8133
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8134.cfg b/files/txstatsd/backends/8134.cfg
deleted file mode 100644
index b821a8d..0000000
--- a/files/txstatsd/backends/8134.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8134
-listen-port = 8134
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8135.cfg b/files/txstatsd/backends/8135.cfg
deleted file mode 100644
index a9e3658..0000000
--- a/files/txstatsd/backends/8135.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8135
-listen-port = 8135
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8136.cfg b/files/txstatsd/backends/8136.cfg
deleted file mode 100644
index 3f82411..0000000
--- a/files/txstatsd/backends/8136.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8136
-listen-port = 8136
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8137.cfg b/files/txstatsd/backends/8137.cfg
deleted file mode 100644
index 99d76b3..0000000
--- a/files/txstatsd/backends/8137.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8137
-listen-port = 8137
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8138.cfg b/files/txstatsd/backends/8138.cfg
deleted file mode 100644
index cadcdef..0000000
--- a/files/txstatsd/backends/8138.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8138
-listen-port = 8138
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/backends/8139.cfg b/files/txstatsd/backends/8139.cfg
deleted file mode 100644
index ccba20b..0000000
--- a/files/txstatsd/backends/8139.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-[statsd]
-carbon-cache-host = localhost
-carbon-cache-port = 2004
-instance-name = statsd.8139
-listen-port = 8139
-max-datapoints-per-message = 10000
-max-queue-size = 1000000
-prefix =
-statsd-compliance = 0
-
diff --git a/files/txstatsd/init/init.conf b/files/txstatsd/init/init.conf
deleted file mode 100644
index 38e13d0..0000000
--- a/files/txstatsd/init/init.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-# txstatsd/init
-#
-description "Initialize txstatsd"
-author "Ori Livneh <o...@wikimedia.org>"
-
-start on runlevel [2345] or txstatsd.start
-
-task
-
-script
-  for config in /etc/txstatsd/*.cfg; do
-    [ -e "$config" ] || break
-    name="$(basename $config .cfg)"
-    start txstatsd/instance NAME="$name" CONFIG="$config" ||
-      status txstatsd/instance NAME="$name"
-  done
-end script
diff --git a/files/txstatsd/init/instance.conf 
b/files/txstatsd/init/instance.conf
deleted file mode 100644
index cb64931..0000000
--- a/files/txstatsd/init/instance.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-# vim: set ft=upstart:
-# Upstart job definition for txStatsD
-description "txStatsD metrics aggregation network daemon"
-
-setuid txstatsd
-setgid txstatsd
-
-instance $NAME
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-respawn
-respawn limit 10 5
-
-exec twistd -n -l- --pidfile= statsd \
-    --config="$CONFIG"
diff --git a/files/txstatsd/txstatsdctl b/files/txstatsd/txstatsdctl
deleted file mode 100755
index e992a7f..0000000
--- a/files/txstatsd/txstatsdctl
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-# txstatsdctl -- Manage txstatsd jobs
-# Usage: txstatsdctl {status|check|start|stop|restart}
-#
-command=$1
-shift
-case "$command" in
-    status)
-        status=0
-        for config in /etc/txstatsd/*.cfg; do
-          instance="$(basename $config .cfg)"
-          status txstatsd/instance NAME="$instance" || status=$?
-        done
-        exit $status
-        ;;
-    check)
-        $0 status >/dev/null 2>&1 || {
-            echo "CRITICAL: Not all configured txstatsd instances are running."
-            exit 2
-        }
-        echo "OK: All defined txstatsd jobs are runnning."
-        exit 0
-        ;;
-    start)
-        initctl start txstatsd/init
-        ;;
-    stop)
-        for config in /etc/txstatsd/*.cfg; do
-          instance="$(basename $config .cfg)"
-          initctl stop txstatsd/instance NAME="$instance"
-        done
-        ;;
-    restart)
-        for config in /etc/txstatsd/*.cfg; do
-          instance="$(basename $config .cfg)"
-          initctl restart txstatsd/instance NAME="$instance"
-        done
-        ;;
-    *)
-        echo >&2 "Usage: ${0##*/} {status|check|start|stop|restart}"
-        ;;
-esac
diff --git a/manifests/role/labmon.pp b/manifests/role/labmon.pp
index 27b3389..1b38836 100644
--- a/manifests/role/labmon.pp
+++ b/manifests/role/labmon.pp
@@ -13,6 +13,5 @@
         require => Class['role::graphite::labmon']
     }
 
-    class { '::txstatsd::decommission': }
     include role::statsite
 }
diff --git a/manifests/role/statsdlb.pp b/manifests/role/statsdlb.pp
index d854ae2..0caf615 100644
--- a/manifests/role/statsdlb.pp
+++ b/manifests/role/statsdlb.pp
@@ -18,7 +18,6 @@
         nrpe_command => '/usr/lib/nagios/plugins/check_procs -c 1: -C 
statsdlb',
     }
 
-    class { '::txstatsd::decommission': }
     class { '::statsite': }
 
     # statsite backends
diff --git a/manifests/role/swift.pp b/manifests/role/swift.pp
index 975070b..fafd525 100644
--- a/manifests/role/swift.pp
+++ b/manifests/role/swift.pp
@@ -114,7 +114,6 @@
             include ::swift_new::params
             include ::swift_new::container_sync
 
-            class { '::txstatsd::decommission': }
             include role::statsite
         }
         class storage inherits role::swift::eqiad_prod {
@@ -124,7 +123,6 @@
             include ::swift_new::params
             include ::swift_new::container_sync
 
-            class { '::txstatsd::decommission': }
             include role::statsite
         }
     }
@@ -227,7 +225,6 @@
             }
             include role::swift::icehouse
 
-            class { '::txstatsd::decommission': }
             include role::statsite
         }
         class storage inherits role::swift::esams_prod {
@@ -235,7 +232,6 @@
             include ::swift::storage::monitoring
             include role::swift::icehouse
 
-            class { '::txstatsd::decommission': }
             include role::statsite
         }
     }
@@ -373,7 +369,6 @@
         port => 11211,
     }
 
-    class { '::txstatsd::decommission': }
     include role::statsite
 
     monitoring::service { 'swift-http-frontend':
@@ -403,7 +398,6 @@
     include ::swift_new::container_sync
     include ::swift_new::storage::monitoring
 
-    class { '::txstatsd::decommission': }
     include role::statsite
 
     $all_drives = hiera('swift_storage_drives')
diff --git a/manifests/role/txstatsd.pp b/manifests/role/txstatsd.pp
deleted file mode 100644
index f485c3b..0000000
--- a/manifests/role/txstatsd.pp
+++ /dev/null
@@ -1,22 +0,0 @@
-# == Class: role::txstatsd
-#
-# txStatsD is a network daemon that listens on a socket for metric data (like
-# timers and counters) and writes aggregates to a metric storage backend like
-# Graphite or Ganglia. See <https://github.com/sidnei/txstatsd>.
-#
-class role::txstatsd {
-    class { '::txstatsd':
-        settings => {
-            statsd => {
-                'carbon-cache-host'          => 'localhost',
-                'carbon-cache-port'          => 2004,
-                'listen-port'                => 8125,
-                'statsd-compliance'          => 0,
-                'prefix'                     => '',
-                'max-queue-size'             => 1000 * 1000,
-                'max-datapoints-per-message' => 10 * 1000,
-                'instance-name'              => "statsd.${::hostname}",
-            },
-        },
-    }
-}
diff --git a/modules/txstatsd/files/txstatsd.conf 
b/modules/txstatsd/files/txstatsd.conf
deleted file mode 100644
index f0f43d4..0000000
--- a/modules/txstatsd/files/txstatsd.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-# vim: set ft=upstart:
-# Upstart job definition for txStatsD
-description "txStatsD metrics aggregation network daemon"
-
-setuid txstatsd
-setgid txstatsd
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-respawn
-respawn limit 10 5
-
-exec twistd -n -l- --pidfile= statsd \
-    --config=/etc/txstatsd/txstatsd.cfg
diff --git a/modules/txstatsd/files/txstatsd.service 
b/modules/txstatsd/files/txstatsd.service
deleted file mode 100644
index 79d0461..0000000
--- a/modules/txstatsd/files/txstatsd.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=txstatsd
-After=network.target local-fs.target
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/twistd -n -l- --pidfile= statsd 
--config=/etc/txstatsd/txstatsd.cfg
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
diff --git a/modules/txstatsd/manifests/decommission.pp 
b/modules/txstatsd/manifests/decommission.pp
deleted file mode 100644
index 167d45e..0000000
--- a/modules/txstatsd/manifests/decommission.pp
+++ /dev/null
@@ -1,30 +0,0 @@
-# == Class: txstatsd::decommission
-#
-# Decommission txStatsD by stopping the daemon and removing its
-# configuration files.
-#
-class txstatsd::decommission {
-    file { '/etc/init/txstatsd.conf':
-        ensure  => absent,
-    }
-
-    file { '/etc/txstatsd':
-        ensure  => absent,
-        purge   => true,
-        force   => true,
-        recurse => true,
-    }
-
-    group { 'txstatsd':
-        ensure  => absent,
-        require => User['txstatsd'],
-    }
-
-    user { 'txstatsd':
-        ensure  => absent,
-    }
-
-    package { 'python-txstatsd':
-        ensure  => absent,
-    }
-}
diff --git a/modules/txstatsd/manifests/init.pp 
b/modules/txstatsd/manifests/init.pp
deleted file mode 100644
index 25dc10c..0000000
--- a/modules/txstatsd/manifests/init.pp
+++ /dev/null
@@ -1,88 +0,0 @@
-# == Class: txstatsd
-#
-# txStatsD is a network daemon that listens on a socket for metric data (like
-# timers and counters) and writes aggregates to a metric storage backend like
-# Graphite or Ganglia. See <https://github.com/sidnei/txstatsd>.
-#
-# === Parameters
-#
-# [*settings*]
-#   Hash of hashes. Each top-level hash correspond to a config section.
-#   See <https://github.com/sidnei/txstatsd/blob/master/txstatsd.conf-example>.
-#
-# === Examples
-#
-#  class { 'txstatsd':
-#    settings => {
-#      statsd => {
-#        'carbon-cache-host' => localhost,
-#        'carbon-cache-port' => 2003,
-#        'listen-tcp-port'   => 8125,
-#      },
-#    },
-#  }
-#
-class txstatsd($settings) {
-    package { 'python-txstatsd': }
-
-    file { '/etc/txstatsd':
-        ensure => directory,
-        owner  => 'root',
-        group  => 'root',
-        mode   => '0555',
-    }
-
-    file { '/etc/txstatsd/txstatsd.cfg':
-        owner  => 'root',
-        group  => 'root',
-        mode   => '0444',
-        content => template('txstatsd/txstatsd.cfg.erb'),
-    }
-
-    group { 'txstatsd':
-        ensure => present,
-    }
-
-    user { 'txstatsd':
-        ensure     => present,
-        gid        => 'txstatsd',
-        shell      => '/bin/false',
-        home       => '/nonexistent',
-        system     => true,
-        managehome => false,
-    }
-
-    case $::initsystem {
-        'systemd': {
-            $init_file = '/etc/systemd/system/txstatsd.service'
-            $init_source = 'puppet:///modules/txstatsd/txstatsd.service'
-        }
-        'upstart': {
-            $init_file = '/etc/init/txstatsd.conf'
-            $init_source = 'puppet:///modules/txstatsd/txstatsd.conf'
-        }
-        default: {
-            fail('The txstatsd pupppet module does not like your init system!')
-        }
-    }
-
-    file { $init_file:
-        ensure => 'present',
-        owner  => 'root',
-        group  => 'root',
-        mode   => '0444',
-        source => $init_source,
-    }
-
-    service { 'txstatsd':
-        ensure    => running,
-        provider  => $::initsystem,
-        enable    => true,
-        subscribe => File['/etc/txstatsd/txstatsd.cfg'],
-        require   => [
-            File[$init_file],
-            Package['python-txstatsd'],
-            User['txstatsd'],
-        ],
-    }
-}
diff --git a/modules/txstatsd/templates/txstatsd.cfg.erb 
b/modules/txstatsd/templates/txstatsd.cfg.erb
deleted file mode 100644
index 8417a2b..0000000
--- a/modules/txstatsd/templates/txstatsd.cfg.erb
+++ /dev/null
@@ -1,10 +0,0 @@
-# Configuraton file for txStatsD
-# This file is managed by Puppet
-<%=
-    @settings.sort.map { |section,items|
-            ["[#{section}]"].concat items.sort.map { |k,v|
-                v = v.is_a?(Array) ? v.join(',') : (v == :undef ? '' : v)
-                "#{k} = #{v}"
-            }.push []
-    }.join("\n")
-%>

-- 
To view, visit https://gerrit.wikimedia.org/r/214028
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I513abe352a4e3daff039c8da313b7e1dd6351198
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <fai...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to