From 0e2149c86ec2d2cc5cfed78898aca112538973f7 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 22 Jul 2014 13:57:40 -0600 Subject: [PATCH] Remove kcon_most It was unused. Signed-off-by: Zack Cerza --- teuthology/task/install.py | 2 +- teuthology/task/kcon_most | 39 --------------------- teuthology/task/kcon_most.py | 66 ------------------------------------ 3 files changed, 1 insertion(+), 106 deletions(-) delete mode 100755 teuthology/task/kcon_most delete mode 100644 teuthology/task/kcon_most.py diff --git a/teuthology/task/install.py b/teuthology/task/install.py index 0aef437a05ee0..3d9c5d0af0c7b 100644 --- a/teuthology/task/install.py +++ b/teuthology/task/install.py @@ -1115,7 +1115,7 @@ def ship_utilities(ctx, config): ) f.seek(0) - FILES = ['daemon-helper', 'adjust-ulimits', 'kcon_most'] + FILES = ['daemon-helper', 'adjust-ulimits'] destdir = '/usr/bin' for filename in FILES: log.info('Shipping %r...', filename) diff --git a/teuthology/task/kcon_most b/teuthology/task/kcon_most deleted file mode 100755 index cef3d899a6dbc..0000000000000 --- a/teuthology/task/kcon_most +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# Adapted from ceph repo src/script/kcon_most.sh - -p() { - echo "$*" > /sys/kernel/debug/dynamic_debug/control -} - -usage() { - echo "usage: $0 [on|off]" - exit 1 -} - -if [ $# != "1" ]; -then - usage -fi - -if [ "$1" != "on" -a "$1" != "off" ]; -then - usage -fi - -if [ $1 = "on" ]; -then - p 'module ceph +p' - p 'module libceph +p' - p 'module rbd +p' - p 'file net/ceph/messenger.c -p' - p 'file' `grep -- --- /sys/kernel/debug/dynamic_debug/control | grep ceph | awk '{print $1}' | sed 's/:/ line /'` '+p' - p 'file' `grep -- === /sys/kernel/debug/dynamic_debug/control | grep ceph | awk '{print $1}' | sed 's/:/ line /'` '+p' -else - p 'module ceph -p' - p 'module libceph -p' - p 'module rbd -p' - p 'file' `grep -- --- /sys/kernel/debug/dynamic_debug/control | grep ceph | awk '{print $1}' | sed 's/:/ line /'` '-p' - p 'file' `grep -- === /sys/kernel/debug/dynamic_debug/control | grep ceph | awk '{print $1}' | sed 's/:/ line /'` '-p' -fi -exit 0 diff --git a/teuthology/task/kcon_most.py b/teuthology/task/kcon_most.py deleted file mode 100644 index 819de3441104a..0000000000000 --- a/teuthology/task/kcon_most.py +++ /dev/null @@ -1,66 +0,0 @@ -""" -Most ceph console logging -""" -import contextlib -import logging - -from teuthology import misc as teuthology - -log = logging.getLogger(__name__) - - -@contextlib.contextmanager -def task(ctx, config): - """ - Enable most ceph console logging - - Example that enables logging on all clients:: - - tasks: - - ceph: - - kclient: - - kcon_most - - interactive: - - Example that enables logging only on the client using kclient:: - - tasks: - - ceph: - - kclient: [client.0] - - kcon_most [client.0] - - interactive: - """ - log.info('Enable additional kernel logging...') - assert config is None or isinstance(config, list), \ - "task kcon_most got invalid config" - - if config is None: - config = ['client.{id}'.format(id=id_) - for id_ in teuthology.all_roles_of_type(ctx.cluster, 'client')] - clients = list(teuthology.get_clients(ctx=ctx, roles=config)) - - for id_, remote in clients: - # TODO: Don't have to run this more than once per node (remote) - log.info('Enable logging on client.{id} at {remote} ...'.format( - id=id_, remote=remote)) - remote.run( - args=[ - 'sudo', - 'kcon_most', - 'on' - ], - ) - - try: - yield - finally: - log.info('Disable extra kernel logging on clients...') - for id_, remote in clients: - log.debug('Disable extra kernel logging on client.{id}...'.format(id=id_)) - remote.run( - args=[ - 'sudo', - 'kcon_most', - 'off' - ], - ) -- 2.39.5