Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
50598d9d
Unverified
Commit
50598d9d
authored
4 years ago
by
Maxime Guyot
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix E306 in tests/ (#6495)
parent
fc23f37a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/cloud_playbooks/roles/packet-ci/tasks/create-vms.yml
+4
-2
4 additions, 2 deletions
tests/cloud_playbooks/roles/packet-ci/tasks/create-vms.yml
tests/testcases/040_check-network-adv.yml
+12
-6
12 additions, 6 deletions
tests/testcases/040_check-network-adv.yml
with
16 additions
and
8 deletions
tests/cloud_playbooks/roles/packet-ci/tasks/create-vms.yml
+
4
−
2
View file @
50598d9d
...
...
@@ -29,8 +29,10 @@
loop_control
:
index_var
:
vm_id
-
name
:
Wait for vms to have ipaddress assigned
# noqa 306
shell
:
"
kubectl
get
vmis
-n
{{
test_name
}}
instance-{{
vm_id
}}
-o
json
|
jq
'.status.interfaces[].ipAddress'
|
tr
-d
'
\"
'"
-
name
:
Wait for vms to have ipaddress assigned
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
register
:
vm_ips
loop
:
"
{{
range(1,
vm_count|int
+
1,
1)
|
list
}}"
...
...
This diff is collapsed.
Click to expand it.
tests/testcases/040_check-network-adv.yml
+
12
−
6
View file @
50598d9d
---
-
hosts
:
kube-node
tasks
:
-
name
:
Test tunl0 routes
# noqa 306
shell
:
"
!
/sbin/ip
ro
|
grep
'/26
via'
|
grep
-v
tunl0"
-
name
:
Test tunl0 routes
shell
:
"
set
-o
pipefail
&&
!
/sbin/ip
ro
|
grep
'/26
via'
|
grep
-v
tunl0"
args
:
executable
:
/bin/bash
when
:
-
(ipip|default(true) or cloud_provider is defined)
-
kube_network_plugin|default('calico') == 'calico'
...
...
@@ -33,16 +35,20 @@
-
import_role
:
name
:
cluster-dump
-
name
:
Wait for netchecker server
# noqa 306
shell
:
"
{{
bin_dir
}}/kubectl
get
pods
-o
wide
--namespace
{{
netcheck_namespace
}}
|
grep
^netchecker-server"
-
name
:
Wait for 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
until
:
ncs_pod.stdout.find('Running') != -1
retries
:
3
delay
:
10
when
:
inventory_hostname == groups['kube-master'][0]
-
name
:
Wait for netchecker agents
# noqa 306
shell
:
"
{{
bin_dir
}}/kubectl
get
pods
-o
wide
--namespace
{{
netcheck_namespace
}}
|
grep
'^netchecker-agent-.*Running'"
-
name
:
Wait for netchecker agents
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
until
:
nca_pod.stdout_lines|length >= groups['k8s-cluster']|intersect(ansible_play_hosts)|length *
2
retries
:
3
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment