blob: 1952992dd9ceb328bcd5bedc6b17b6bbee04279f [file] [log] [blame]
Zack Williams6f0d88e2018-01-13 23:04:02 -07001---
Matteo Scandolo3896c472017-08-01 13:31:42 -07002# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Zack Williamsba7af9e2016-06-27 17:21:09 -070016# compute-diag/tasks/main.yml
Zack Williams35624562016-08-28 17:12:26 -070017
Zack Williams04106732016-06-27 20:55:32 -070018- name: Create diag_dir subdir
Zack Williamsba7af9e2016-06-27 17:21:09 -070019 file:
Zack Williams35624562016-08-28 17:12:26 -070020 dest: "/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}"
21 state: directory
22 register: compute_diag_dir
Zack Williamsba7af9e2016-06-27 17:21:09 -070023
24- name: Compute node diag collection
Zack Williams04106732016-06-27 20:55:32 -070025 shell: "{{ item }} > /tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}/{{ item | regex_replace('[^\\w-]', '_')}}"
Zack Williams97bbf0b2017-08-01 22:50:08 -070026 ignore_errors: yes
Zack Williams35624562016-08-28 17:12:26 -070027 args:
28 creates: "compute_diag_dir.stat.path/{{ item | regex_replace('[^\\w-]', '_')}}"
Zack Williamsba7af9e2016-06-27 17:21:09 -070029 with_items:
30 - "arp -n"
31 - "brctl show"
Zack Williamsdc4878f2016-07-26 14:50:30 -070032 - "cat /etc/lsb-release"
Zack Williams6f0d88e2018-01-13 23:04:02 -070033 - "cat /etc/resolv.conf"
34 - "date -u"
35 - "df -k"
36 - "free"
Zack Williamsba7af9e2016-06-27 17:21:09 -070037 - "ifconfig -a"
Zack Williams6f0d88e2018-01-13 23:04:02 -070038 - "ip addr list"
39 - "ip link list"
40 - "ip neighbor"
41 - "ip route"
42 - "ps aux"
Zack Williamsba7af9e2016-06-27 17:21:09 -070043 - "route -n"
Zack Williams6f0d88e2018-01-13 23:04:02 -070044 - "sudo iptables -S"
45 - "sudo iptables -t nat -S"
46 - "sudo ovs-appctl bridge/dump-flows br-int"
47 - "sudo ovs-appctl fdb/show br-int"
48 - "sudo ovs-appctl vlog/list"
49 - "sudo ovs-dpctl dump-flows"
Zack Williams18b6f022018-01-19 11:46:54 -070050 - "sudo ovs-dpctl show"
Zack Williams6f0d88e2018-01-13 23:04:02 -070051 - "sudo ovs-ofctl dump-flows br-int"
52 - "sudo ovs-ofctl dump-ports br-int"
53 - "sudo ovs-ofctl dump-ports-desc br-int"
54 - "sudo ovs-ofctl dump-tables br-int"
55 - "sudo ovs-ofctl show br-int"
Zack Williams97bbf0b2017-08-01 22:50:08 -070056 - "sudo ovs-vsctl get-controller br-int"
Zack Williams6f0d88e2018-01-13 23:04:02 -070057 - "sudo ovs-vsctl list interface"
58 - "sudo ovs-vsctl list-br"
59 - "sudo ovs-vsctl list-ports br-int"
60 - "sudo ovs-vsctl show"
Zack Williamsba7af9e2016-06-27 17:21:09 -070061