Fix E306 in tests/ (#6495)
This commit is contained in:
parent
fc23f37af7
commit
50598d9d47
2 changed files with 16 additions and 8 deletions
|
@ -29,8 +29,10 @@
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: vm_id
|
index_var: vm_id
|
||||||
|
|
||||||
- name: Wait for vms to have ipaddress assigned # noqa 306
|
- name: Wait for vms to have ipaddress assigned
|
||||||
shell: "kubectl get vmis -n {{ test_name }} instance-{{ vm_id }} -o json | jq '.status.interfaces[].ipAddress' | tr -d '\"'"
|
shell: "set -o pipefail && kubectl get vmis -n {{ test_name }} instance-{{ vm_id }} -o json | jq '.status.interfaces[].ipAddress' | tr -d '\"'"
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: vm_ips
|
register: vm_ips
|
||||||
loop: "{{ range(1, vm_count|int + 1, 1) | list }}"
|
loop: "{{ range(1, vm_count|int + 1, 1) | list }}"
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
---
|
---
|
||||||
- hosts: kube-node
|
- hosts: kube-node
|
||||||
tasks:
|
tasks:
|
||||||
- name: Test tunl0 routes # noqa 306
|
- name: Test tunl0 routes
|
||||||
shell: "! /sbin/ip ro | grep '/26 via' | grep -v tunl0"
|
shell: "set -o pipefail && ! /sbin/ip ro | grep '/26 via' | grep -v tunl0"
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
when:
|
when:
|
||||||
- (ipip|default(true) or cloud_provider is defined)
|
- (ipip|default(true) or cloud_provider is defined)
|
||||||
- kube_network_plugin|default('calico') == 'calico'
|
- kube_network_plugin|default('calico') == 'calico'
|
||||||
|
@ -33,16 +35,20 @@
|
||||||
- import_role:
|
- import_role:
|
||||||
name: cluster-dump
|
name: cluster-dump
|
||||||
|
|
||||||
- name: Wait for netchecker server # noqa 306
|
- name: Wait for netchecker server
|
||||||
shell: "{{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep ^netchecker-server"
|
shell: "set -o pipefail && {{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep ^netchecker-server"
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: ncs_pod
|
register: ncs_pod
|
||||||
until: ncs_pod.stdout.find('Running') != -1
|
until: ncs_pod.stdout.find('Running') != -1
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 10
|
delay: 10
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
||||||
- name: Wait for netchecker agents # noqa 306
|
- name: Wait for netchecker agents
|
||||||
shell: "{{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep '^netchecker-agent-.*Running'"
|
shell: "set -o pipefail && {{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep '^netchecker-agent-.*Running'"
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: nca_pod
|
register: nca_pod
|
||||||
until: nca_pod.stdout_lines|length >= groups['k8s-cluster']|intersect(ansible_play_hosts)|length * 2
|
until: nca_pod.stdout_lines|length >= groups['k8s-cluster']|intersect(ansible_play_hosts)|length * 2
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|
Loading…
Reference in a new issue