Skip to content

Commit

Permalink
Use debian for nslookup and ping utilities
Browse files Browse the repository at this point in the history
Busybox ping exhibited intermittent failures some time back so we had
switched to using the debian image for ping testing, however in the recent
past we are now seeing intermittent failures in the busybox nslookup
results as well.
This appears to be dependent on the order in which A and AAAA record query
results are returned as those queries appear to be issued in parallel.
The debian nslookup does not issue an AAAA query by default and does not
exhibit this problem.
  • Loading branch information
hickeng committed Jul 26, 2018
1 parent d3338cb commit 05359c1
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions tests/test-cases/Group1-Docker-Commands/1-24-Docker-Link.robot
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ Test Timeout 20 minutes

*** Test Cases ***
Link and alias
# NOTE: we are using debian for the ping and nslookup operations because busybox seems to have intermittent bugs impacting
# both of those utilities.
# In the case of nslookup the busybox implementation is querying both the A and AAAA records. If the AAAA response comes back
# first then it doesn't report the A response, however if the other order then you get both responses output.

# link support for container on bridge network only
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run -itd --name foo busybox
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run -itd --name foo ${busybox}
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error

${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --link foo:bar busybox ping -c1 bar
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --link foo:bar ${debian} ping -c1 bar
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error

Expand All @@ -41,49 +46,49 @@ Link and alias
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error

${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run -it -d --net jedi --name first busybox
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run -it -d --net jedi --name first ${busybox}
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error

${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --net jedi debian ping -c1 first
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --net jedi ${debian} ping -c1 first
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error

# cannot reach first from another network
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run debian ping -c1 first
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run ${debian} ping -c1 first
Should Not Be Equal As Integers ${rc} 0
Should Contain Any ${output} unknown host Name or service not known

# the link
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --net jedi --link first:1st debian ping -c1 1st
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --net jedi --link first:1st ${debian} ping -c1 1st
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error

# cannot reach first using c1 from another container
# first run a container that has the alias "c1" for the "first" container
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run -itd --net jedi --link first:1st busybox
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run -itd --net jedi --link first:1st ${busybox}
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error
# check if we can use alias "c1" from another container
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --net jedi debian ping -c1 1st
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --net jedi ${debian} ping -c1 1st
Should Not Be Equal As Integers ${rc} 0
Should Contain Any ${output} unknown host Name or service not known

${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run -it -d --net jedi --net-alias 2nd busybox
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run -it -d --net jedi --net-alias 2nd ${busybox}
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error

# the alias
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --net jedi debian ping -c1 2nd
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --net jedi ${debian} ping -c1 2nd
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error

# another container with same network alias
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run -it -d --net jedi --net-alias 2nd busybox
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run -it -d --net jedi --net-alias 2nd ${busybox}
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error

${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --net jedi --name lookup busybox nslookup 2nd
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --net jedi --name lookup ${debian} nslookup 2nd
Should Be Equal As Integers ${rc} 0
Should Not Contain ${output} Error

Expand Down

0 comments on commit 05359c1

Please sign in to comment.