From a6400298d0b0e9c28cc0a3e34617a8f682eb633f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 15 Feb 2017 14:14:04 -0800 Subject: [bin] Update a bunch of scripts. --- bin/get-hosts-from-job | 5 +++++ bin/os-centos-7-report | 26 ++++++++++++++++++++++++++ bin/os-centos-7-report.sh | 26 -------------------------- bin/touch-projects | 4 +++- bin/zk-delete-dark-nodes | 12 ++++++++++++ 5 files changed, 46 insertions(+), 27 deletions(-) create mode 100755 bin/get-hosts-from-job create mode 100755 bin/os-centos-7-report delete mode 100755 bin/os-centos-7-report.sh create mode 100755 bin/zk-delete-dark-nodes diff --git a/bin/get-hosts-from-job b/bin/get-hosts-from-job new file mode 100755 index 0000000..6985bb6 --- /dev/null +++ b/bin/get-hosts-from-job @@ -0,0 +1,5 @@ +#!/bin/bash + +JOB_NAME=$1 + +aurora job status "${JOB_NAME}" |grep 'RUNNING on'|awk '{print $13}' | sort diff --git a/bin/os-centos-7-report b/bin/os-centos-7-report new file mode 100755 index 0000000..c003136 --- /dev/null +++ b/bin/os-centos-7-report @@ -0,0 +1,26 @@ +#!/bin/bash + +if [ ! hash osrpeort.pex 2>/dev/null ]; then + pushd . + cd "${HOME}/src/source" + ./pants binary src/python/twitter/corestorage/osreport + popd +fi + +ROLES=( + blobstore.prod.queue + deferredrpc + deferredrpc.staging + hosebird-kestrel + ibis.kestrel + kestrel + kestrel-low_sla + messaging.prod.bookkeeper + messaging.prod.distributedlog + rosette.kafka.prod + search-kestrel +) + +for role in ${ROLES[@]}; do + osreport.pex report ${role} +done diff --git a/bin/os-centos-7-report.sh b/bin/os-centos-7-report.sh deleted file mode 100755 index c003136..0000000 --- a/bin/os-centos-7-report.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -if [ ! hash osrpeort.pex 2>/dev/null ]; then - pushd . - cd "${HOME}/src/source" - ./pants binary src/python/twitter/corestorage/osreport - popd -fi - -ROLES=( - blobstore.prod.queue - deferredrpc - deferredrpc.staging - hosebird-kestrel - ibis.kestrel - kestrel - kestrel-low_sla - messaging.prod.bookkeeper - messaging.prod.distributedlog - rosette.kafka.prod - search-kestrel -) - -for role in ${ROLES[@]}; do - osreport.pex report ${role} -done diff --git a/bin/touch-projects b/bin/touch-projects index c7de34d..28f0819 100755 --- a/bin/touch-projects +++ b/bin/touch-projects @@ -9,7 +9,9 @@ PROJECTS=( eventbus/read-proxy eventbus/provisioning monitoring-configs - src/python/twitter/messaging + src/python/twitter + distributedlog + kestrel ) for project in "${PROJECTS[@]}"; do diff --git a/bin/zk-delete-dark-nodes b/bin/zk-delete-dark-nodes new file mode 100755 index 0000000..b5e995e --- /dev/null +++ b/bin/zk-delete-dark-nodes @@ -0,0 +1,12 @@ +#!/bin/bash + +set -x +set -e + +members=$(echo "ls /messaging/distributedlog/EventBus/" | zk-shell msgzookeeper.atla.twitter.com --run-from-stdin) + +for m in $members; do + if [[ $m =~ ^eventbus_system_loadtest_8_ ]]; then + echo "rmr /messaging/distributedlog/EventBus/$m" | zk-shell msgzookeeper.atla.twitter.com --run-from-stdin + fi +done -- cgit 1.4.1