From fb83196f7951f5522ec741c0e7aa5694f523f05b Mon Sep 17 00:00:00 2001 From: f3flight Date: Fri, 29 Jul 2016 14:37:35 +0000 Subject: [PATCH] Add extra data for collection --- rq.yaml | 36 +++++++++++-------- rq/scripts/apt-cache-policy | 1 + rq/scripts/arp-an | 1 + rq/scripts/blkid-o-list | 2 ++ rq/scripts/cat-proc-interrupts | 1 + rq/scripts/ceph-health | 1 + rq/scripts/ceph-s | 1 + rq/scripts/dmidecode | 1 + rq/scripts/dmsetup-info | 1 + rq/scripts/docker-images | 1 + rq/scripts/dpkg-l | 1 + rq/scripts/fuel-bootstrap-list | 1 + rq/scripts/lsmod | 1 + rq/scripts/lvdisplay | 1 + rq/scripts/mount | 1 + rq/scripts/packages-centos | 1 - rq/scripts/packages-ubuntu | 1 - rq/scripts/pcs-status | 1 + ...docker-db-archive => postgres-dump-docker} | 0 rq/scripts/ps-auxwwf | 1 + rq/scripts/pvdisplay | 1 + rq/scripts/shotgun2-report | 1 + rq/scripts/sysctl-a | 1 + rq/scripts/uname-a | 1 + rq/scripts/uptime | 1 + rq/scripts/vgdisplay | 1 + rq/scripts/yum-list-installed | 1 + rq/scripts/yum-v-repolist | 1 + timmy/tools.py | 20 +++++------ 29 files changed, 57 insertions(+), 26 deletions(-) create mode 100644 rq/scripts/apt-cache-policy create mode 100644 rq/scripts/arp-an create mode 100644 rq/scripts/blkid-o-list create mode 100644 rq/scripts/cat-proc-interrupts create mode 100644 rq/scripts/ceph-health create mode 100644 rq/scripts/ceph-s create mode 100644 rq/scripts/dmidecode create mode 100644 rq/scripts/dmsetup-info create mode 100644 rq/scripts/docker-images create mode 100644 rq/scripts/dpkg-l create mode 100644 rq/scripts/fuel-bootstrap-list create mode 100644 rq/scripts/lsmod create mode 100644 rq/scripts/lvdisplay create mode 100644 rq/scripts/mount delete mode 100644 rq/scripts/packages-centos delete mode 100644 rq/scripts/packages-ubuntu create mode 100644 rq/scripts/pcs-status rename rq/scripts/{fuel-docker-db-archive => postgres-dump-docker} (100%) create mode 100644 rq/scripts/ps-auxwwf create mode 100644 rq/scripts/pvdisplay create mode 100644 rq/scripts/shotgun2-report create mode 100644 rq/scripts/sysctl-a create mode 100644 rq/scripts/uname-a create mode 100644 rq/scripts/uptime create mode 100644 rq/scripts/vgdisplay create mode 100644 rq/scripts/yum-list-installed create mode 100644 rq/scripts/yum-v-repolist diff --git a/rq.yaml b/rq.yaml index 30267ee..d4b36d1 100644 --- a/rq.yaml +++ b/rq.yaml @@ -1,3 +1,11 @@ +files: + __default: ['/etc/resolv.conf', '/etc/hiera', '/etc/mcollective', '/etc/astute.yaml', '/root/.ceph*', '/root/anaconda*', '/root/*.log', '/root/*.ks', '/var/lib/puppet/state/last_run_summary.yaml', '/var/run/pcap_dir', '/var/lib/cloud'] + by_roles: + controller: ['/etc/apache2', '/etc/keystone', '/etc/swift'] + fuel: ['/etc/astute', '/etc/dnsmasq.conf', '/etc/centos-release', '/etc/fuel_build_number', '/etc/fuel_build_id', '/etc/cobbler', '/etc/cobbler.dnsmasq.conf', '/root/*.log'] + by_os_platform: + ubuntu: ['/etc/lsb-release', '/etc/network'] + centos: ['/etc/redhat-release', '/etc/sysconfig'] filelists: by_roles: fuel: [etc-nailgun, etc-fuel] @@ -22,60 +30,60 @@ scripts: controller: [nova-manage-vm-list] '5.0': by_roles: + fuel: [fuel-docker-ps, fuel-dockerctl-check, postgres-dump-docker] controller: [nova-manage-vm-list] '5.0.1': by_roles: - fuel: [fuel-docker-ps, fuel-dockerctl-check, fuel-docker-db-archive] + fuel: [fuel-docker-ps, fuel-dockerctl-check, postgres-dump-docker] controller: [nova-manage-vm-list] '5.1': by_roles: + fuel: [fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, postgres-dump-docker] controller: [nova-manage-vm-list] '5.1.1': by_roles: - fuel: [fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, fuel-docker-db-archive] + fuel: [fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, postgres-dump-docker] controller: [nova-manage-vm-list] '6.0': by_roles: + fuel: [fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, postgres-dump-docker, docker-images] compute: [ipset-save, ipset-list] controller: [ipset-save, ipset-list, nova-manage-vm-list] '6.1': by_roles: - fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, - fuel-docker-db-archive] + fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, postgres-dump-docker, docker-images] controller: [nova-manage-vm-list] '7.0': by_roles: - fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, - fuel-docker-db-archive] + fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, postgres-dump-docker, docker-images] '8.0': by_roles: - fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, - fuel-docker-db-archive] + fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, postgres-dump-docker, docker-images, fuel-bootstrap-list] '9.0': by_roles: - fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check] + fuel: [fuel-notifications, fuel-postgres-dump, fuel-bootstrap-list, shotgun2-report] by_roles: fuel: [fuel-release, fuel-task-list, fuel-environment-list] cinder: [ovs-vsctl-show, cinder-manage] compute: [compute-iptables-nat, ovs-dump-flows, compute-iptables, ovs-ofctl-show-bridges, ovs-vsctl-show] controller: [rabbitmqctl-list-queues, nova-service-list, iptables-namespaces, - rabbitmqctl-cluster-status, crm-resource-status, ovs-dump-flows, neutron-agent-list, + rabbitmqctl-cluster-status, crm-resource-status, pcs-status, ovs-dump-flows, neutron-agent-list, mysql-status, ceph-mon-status, ovs-ofctl-show-bridges, rabbitmqctl-list-connections, ovs-vsctl-show, rabbitmqctl-report, mysql-size, rabbitmqctl-status, crm-resource-list, cinder-manage] mongo: [mongo-replication-status, ipa, mongo-replica-conf, mongo-status, ovs-vsctl-show] once_by_roles: ceph-osd: [ceph-df, ceph-osd-status, ceph-osd-tree, ceph-pg-dump, ovs-vsctl-show, - ceph-health-detail] + ceph-health-detail, ceph-health] controller: [neutron-router-list, neutron-net-list, neutron-subnet-list, keystone-endpoint-list, cinder-list, nova-list, keystone-tenant-list, nova-usage-list, neutron-port-list] by_os_platform: - ubuntu: [dmesg-t-ubuntu, packages-ubuntu] - centos: [dmesg-centos, packages-centos] + ubuntu: [dmesg-t-ubuntu, dpkg-l, apt-cache-policy] + centos: [dmesg-centos, yum-list-installed, yum-v-repolist] __default: - [ip-ne, iptables, ipnetns, ss, ipa, iptables-nat, df-m, services-status, cpuinfo, df-i, ipro] + [ip-ne, iptables, ipnetns, ss, ipa, iptables-nat, df-m, services-status, cpuinfo, df-i, ipro, mount, sysctl-a, pvdisplay, vgdisplay, lvdisplay, lsmod, dmidecode, cat-proc-interrupts, arp-an, uname-a, ps-auxwwf, uptime, dmsetup-info, brctl-show, blkid-o-list] # cmds: # __default: # test: diff --git a/rq/scripts/apt-cache-policy b/rq/scripts/apt-cache-policy new file mode 100644 index 0000000..b8982d5 --- /dev/null +++ b/rq/scripts/apt-cache-policy @@ -0,0 +1 @@ +apt-cache policy diff --git a/rq/scripts/arp-an b/rq/scripts/arp-an new file mode 100644 index 0000000..0df8e90 --- /dev/null +++ b/rq/scripts/arp-an @@ -0,0 +1 @@ +arp -an diff --git a/rq/scripts/blkid-o-list b/rq/scripts/blkid-o-list new file mode 100644 index 0000000..8fe031a --- /dev/null +++ b/rq/scripts/blkid-o-list @@ -0,0 +1,2 @@ +blkid -o list | perl -pe 's/[^[:print:]\r\n]//g' +# perl cleanup is necessary to workaroud corrupt output of blkid with long mount points (docker mount points have garbage in the end) - this at least prevents our Python code from crashing diff --git a/rq/scripts/cat-proc-interrupts b/rq/scripts/cat-proc-interrupts new file mode 100644 index 0000000..4088553 --- /dev/null +++ b/rq/scripts/cat-proc-interrupts @@ -0,0 +1 @@ +cat /proc/interrupts diff --git a/rq/scripts/ceph-health b/rq/scripts/ceph-health new file mode 100644 index 0000000..2e0eb91 --- /dev/null +++ b/rq/scripts/ceph-health @@ -0,0 +1 @@ +ceph health diff --git a/rq/scripts/ceph-s b/rq/scripts/ceph-s new file mode 100644 index 0000000..7e53974 --- /dev/null +++ b/rq/scripts/ceph-s @@ -0,0 +1 @@ +ceph -s diff --git a/rq/scripts/dmidecode b/rq/scripts/dmidecode new file mode 100644 index 0000000..9b4923a --- /dev/null +++ b/rq/scripts/dmidecode @@ -0,0 +1 @@ +dmidecode diff --git a/rq/scripts/dmsetup-info b/rq/scripts/dmsetup-info new file mode 100644 index 0000000..14b4e78 --- /dev/null +++ b/rq/scripts/dmsetup-info @@ -0,0 +1 @@ +dmsetup info -c --nameprefixes --noheadings -o blkdevname,subsystem,blkdevs_used,name,uuid diff --git a/rq/scripts/docker-images b/rq/scripts/docker-images new file mode 100644 index 0000000..a96a18b --- /dev/null +++ b/rq/scripts/docker-images @@ -0,0 +1 @@ +docker images diff --git a/rq/scripts/dpkg-l b/rq/scripts/dpkg-l new file mode 100644 index 0000000..75665e6 --- /dev/null +++ b/rq/scripts/dpkg-l @@ -0,0 +1 @@ +dpkg -l | cat diff --git a/rq/scripts/fuel-bootstrap-list b/rq/scripts/fuel-bootstrap-list new file mode 100644 index 0000000..1e0a20f --- /dev/null +++ b/rq/scripts/fuel-bootstrap-list @@ -0,0 +1 @@ +fuel-bootstrap list diff --git a/rq/scripts/lsmod b/rq/scripts/lsmod new file mode 100644 index 0000000..227d628 --- /dev/null +++ b/rq/scripts/lsmod @@ -0,0 +1 @@ +lsmod diff --git a/rq/scripts/lvdisplay b/rq/scripts/lvdisplay new file mode 100644 index 0000000..1aa928b --- /dev/null +++ b/rq/scripts/lvdisplay @@ -0,0 +1 @@ +lvdisplay diff --git a/rq/scripts/mount b/rq/scripts/mount new file mode 100644 index 0000000..fde6477 --- /dev/null +++ b/rq/scripts/mount @@ -0,0 +1 @@ +mount diff --git a/rq/scripts/packages-centos b/rq/scripts/packages-centos deleted file mode 100644 index 8254f9d..0000000 --- a/rq/scripts/packages-centos +++ /dev/null @@ -1 +0,0 @@ -time yum list installed diff --git a/rq/scripts/packages-ubuntu b/rq/scripts/packages-ubuntu deleted file mode 100644 index 6f42c97..0000000 --- a/rq/scripts/packages-ubuntu +++ /dev/null @@ -1 +0,0 @@ -time dpkg -l diff --git a/rq/scripts/pcs-status b/rq/scripts/pcs-status new file mode 100644 index 0000000..b98c9ac --- /dev/null +++ b/rq/scripts/pcs-status @@ -0,0 +1 @@ +pcs status diff --git a/rq/scripts/fuel-docker-db-archive b/rq/scripts/postgres-dump-docker similarity index 100% rename from rq/scripts/fuel-docker-db-archive rename to rq/scripts/postgres-dump-docker diff --git a/rq/scripts/ps-auxwwf b/rq/scripts/ps-auxwwf new file mode 100644 index 0000000..5a88805 --- /dev/null +++ b/rq/scripts/ps-auxwwf @@ -0,0 +1 @@ +ps auxwwf diff --git a/rq/scripts/pvdisplay b/rq/scripts/pvdisplay new file mode 100644 index 0000000..31f7414 --- /dev/null +++ b/rq/scripts/pvdisplay @@ -0,0 +1 @@ +pvdisplay diff --git a/rq/scripts/shotgun2-report b/rq/scripts/shotgun2-report new file mode 100644 index 0000000..69b19a1 --- /dev/null +++ b/rq/scripts/shotgun2-report @@ -0,0 +1 @@ +shotgun2 report diff --git a/rq/scripts/sysctl-a b/rq/scripts/sysctl-a new file mode 100644 index 0000000..1adb366 --- /dev/null +++ b/rq/scripts/sysctl-a @@ -0,0 +1 @@ +sysctl -a diff --git a/rq/scripts/uname-a b/rq/scripts/uname-a new file mode 100644 index 0000000..9301d1a --- /dev/null +++ b/rq/scripts/uname-a @@ -0,0 +1 @@ +uname -a diff --git a/rq/scripts/uptime b/rq/scripts/uptime new file mode 100644 index 0000000..12403fb --- /dev/null +++ b/rq/scripts/uptime @@ -0,0 +1 @@ +uptime diff --git a/rq/scripts/vgdisplay b/rq/scripts/vgdisplay new file mode 100644 index 0000000..1689ff7 --- /dev/null +++ b/rq/scripts/vgdisplay @@ -0,0 +1 @@ +vgdisplay diff --git a/rq/scripts/yum-list-installed b/rq/scripts/yum-list-installed new file mode 100644 index 0000000..cad1fce --- /dev/null +++ b/rq/scripts/yum-list-installed @@ -0,0 +1 @@ +yum list installed diff --git a/rq/scripts/yum-v-repolist b/rq/scripts/yum-v-repolist new file mode 100644 index 0000000..1d4e7fc --- /dev/null +++ b/rq/scripts/yum-v-repolist @@ -0,0 +1 @@ +yum -v repolist diff --git a/timmy/tools.py b/timmy/tools.py index 5af4913..08d790c 100644 --- a/timmy/tools.py +++ b/timmy/tools.py @@ -218,16 +218,16 @@ def launch_cmd(cmd, timeout, input=None, ok_codes=None): outs = outs.decode('utf-8') errs = errs.decode('utf-8') errs = errs.rstrip('\n') - except: - try: - p.kill() - except: - pass - p.stdin = None - outs, errs = p.communicate() - outs = outs.decode('utf-8') - errs = errs.decode('utf-8') - errs = errs.rstrip('\n') +# except: +# try: +# p.kill() +# except: +# pass +# p.stdin = None +# outs, errs = p.communicate() +# outs = outs.decode('utf-8') +# errs = errs.decode('utf-8') +# errs = errs.rstrip('\n') finally: if timeout_killer: timeout_killer.cancel()