Add the MTU size to ping to catch network issues
Many times users hit this issue where nic templates set jumbo frames properly but switches are not properly configured and this situation creates random issues hard to troubleshoot ranging from a CEPH cluster not forming to swift not syncing properly. Adding an early test for MTU sizes in the ansible playbooks should fail early and put us on a path to early solve this issue instead of spending a week or more trying to figure out why CEPH batch LVM is not working. Change-Id: I9e56c512a563c4b04f398581e87846901fe021d6
This commit is contained in:
parent
f6630e9432
commit
c3e7f7d889
|
@ -33,13 +33,10 @@
|
|||
- ansible_facts.default_ipv4.gateway is defined
|
||||
|
||||
- name: Check Controllers availability
|
||||
command: "{{ (':' in controller) | ternary('ping6', 'ping') }} -w 10 -c 1 {{ controller }}"
|
||||
retries: 10
|
||||
delay: 60
|
||||
include_tasks: ping.yml
|
||||
loop_control:
|
||||
loop_var: controller
|
||||
loop: "{{ tripleo_nodes_validation_ping_test_ips }}"
|
||||
changed_when: false
|
||||
when:
|
||||
- tripleo_nodes_validation_validate_controllers_icmp|bool
|
||||
- tripleo_nodes_validation_ping_test_ips | length > 0
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
# Copyright 2021 Red Hat, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
- name: Get nic for ping
|
||||
shell: |-
|
||||
ip ro get {{ controller }} | head -1 | sed 's/.*dev \(.*\) src.*/\1/'
|
||||
register: nic_for_ping
|
||||
|
||||
- name: network availability validation block
|
||||
block:
|
||||
- name: Get MTU for {{ nic_for_ping.stdout }}
|
||||
shell: |-
|
||||
ip link show {{ nic_for_ping.stdout }} | head -1 | sed 's/.*mtu \(.*\) qdisc.*/\1/'
|
||||
register: mtu_for_nic
|
||||
|
||||
- name: Check IP responsiveness
|
||||
command: "{{ (':' in controller) | ternary('ping6', 'ping') }} -w 10 -c 1 {{ controller }}"
|
||||
retries: 10
|
||||
delay: 60
|
||||
changed_when: false
|
||||
|
||||
- name: Validate packet with given MTU size can reach controller
|
||||
command: "{{ (':' in controller) | ternary('ping6', 'ping') }} -w 10 -s {{ mtu_for_nic.stdout | int - 28 }} -c 1 {{ controller }}"
|
||||
retries: 10
|
||||
delay: 60
|
||||
changed_when: false
|
||||
when: nic_for_ping.stdout != 'lo'
|
Loading…
Reference in New Issue