Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/208108
Change subject: mwprof: deprecation ...................................................................... mwprof: deprecation mwprof support has been deprecated in mediawiki and no longer running on any machine, thus remove it Bug: T97509 Change-Id: I7b74d8bf9ce46a4d4e4e6676bfeebcda47294e9f --- M manifests/role/deployment.pp D manifests/role/mwprof.pp M manifests/role/performance.pp D modules/deployment/files/modules/mwprof.py M modules/deployment/manifests/salt_master.pp D modules/mwprof/files/mwprofctl D modules/mwprof/files/upstart/init.conf D modules/mwprof/manifests/init.pp D modules/mwprof/templates/upstart/collector.conf.erb D modules/mwprof/templates/upstart/profiler-to-carbon.conf.erb 10 files changed, 3 insertions(+), 191 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/08/208108/1 diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index 7d77d88..f59a56a 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -81,12 +81,6 @@ 'abacist/abacist' => { 'upstream' => 'https://gerrit.wikimedia.org/r/analytics/abacist', }, - 'mwprof/mwprof' => { - 'upstream' => 'https://gerrit.wikimedia.org/r/operations/software/mwprof', - }, - 'reporter/reporter' => { - 'upstream' => 'https://gerrit.wikimedia.org/r/operations/software/mwprof/reporter', - }, 'test/testrepo' => { 'service_name' => 'puppet', 'checkout_submodules' => true, diff --git a/manifests/role/mwprof.pp b/manifests/role/mwprof.pp deleted file mode 100644 index 8b4dd92..0000000 --- a/manifests/role/mwprof.pp +++ /dev/null @@ -1,10 +0,0 @@ -# == Class: role::mwprof -# -# Sets up mwprof. -# -class role::mwprof { - class { '::mwprof': - carbon_host => 'graphite-in.eqiad.wmnet', - collector_port => 3811, - } -} diff --git a/manifests/role/performance.pp b/manifests/role/performance.pp index 80633dc..88d343b 100644 --- a/manifests/role/performance.pp +++ b/manifests/role/performance.pp @@ -8,10 +8,6 @@ include ::apache::mod::proxy include ::apache::mod::uwsgi - package { 'reporter/reporter': - provider => 'trebuchet', - } - class { '::coal': endpoint => 'tcp://eventlogging.eqiad.wmnet:8600', } diff --git a/modules/deployment/files/modules/mwprof.py b/modules/deployment/files/modules/mwprof.py deleted file mode 100644 index abf2279..0000000 --- a/modules/deployment/files/modules/mwprof.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -""" - mwprof deployment module - -""" -import subprocess - - -def make(repo): - return subprocess.call('make clean && make', shell=True) diff --git a/modules/deployment/manifests/salt_master.pp b/modules/deployment/manifests/salt_master.pp index da117c4..48d1482 100644 --- a/modules/deployment/manifests/salt_master.pp +++ b/modules/deployment/manifests/salt_master.pp @@ -88,12 +88,9 @@ require => [File[$returner_dir]], } + # deprecated in T97509 file { "${module_dir}/mwprof.py": - source => 'puppet:///modules/deployment/modules/mwprof.py', - mode => '0555', - owner => 'root', - group => 'root', - require => [File[$module_dir]], + ensure => absent, } # If pillars or modules change, we need to sync them with the minions @@ -115,8 +112,7 @@ exec { 'refresh_deployment_modules': command => "/usr/bin/salt -C 'G@deployment_server:true or G@deployment_target:*' saltutil.sync_modules", - subscribe => [File["${module_dir}/deploy.py"], - File["${module_dir}/mwprof.py"]], + subscribe => File["${module_dir}/deploy.py"], refreshonly => true, require => [Package['salt-master']], } diff --git a/modules/mwprof/files/mwprofctl b/modules/mwprof/files/mwprofctl deleted file mode 100755 index fa441b2..0000000 --- a/modules/mwprof/files/mwprofctl +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# mwprofctl -- Manage MediaWiki profiler service -# Usage: mwprofctl {status|check|start|stop|restart|tail|top} -# -command=$1 -shift -case "$command" in - status) - initctl list | grep -P '^mwprof/(?!init)' | sort | \ - perl -pe 'END { exit $status } $status=1 if /stop\/waiting/;' - ;; - check) - $0 status 2>&1 >/dev/null || { - echo "CRITICAL: Not all configured mwprof instances are running." - exit 2 - } - echo "OK: All defined mwprof jobs are runnning." - exit 0 - ;; - start) - /sbin/initctl emit mwprof.start - ;; - stop) - /sbin/initctl emit mwprof.stop - ;; - restart) - /sbin/initctl emit mwprof.stop - /sbin/initctl emit mwprof.start - ;; - tail) - test -r /var/log/upstart/mwprof_init.log && tail "$@" /var/log/upstart/mwprof_init.log - ;; - top) - top -u mwprof - ;; - *) - echo >&2 "Usage: ${0##*/} {status|check|start|stop|restart|tail|top}" - ;; -esac diff --git a/modules/mwprof/files/upstart/init.conf b/modules/mwprof/files/upstart/init.conf deleted file mode 100644 index 367abaa..0000000 --- a/modules/mwprof/files/upstart/init.conf +++ /dev/null @@ -1,19 +0,0 @@ -# Upstart job configuration for mwprof -# This file is managed by Puppet -description "MediaWiki profiler" - -start on runlevel [2345] or mwprof.start -stop on runlevel [!2345] or mwprof.stop - -task - -pre-start script - mkdir -p /run/mwprof - chown -R mwprof:mwprof /run/mwprof -end script - -script - start mwprof/collector || status mwprof/collector -end script - -# vim: set ft=upstart: diff --git a/modules/mwprof/manifests/init.pp b/modules/mwprof/manifests/init.pp deleted file mode 100644 index 8d1d652..0000000 --- a/modules/mwprof/manifests/init.pp +++ /dev/null @@ -1,65 +0,0 @@ -# == Class: role::mwprof -# -# Sets up mwprof, a MediaWiki profiling log collector. -# -class mwprof( - $carbon_host = '127.0.0.1', - $carbon_port = 2003, - $collector_port = 3811, -) { - system::role { 'role::mwprof': - description => 'MediaWiki profiler', - } - - package { 'mwprof/mwprof': - provider => 'trebuchet', - } - - package { [ 'build-essential', 'libglib2.0-dev', 'glib-networking' ]: } - - group { 'mwprof': - ensure => present, - } - - user { 'mwprof': - ensure => present, - gid => 'mwprof', - shell => '/bin/false', - home => '/nonexistent', - system => true, - managehome => false, - } - - file { - '/etc/init/mwprof': - ensure => directory, - recurse => true, - purge => true, - force => true, - source => 'puppet:///modules/mwprof/upstart'; - '/etc/init/mwprof/profiler-to-carbon.conf': - content => template('mwprof/upstart/profiler-to-carbon.conf.erb'); - '/etc/init/mwprof/collector.conf': - content => template('mwprof/upstart/collector.conf.erb'); - } - - file { '/sbin/mwprofctl': - source => 'puppet:///modules/mwprof/mwprofctl'; - } - - service { 'mwprof': - ensure => 'running', - provider => 'base', - restart => '/sbin/mwprofctl restart', - start => '/sbin/mwprofctl start', - status => '/sbin/mwprofctl status', - stop => '/sbin/mwprofctl stop', - require => File['/sbin/mwprofctl'], - } - - nrpe::monitor_service { 'mwprof': - description => 'MediaWiki profile collector', - nrpe_command => '/sbin/mwprofctl check', - require => Service['mwprof'], - } -} diff --git a/modules/mwprof/templates/upstart/collector.conf.erb b/modules/mwprof/templates/upstart/collector.conf.erb deleted file mode 100644 index 6bca006..0000000 --- a/modules/mwprof/templates/upstart/collector.conf.erb +++ /dev/null @@ -1,14 +0,0 @@ -# mwprof -# -# MediaWiki profiling data collector -# -description "profiling data collector" - -stop on runlevel [!2345] or mwprof.stop - -setuid mwprof -setgid mwprof - -exec /srv/deployment/mwprof/mwprof/mwprof --listen-port=<%= @collector_port %> - -respawn diff --git a/modules/mwprof/templates/upstart/profiler-to-carbon.conf.erb b/modules/mwprof/templates/upstart/profiler-to-carbon.conf.erb deleted file mode 100644 index c3d2ff4..0000000 --- a/modules/mwprof/templates/upstart/profiler-to-carbon.conf.erb +++ /dev/null @@ -1,17 +0,0 @@ -# mwprof -# -# MediaWiki profiling data collector -# -description "profiling data collector" - -start on started mwprof/collector -stop on runlevel [!2345] or mwprof.stop - -setuid mwprof -setgid mwprof - -exec /srv/deployment/mwprof/mwprof/profiler-to-carbon \ - --collector-host=127.0.0.1 \ - --collector-port=<%= @collector_port %> \ - --carbon-host=<%= @carbon_host %> \ - --carbon-port=<%= @carbon_port %> -- To view, visit https://gerrit.wikimedia.org/r/208108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b74d8bf9ce46a4d4e4e6676bfeebcda47294e9f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits