Zack Williams | 6f0d88e | 2018-01-13 23:04:02 -0700 | [diff] [blame] | 1 | --- |
Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 2 | # 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 Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 16 | # compute-diag/tasks/main.yml |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 17 | |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 18 | - name: Create diag_dir subdir |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 19 | file: |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 20 | dest: "/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}" |
| 21 | state: directory |
| 22 | register: compute_diag_dir |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 23 | |
| 24 | - name: Compute node diag collection |
Zack Williams | 0410673 | 2016-06-27 20:55:32 -0700 | [diff] [blame] | 25 | shell: "{{ item }} > /tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ inventory_hostname }}/{{ item | regex_replace('[^\\w-]', '_')}}" |
Zack Williams | 97bbf0b | 2017-08-01 22:50:08 -0700 | [diff] [blame] | 26 | ignore_errors: yes |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 27 | args: |
| 28 | creates: "compute_diag_dir.stat.path/{{ item | regex_replace('[^\\w-]', '_')}}" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 29 | with_items: |
| 30 | - "arp -n" |
| 31 | - "brctl show" |
Zack Williams | dc4878f | 2016-07-26 14:50:30 -0700 | [diff] [blame] | 32 | - "cat /etc/lsb-release" |
Zack Williams | 6f0d88e | 2018-01-13 23:04:02 -0700 | [diff] [blame] | 33 | - "cat /etc/resolv.conf" |
| 34 | - "date -u" |
| 35 | - "df -k" |
| 36 | - "free" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 37 | - "ifconfig -a" |
Zack Williams | 6f0d88e | 2018-01-13 23:04:02 -0700 | [diff] [blame] | 38 | - "ip addr list" |
| 39 | - "ip link list" |
| 40 | - "ip neighbor" |
| 41 | - "ip route" |
| 42 | - "ps aux" |
Zack Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 43 | - "route -n" |
Zack Williams | 6f0d88e | 2018-01-13 23:04:02 -0700 | [diff] [blame] | 44 | - "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 Williams | 18b6f02 | 2018-01-19 11:46:54 -0700 | [diff] [blame^] | 50 | - "sudo ovs-dpctl show" |
Zack Williams | 6f0d88e | 2018-01-13 23:04:02 -0700 | [diff] [blame] | 51 | - "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 Williams | 97bbf0b | 2017-08-01 22:50:08 -0700 | [diff] [blame] | 56 | - "sudo ovs-vsctl get-controller br-int" |
Zack Williams | 6f0d88e | 2018-01-13 23:04:02 -0700 | [diff] [blame] | 57 | - "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 Williams | ba7af9e | 2016-06-27 17:21:09 -0700 | [diff] [blame] | 61 | |