Skip to content

Commit

Permalink
Fix the petstore example test with iptables proxy
Browse files Browse the repository at this point in the history
hypothesis: The old userspace proxier would internally retry connections.  The
new one does not.  When this test comes up, the firewall might not yet be open or
something is causing a long delay and a timeout.  I can't repro this failure
locally, so I am shooting in the dark.  It's sort of plausible.

evidence: I can SSH into the jenkins master that is hung and I can see the hung
curl.  I can run that curl by hand and it works.  I can see that my shell is in
the same netns as that hung curl.
  • Loading branch information
thockin committed Nov 17, 2015
1 parent 70d89a3 commit 7f0ed03
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/k8petstore/k8petstore-loadbalancer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function pollfor {
do
### Just testing that the front end comes up. Not sure how to test total entries etc... (yet)
echo "Trying curl ... $PUBLIC_IP:3000 , attempt $i . expect a few failures while pulling images... "
curl "$PUBLIC_IP:3000" > result
curl --connect-timeout 1 "$PUBLIC_IP:3000" > result
cat result
cat result | grep -q "k8-bps"
if [ $? -eq 0 ]; then
Expand All @@ -279,7 +279,7 @@ function tests {
for i in `seq 1 $_SECONDS`;
do
echo "curl : $PUBLIC_IP:3000 , $i of $_SECONDS"
curr_cnt="`curl "$PUBLIC_IP:3000/llen"`"
curr_cnt="`curl --connect-timeout 1 "$PUBLIC_IP:3000/llen"`"
### Write CSV File of # of trials / total transcations.
echo "$i $curr_cnt" >> result
echo "total transactions so far : $curr_cnt"
Expand Down
6 changes: 3 additions & 3 deletions examples/k8petstore/k8petstore-nodeport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ function pollfor {
for i in `seq 1 150`;
do
### Just testing that the front end comes up. Not sure how to test total entries etc... (yet)
echo "Trying curl ... $PUBLIC_IP:3000 , attempt $i . expect a few failures while pulling images... "
curl "$TEST_IP:$NODE_PORT" > result
echo "Trying curl frontend:3000 via $TEST_IP:$NODE_PORT, attempt ${i}. Expect a few failures while pulling images... "
curl --connect-timeout 1 "$TEST_IP:$NODE_PORT" > result
cat result
cat result | grep -q "k8-bps"
if [ $? -eq 0 ]; then
Expand All @@ -296,7 +296,7 @@ function tests {
for i in `seq 1 $_SECONDS`;
do
echo "curl : $TEST_IP:$NODE_PORT , $i of $_SECONDS"
curr_cnt="`curl "$TEST_IP:$NODE_PORT/llen"`"
curr_cnt="`curl --connect-timeout 1 "$TEST_IP:$NODE_PORT/llen"`"
### Write CSV File of # of trials / total transcations.
echo "$i $curr_cnt" >> result
echo "total transactions so far : $curr_cnt"
Expand Down
4 changes: 2 additions & 2 deletions examples/k8petstore/k8petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function pollfor {
do
### Just testing that the front end comes up. Not sure how to test total entries etc... (yet)
echo "Trying curl ... $PUBLIC_IP:3000 , attempt $i . expect a few failures while pulling images... "
curl "$PUBLIC_IP:3000" > result
curl --connect-timeout 1 "$PUBLIC_IP:3000" > result
cat result
cat result | grep -q "k8-bps"
if [ $? -eq 0 ]; then
Expand All @@ -263,7 +263,7 @@ function tests {
for i in `seq 1 $_SECONDS`;
do
echo "curl : $PUBLIC_IP:3000 , $i of $_SECONDS"
curr_cnt="`curl "$PUBLIC_IP:3000/llen"`"
curr_cnt="`curl --connect-timeout 1 "$PUBLIC_IP:3000/llen"`"
### Write CSV File of # of trials / total transcations.
echo "$i $curr_cnt" >> result
echo "total transactions so far : $curr_cnt"
Expand Down

0 comments on commit 7f0ed03

Please sign in to comment.